Skip to content

Commit

Permalink
Don't parse RTDL packets
Browse files Browse the repository at this point in the history
Removed the code for parsing the RTDL packets.  Also removed the code in
the BankedEventPkt parser that checked the pulse ID on the RDTL packets.

Refs #6932
  • Loading branch information
rgmiller committed Apr 25, 2013
1 parent b844c09 commit 4baa2c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
Expand Up @@ -70,7 +70,6 @@ namespace Mantid
using ADARA::Parser::rxPacket;
//virtual bool rxPacket( const ADARA::Packet &pkt);
//virtual bool rxPacket( const ADARA::RawDataPkt &pkt);
virtual bool rxPacket( const ADARA::RTDLPkt &pkt);
virtual bool rxPacket( const ADARA::BankedEventPkt &pkt);
virtual bool rxPacket( const ADARA::GeometryPkt &pkt);
virtual bool rxPacket( const ADARA::BeamlineInfoPkt &pkt);
Expand Down
Expand Up @@ -322,21 +322,6 @@ namespace DataHandling
}


/// Parse an RTDL packet

/// Overrides the default function defined in ADARA::Parser and processes
/// data from ADARA::RTDLPkt packets.
/// @param pkt The packet to be parsed
/// @return Returns false if there were no problems. Returns true if there
/// was an error and packet parsing should be interrupted
bool SNSLiveEventDataListener::rxPacket( const ADARA::RTDLPkt &pkt)
{
// At the moment, all we need from the RTDL packets is the pulse
// time (and its questionable whether we even need that).
m_rtdlPulseId = pkt.pulseId();
return false;
}

/// Parse a banked event packet

/// Overrides the default function defined in ADARA::Parser and processes
Expand All @@ -347,30 +332,14 @@ namespace DataHandling
/// @param pkt The packet to be parsed
/// @return Returns false if there were no problems. Returns true if there
/// was an error and packet parsing should be interrupted
// Note: Before we can process a particular BankedEventPkt, we must have
// received the RTDLPkt for pulse ID specified in the BankedEventPkt.
// Normally this won't be an issue since the SMS will send out RTDLPkts
// before it sends BankedEventPkts.
bool SNSLiveEventDataListener::rxPacket( const ADARA::BankedEventPkt &pkt)
{

// A few counters that we use for logging purposes
unsigned eventsPerBank = 0;
unsigned totalEvents = 0;

// First step - make sure the RTDL packet we've saved matches the
// banked event packet we've just received and make sure its RAW flag
// is false
if (pkt.pulseId() != m_rtdlPulseId)
{
// Wrong RTDL packet. Fail!
g_log.error() << "Ignoring data from Pulse ID" << pkt.pulseId()
<< "because we have not received an RTDL packet for that pulse!"
<< std::endl;
return false;
}

// Next - check to see if the run has been paused. We don't process
// First, check to see if the run has been paused. We don't process
// the events if we're paused unless the user has specifically overridden
// this behavior with the livelistener.keeppausedevents property.
if (m_runPaused && m_keepPausedEvents == false)
Expand Down

0 comments on commit 4baa2c3

Please sign in to comment.