#include <FEDTrailer.h>
Public Member Functions | |
bool | check () |
bool | check () |
int | crc () |
Cyclic Redundancy Code of the event fragment including header and trailer. | |
int | crc () |
Cyclic Redundancy Code of the event fragment including header and trailer. | |
int | evtStatus () |
Event fragment status information. | |
int | evtStatus () |
Event fragment status information. | |
FEDTrailer (const unsigned char *trailer) | |
Constructor. | |
FEDTrailer (const unsigned char *trailer) | |
Constructor. | |
int | lenght () |
The length of the event fragment counted in 64-bit words including header and trailer. | |
int | lenght () |
The length of the event fragment counted in 64-bit words including header and trailer. | |
bool | moreTrailers () |
bool | moreTrailers () |
int | ttsBits () |
Current value of the Trigger Throttling System bitsAQ). | |
int | ttsBits () |
Current value of the Trigger Throttling System bitsAQ). | |
virtual | ~FEDTrailer () |
Destructor. | |
virtual | ~FEDTrailer () |
Destructor. | |
Static Public Member Functions | |
static void | set (unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false) |
Set all fields in the trailer. | |
static void | set (unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false) |
Set all fields in the trailer. | |
Private Attributes | |
const fedt_struct * | theTrailer |
const fedt_t * | theTrailer |
TEMPORARY helper class to interpret/create FED trailer words. FIXME: will be replaced by the xdaq implementation
TEMPORARY helper class to interpret/create FED trailer words. FIXME: will be replaced by the xdaq implementation
Definition at line 15 of file FEDTrailer.h.
FEDTrailer::FEDTrailer | ( | const unsigned char * | trailer | ) |
Constructor.
Definition at line 11 of file FEDTrailer.cc.
: theTrailer(reinterpret_cast<const fedt_t*>(trailer)) {}
FEDTrailer::~FEDTrailer | ( | ) | [virtual] |
FEDTrailer::FEDTrailer | ( | const unsigned char * | trailer | ) |
Constructor.
virtual FEDTrailer::~FEDTrailer | ( | ) | [virtual] |
Destructor.
bool FEDTrailer::check | ( | ) |
Definition at line 66 of file FEDTrailer.cc.
References fedt_struct::eventsize, FED_TCTRLID, FED_TCTRLID_MASK, query::result, and theTrailer.
Referenced by ErrorChecker::checkTrailer(), ESUnpacker::interpretRawData(), DTDDUUnpacker::interpretRawData(), DTSpyReader::isTrailer(), DTDDUFileReader::isTrailer(), DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), HcalRawDataMonitor::unpack(), CastorDataIntegrityMonitor::unpack(), and HcalDataIntegrityTask::unpack().
{ // ...may report with finer detail bool result = true; result &= ((theTrailer->eventsize & FED_TCTRLID_MASK) == FED_TCTRLID); return result; }
bool FEDTrailer::check | ( | ) |
int FEDTrailer::crc | ( | ) |
Cyclic Redundancy Code of the event fragment including header and trailer.
int FEDTrailer::crc | ( | ) |
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition at line 24 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_CRCS_MASK, FED_CRCS_SHIFT, and theTrailer.
Referenced by RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
{ return ((theTrailer->conscheck & FED_CRCS_MASK) >> FED_CRCS_SHIFT); }
int FEDTrailer::evtStatus | ( | ) |
Event fragment status information.
int FEDTrailer::evtStatus | ( | ) |
Event fragment status information.
Definition at line 29 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_STAT_MASK, FED_STAT_SHIFT, and theTrailer.
Referenced by RPCUnpackingModule::produce(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
{ return ((theTrailer->conscheck & FED_STAT_MASK) >> FED_STAT_SHIFT); }
int FEDTrailer::lenght | ( | ) |
The length of the event fragment counted in 64-bit words including header and trailer.
Definition at line 19 of file FEDTrailer.cc.
References fedt_struct::eventsize, FED_EVSZ_MASK, FED_EVSZ_SHIFT, and theTrailer.
Referenced by ErrorChecker::checkTrailer(), ESUnpacker::interpretRawData(), DTDDUUnpacker::interpretRawData(), DTSpyReader::isTrailer(), DTDDUFileReader::isTrailer(), DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), HcalRawDataMonitor::unpack(), CastorDataIntegrityMonitor::unpack(), HcalDataIntegrityTask::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
{ return (theTrailer->eventsize & FED_EVSZ_MASK) >> FED_EVSZ_SHIFT; }
int FEDTrailer::lenght | ( | ) |
The length of the event fragment counted in 64-bit words including header and trailer.
bool FEDTrailer::moreTrailers | ( | ) |
0 -> the current trailer word is the last one. 1-> other trailer words can follow (always 0 for ECAL)
Definition at line 39 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_MORE_TRAILERS, and theTrailer.
Referenced by ErrorChecker::checkTrailer(), ESUnpacker::interpretRawData(), RPCUnpackingModule::produce(), HcalRawDataMonitor::unpack(), CastorDataIntegrityMonitor::unpack(), HcalDataIntegrityTask::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
{ return ((theTrailer->conscheck & FED_MORE_TRAILERS)!=0); }
bool FEDTrailer::moreTrailers | ( | ) |
0 -> the current trailer word is the last one. 1-> other trailer words can follow (always 0 for ECAL)
void FEDTrailer::set | ( | unsigned char * | trailer, |
int | evt_lgth, | ||
int | crc, | ||
int | evt_stat, | ||
int | tts, | ||
bool | T = false |
||
) | [static] |
Set all fields in the trailer.
Definition at line 44 of file FEDTrailer.cc.
References fedt_struct::conscheck, fedt_struct::eventsize, FED_CRCS_SHIFT, FED_EVSZ_SHIFT, FED_MORE_TRAILERS, FED_STAT_SHIFT, FED_TCTRLID, FED_TTSI_SHIFT, and lumiQTWidget::t.
Referenced by ESDataFormatterV4::DigiToRaw(), ESDataFormatterV1_1::DigiToRaw(), PixelDataFormatter::formatRawData(), CastorCtdcPacker::pack(), HcalPacker::pack(), CastorPacker::pack(), L1GTDigiToRaw::packTrailer(), L1GTEvmDigiToRaw::packTrailer(), CSCTFPacker::produce(), GctDigiToRaw::produce(), DTDigiToRawModule::produce(), and RPCPackingModule::rawData().
{ // FIXME: should check that input ranges are OK!!! fedt_t* t = reinterpret_cast<fedt_t*>(trailer); t->eventsize = FED_TCTRLID | evt_lgth << FED_EVSZ_SHIFT; t->conscheck = crc << FED_CRCS_SHIFT | evt_stat << FED_STAT_SHIFT | tts << FED_TTSI_SHIFT; if (T) t->conscheck |= FED_MORE_TRAILERS; }
static void FEDTrailer::set | ( | unsigned char * | trailer, |
int | evt_lgth, | ||
int | crc, | ||
int | evt_stat, | ||
int | tts, | ||
bool | T = false |
||
) | [static] |
Set all fields in the trailer.
int FEDTrailer::ttsBits | ( | ) |
Current value of the Trigger Throttling System bitsAQ).
int FEDTrailer::ttsBits | ( | ) |
Current value of the Trigger Throttling System bitsAQ).
Definition at line 34 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_TTSI_MASK, FED_TTSI_SHIFT, and theTrailer.
Referenced by DTDataIntegrityTask::processFED(), RPCUnpackingModule::produce(), HcalRawDataMonitor::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
{ return ((theTrailer->conscheck & FED_TTSI_MASK) >> FED_TTSI_SHIFT); }
const fedt_struct* FEDTrailer::theTrailer [private] |
Definition at line 52 of file FEDTrailer.h.
Referenced by check(), crc(), evtStatus(), lenght(), moreTrailers(), and ttsBits().
const fedt_t* FEDTrailer::theTrailer [private] |
Definition at line 53 of file FEDTrailer.h.