#include <FEDTrailer.h>
Public Member Functions | |
bool | check () const |
Check that the trailer is OK. More... | |
uint32_t | conscheck () const |
Return the word containing the consistency checks. More... | |
uint16_t | crc () const |
Cyclic Redundancy Code of the event fragment including header and trailer. More... | |
bool | crcModified () const |
True if the CRC value has been modified by the S-link sender card. More... | |
uint8_t | evtStatus () const |
Event fragment status information. More... | |
FEDTrailer (const unsigned char *trailer) | |
Constructor. More... | |
uint32_t | fragmentLength () const |
The length of the event fragment counted in 64-bit words including header and trailer. More... | |
bool | moreTrailers () const |
bool | slinkError () const |
True if the FRL has detected a transmission error over the s-link cable. More... | |
uint8_t | ttsBits () const |
Current value of the Trigger Throttling System bits. More... | |
bool | wrongFedId () const |
True if the FED_ID given by the FED is not the one expected by the FRL. More... | |
virtual | ~FEDTrailer () |
Destructor. More... | |
Static Public Member Functions | |
static void | set (unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false) |
Set all fields in the trailer. More... | |
Static Public Attributes | |
static const uint32_t | length = sizeof(fedt_t) |
Private Attributes | |
const fedt_struct * | theTrailer |
Helper class to interpret/create FED trailer words.
Definition at line 14 of file FEDTrailer.h.
FEDTrailer::FEDTrailer | ( | const unsigned char * | trailer | ) |
|
virtual |
bool FEDTrailer::check | ( | ) | const |
Check that the trailer is OK.
Definition at line 45 of file FEDTrailer.cc.
References fedt_struct::eventsize, FED_SLINK_END_MARKER, FED_TCTRLID_EXTRACT, and theTrailer.
Referenced by L1TMP7ZeroSupp::analyze(), ErrorCheckerBase::checkTrailer(), RPixErrorChecker::checkTrailer(), DTDDUUnpacker::interpretRawData(), ESUnpacker::interpretRawData(), DTDDUFileReader::isTrailer(), DTSpyReader::isTrailer(), RPCAMCRawToDigi::processCDFTrailers(), RPCTwinMuxRawToDigi::processCDFTrailers(), DTDataIntegrityROSOffline::processFED(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), omtf::OmtfUnpacker::produce(), and RctRawToDigi::unpack().
uint32_t FEDTrailer::conscheck | ( | ) | const |
Return the word containing the consistency checks.
Definition at line 29 of file FEDTrailer.cc.
References fedt_struct::conscheck, and theTrailer.
uint16_t FEDTrailer::crc | ( | ) | const |
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition at line 15 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_CRCS_EXTRACT, and theTrailer.
Referenced by L1TMP7ZeroSupp::analyze(), RPCAMCRawToDigi::produce(), RPCUnpackingModule::produce(), RPCTwinMuxRawToDigi::produce(), l1t::L1TRawToDigi::produce(), omtf::OmtfUnpacker::produce(), set(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
bool FEDTrailer::crcModified | ( | ) | const |
True if the CRC value has been modified by the S-link sender card.
Definition at line 23 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_CRC_MODIFIED_EXTRACT, and theTrailer.
Referenced by DTDDUData::checkCRCBit().
uint8_t FEDTrailer::evtStatus | ( | ) | const |
Event fragment status information.
Definition at line 17 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_STAT_EXTRACT, and theTrailer.
Referenced by L1TMP7ZeroSupp::analyze(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), omtf::OmtfUnpacker::produce(), set(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
uint32_t FEDTrailer::fragmentLength | ( | ) | const |
The length of the event fragment counted in 64-bit words including header and trailer.
Definition at line 13 of file FEDTrailer.cc.
References fedt_struct::eventsize, FED_EVSZ_EXTRACT, and theTrailer.
Referenced by L1TMP7ZeroSupp::analyze(), ErrorCheckerBase::checkTrailer(), RPixErrorChecker::checkTrailer(), DataModeFRD::fillFEDRawDataCollection(), FedRawDataInputSource::fillFEDRawDataCollection(), DataModeFRDStriped::fillFRDCollection(), DTDDUUnpacker::interpretRawData(), ESUnpacker::interpretRawData(), DTDDUFileReader::isTrailer(), DTSpyReader::isTrailer(), RPCAMCRawToDigi::processCDFTrailers(), RPCTwinMuxRawToDigi::processCDFTrailers(), DTDataIntegrityROSOffline::processFED(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), omtf::OmtfUnpacker::produce(), FRDStreamSource::setRunAndEventInfo(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
bool FEDTrailer::moreTrailers | ( | ) | const |
0 -> the current trailer word is the last one. 1 -> other trailer words can follow
Definition at line 21 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_MORE_TRAILERS_EXTRACT, and theTrailer.
Referenced by ErrorCheckerBase::checkTrailer(), RPixErrorChecker::checkTrailer(), ESUnpacker::interpretRawData(), RPCUnpackingModule::produce(), omtf::OmtfUnpacker::produce(), set(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
|
static |
Set all fields in the trailer.
Definition at line 31 of file FEDTrailer.cc.
References crc(), evtStatus(), FED_CRCS_MASK, FED_CRCS_SHIFT, FED_EVSZ_MASK, FED_EVSZ_SHIFT, FED_MORE_TRAILERS_SHIFT, FED_MORE_TRAILERS_WIDTH, FED_SLINK_END_MARKER, FED_STAT_MASK, FED_STAT_SHIFT, FED_TCTRLID_SHIFT, FED_TTSI_MASK, FED_TTSI_SHIFT, moreTrailers(), submitPVValidationJobs::t, and ttsBits().
Referenced by ESDataFormatterV1_1::DigiToRaw(), ESDataFormatterV4::DigiToRaw(), DaqFakeReader::fillFEDs(), DaqFakeReader::fillTCDSFED(), l1t::AMCDumpToRaw::formatRaw(), l1t::MP7BufferDumpToRaw::formatRaw(), CTPPSTotemDataFormatter::formatRawData(), PixelDataFormatter::formatRawData(), CTPPSPixelDataFormatter::formatRawData(), CastorPacker::pack(), CastorCtdcPacker::pack(), HcalPacker::pack(), L1GTEvmDigiToRaw::packTrailer(), L1GTDigiToRaw::packTrailer(), DTDigiToRawModule::produce(), CSCTFPacker::produce(), RPCTwinMuxDigiToRaw::produce(), GctDigiToRaw::produce(), HcalDigiToRawuHTR::produce(), l1t::L1TDigiToRaw::produce(), omtf::OmtfPacker::produce(), and RPCPackingModule::rawData().
bool FEDTrailer::slinkError | ( | ) | const |
True if the FRL has detected a transmission error over the s-link cable.
Definition at line 25 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_SLINK_ERROR_EXTRACT, and theTrailer.
uint8_t FEDTrailer::ttsBits | ( | ) | const |
Current value of the Trigger Throttling System bits.
Definition at line 19 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_TTSI_EXTRACT, and theTrailer.
Referenced by L1TMP7ZeroSupp::analyze(), RPCUnpackingModule::produce(), l1t::L1TRawToDigi::produce(), omtf::OmtfUnpacker::produce(), set(), RctRawToDigi::unpack(), L1GlobalTriggerEvmRawToDigi::unpackTrailer(), and L1GlobalTriggerRawToDigi::unpackTrailer().
bool FEDTrailer::wrongFedId | ( | ) | const |
True if the FED_ID given by the FED is not the one expected by the FRL.
Definition at line 27 of file FEDTrailer.cc.
References fedt_struct::conscheck, FED_WRONG_FEDID_EXTRACT, and theTrailer.
|
static |
Definition at line 57 of file FEDTrailer.h.
Referenced by DataModeFRD::fillFEDRawDataCollection(), FedRawDataInputSource::fillFEDRawDataCollection(), DataModeFRDStriped::fillFRDCollection(), GEMAMC13Status::GEMAMC13Status(), FRDStreamSource::setRunAndEventInfo(), and sistrip::RawToDigiUnpacker::triggerFed().
|
private |
Definition at line 60 of file FEDTrailer.h.
Referenced by check(), conscheck(), crc(), crcModified(), evtStatus(), fragmentLength(), moreTrailers(), slinkError(), ttsBits(), and wrongFedId().