#include <SiStripFEDBuffer.h>
Public Member Functions | |
bool | channelGood (const uint8_t internalFEDannelNum, const bool doAPVeCheck) const |
bool | checkAllChannelStatusBits () const |
bool | checkChannelLengths () const |
bool | checkChannelLengthsMatchBufferLength () const |
bool | checkChannelPacketCodes () const |
bool | checkFEPayloadsPresent () const |
bool | checkFEUnitAPVAddresses () const |
bool | checkFEUnitLengths () const |
bool | checkStatusBits (const uint8_t internalFEDChannelNum) const |
bool | checkStatusBits (const uint8_t internalFEUnitNum, const uint8_t internalChannelNum) const |
std::string | checkSummary () const override |
bool | doChecks (bool doCRC) const |
virtual bool | doCorruptBufferChecks () const |
FEDBuffer (const FEDRawData &fedBuffer, const bool allowBadBuffer=false) | |
bool | feGood (const uint8_t internalFEUnitNum) const |
bool | feGoodWithoutAPVEmulatorCheck (const uint8_t internalFEUnitNum) const |
const FEDFEHeader * | feHeader () const |
bool | fePresent (uint8_t internalFEUnitNum) const |
FEDBufferStatusCode | findChannels () |
void | print (std::ostream &os) const override |
void | setLegacyMode (bool legacy) |
~FEDBuffer () override | |
Public Member Functions inherited from sistrip::FEDBufferBase | |
uint8_t | apveAddress () const |
FEDBufferFormat | bufferFormat () const |
size_t | bufferSize () const |
uint16_t | calcCRC () const |
const FEDChannel & | channel (const uint8_t internalFEDChannelNum) const |
const FEDChannel & | channel (const uint8_t internalFEUnitNum, const uint8_t internalChannelNum) const |
virtual bool | channelGood (const uint8_t internalFEDChannelNum) const |
bool | channelGood (const uint8_t internalFEUnitNum, const uint8_t internalChannelNum) const |
bool | checkAPVEAddressValid () const |
bool | checkBufferFormat () const |
bool | checkCRC () const |
bool | checkHeaderType () const |
bool | checkLengthFromTrailer () const |
bool | checkMajorityAddresses () const |
bool | checkNoExtraHeadersOrTrailers () const |
bool | checkNoFEOverflows () const |
bool | checkNoSlinkCRCError () const |
bool | checkNoSLinkTransmissionError () const |
bool | checkNoUnexpectedSourceID () const |
bool | checkReadoutMode () const |
bool | checkSourceIDs () const |
uint16_t | daqBXID () const |
uint16_t | daqCRC () const |
uint32_t | daqEventLengthIn64bitWords () const |
uint32_t | daqEventLengthInBytes () const |
FEDDAQEventType | daqEventType () const |
FEDDAQHeader | daqHeader () const |
uint32_t | daqLvl1ID () const |
uint16_t | daqSourceID () const |
FEDDAQTrailer | daqTrailer () const |
FEDTTSBits | daqTTSState () const |
bool | doChecks () const |
bool | doDAQHeaderAndTrailerChecks () const |
bool | doTrackerSpecialHeaderChecks () const |
void | dump (std::ostream &os) const |
void | dumpOriginalBuffer (std::ostream &os) const |
FEDBufferBase (const FEDRawData &fedBuffer) | |
FEDStatusRegister | fedStatusRegister () const |
bool | feEnabled (const uint8_t internalFEUnitNum) const |
bool | feOverflow (const uint8_t internalFEUnitNum) const |
FEDHeaderType | headerType () const |
FEDLegacyReadoutMode | legacyReadoutMode () const |
bool | majorityAddressErrorForFEUnit (const uint8_t internalFEUnitNum) const |
uint8_t | nFEUnitsEnabled () const |
uint8_t | packetCode (bool legacy=false, const uint8_t internalFEDChannelNum=0) const |
FEDReadoutMode | readoutMode () const |
uint16_t | sourceID () const |
TrackerSpecialHeader | trackerSpecialHeader () const |
virtual | ~FEDBufferBase () |
Private Member Functions | |
uint16_t | calculateFEUnitLength (const uint8_t internalFEUnitNumber) const |
uint8_t | getCorrectPacketCode () const |
uint8_t | nFEUnitsPresent () const |
Private Attributes | |
std::unique_ptr< FEDFEHeader > | feHeader_ |
bool | fePresent_ [FEUNITS_PER_FED] |
bool | legacyUnpacker_ = false |
uint16_t | payloadLength_ |
const uint8_t * | payloadPointer_ |
uint8_t | validChannels_ |
Additional Inherited Members | |
Protected Member Functions inherited from sistrip::FEDBufferBase | |
FEDBufferBase (const FEDRawData &fedBuffer, const bool fillChannelVector) | |
const uint8_t * | getPointerToByteAfterEndOfPayload () const |
const uint8_t * | getPointerToDataAfterTrackerSpecialHeader () const |
Protected Attributes inherited from sistrip::FEDBufferBase | |
std::vector< FEDChannel > | channels_ |
Definition at line 24 of file SiStripFEDBuffer.h.
|
explicit |
constructor from a FEDRawData buffer
The sistrip::preconstructCheckFEDBuffer() method should be used (with the same value of allowBadBuffer) to check the validity of fedBuffer before constructing a sistrip::FEDBuffer. If allowBadBuffer is set to true, the initialization proceeds even if the event format is not recognized. To initialize also the channel information, the FEDBuffer::findChannels() method should be called as well, and its return status checked (unless bad buffers, with an unrecognized event format or channel lengths that do not make sense, should also be included).
Definition at line 13 of file SiStripFEDBuffer.cc.
References sistrip::FEDBufferBase::channels_, sistrip::FEDStatusRegister::feDataMissingFlag(), sistrip::FEDCH_PER_FED, sistrip::FEDBufferBase::fedStatusRegister(), feHeader_, sistrip::FEDFullDebugHeader::fePresent(), fePresent_, sistrip::FEUNITS_PER_FED, sistrip::FEDBufferBase::getPointerToByteAfterEndOfPayload(), sistrip::FEDBufferBase::getPointerToDataAfterTrackerSpecialHeader(), sistrip::HEADER_TYPE_INVALID, sistrip::HEADER_TYPE_NONE, sistrip::FEDBufferBase::headerType(), sistrip::FEDFEHeader::newFEHeader(), payloadLength_, payloadPointer_, and validChannels_.
|
inlineoverride |
Definition at line 42 of file SiStripFEDBuffer.h.
|
private |
Definition at line 257 of file SiStripFEDBuffer.cc.
References sistrip::FEDBufferBase::channels_, sistrip::FEDCH_PER_FEUNIT, and sistrip::internalFEDChannelNum().
Referenced by checkFEUnitLengths(), and checkSummary().
|
inline |
Definition at line 156 of file SiStripFEDBuffer.h.
References checkStatusBits(), sistrip::FEDCH_PER_FEUNIT, feGood(), feGoodWithoutAPVEmulatorCheck(), sistrip::internalFEDChannelNum(), sistrip::READOUT_MODE_SCOPE, sistrip::FEDBufferBase::readoutMode(), and validChannels_.
Referenced by checkChannelPacketCodes().
bool sistrip::FEDBuffer::checkAllChannelStatusBits | ( | ) | const |
Definition at line 149 of file SiStripFEDBuffer.cc.
References checkStatusBits(), sistrip::FEDCH_PER_FED, sistrip::FEDCH_PER_FEUNIT, and feGood().
Referenced by checkSummary().
bool sistrip::FEDBuffer::checkChannelLengths | ( | ) | const |
Definition at line 164 of file SiStripFEDBuffer.cc.
References sistrip::FEDCH_PER_FED, and validChannels_.
Referenced by checkChannelLengthsMatchBufferLength().
bool sistrip::FEDBuffer::checkChannelLengthsMatchBufferLength | ( | ) | const |
Definition at line 166 of file SiStripFEDBuffer.cc.
References sistrip::FEDBufferBase::channels_, checkChannelLengths(), sistrip::FEDCH_PER_FEUNIT, sistrip::FEDBufferBase::feEnabled(), fePresent(), sistrip::internalFEDChannelNum(), sistrip::FEDChannel::length(), sistrip::FEDChannel::offset(), and payloadLength_.
Referenced by checkSummary(), and doCorruptBufferChecks().
bool sistrip::FEDBuffer::checkChannelPacketCodes | ( | ) | const |
Definition at line 197 of file SiStripFEDBuffer.cc.
References channelGood(), sistrip::FEDBufferBase::channels_, sistrip::FEDCH_PER_FED, sistrip::FEDCH_PER_FEUNIT, feGood(), getCorrectPacketCode(), and sistrip::FEDBufferBase::packetCode().
Referenced by checkSummary(), and doCorruptBufferChecks().
bool sistrip::FEDBuffer::checkFEPayloadsPresent | ( | ) | const |
Definition at line 266 of file SiStripFEDBuffer.cc.
References fePresent(), and sistrip::FEUNITS_PER_FED.
Referenced by checkSummary().
bool sistrip::FEDBuffer::checkFEUnitAPVAddresses | ( | ) | const |
Definition at line 219 of file SiStripFEDBuffer.cc.
References sistrip::FEDBufferBase::apveAddress(), feGood(), feHeader_, sistrip::FEDFullDebugHeader::feUnitMajorityAddress(), and sistrip::FEUNITS_PER_FED.
Referenced by checkSummary().
bool sistrip::FEDBuffer::checkFEUnitLengths | ( | ) | const |
Definition at line 241 of file SiStripFEDBuffer.cc.
References calculateFEUnitLength(), feGood(), feHeader_, sistrip::FEDFullDebugHeader::feUnitLength(), and sistrip::FEUNITS_PER_FED.
Referenced by checkSummary(), and doCorruptBufferChecks().
|
inline |
Definition at line 174 of file SiStripFEDBuffer.h.
References feHeader_, and sistrip::internalFEDChannelNum().
Referenced by channelGood(), checkAllChannelStatusBits(), checkStatusBits(), and checkSummary().
|
inline |
Definition at line 178 of file SiStripFEDBuffer.h.
References checkStatusBits(), and sistrip::internalFEDChannelNum().
|
overridevirtual |
Reimplemented from sistrip::FEDBufferBase.
Definition at line 274 of file SiStripFEDBuffer.cc.
References sistrip::FEDBufferBase::apveAddress(), calculateFEUnitLength(), sistrip::FEDBufferBase::channels_, checkAllChannelStatusBits(), checkChannelLengthsMatchBufferLength(), checkChannelPacketCodes(), checkFEPayloadsPresent(), checkFEUnitAPVAddresses(), checkFEUnitLengths(), checkStatusBits(), sistrip::FEDBufferBase::checkSummary(), sistrip::FEDCH_PER_FED, sistrip::FEDCH_PER_FEUNIT, feGood(), feHeader_, fePresent(), sistrip::FEDFullDebugHeader::feUnitLength(), sistrip::FEDFullDebugHeader::feUnitMajorityAddress(), sistrip::FEUNITS_PER_FED, sistrip::FEDFullDebugHeader::getChannelStatus(), getCorrectPacketCode(), sistrip::HEADER_TYPE_FULL_DEBUG, sistrip::FEDBufferBase::headerType(), sistrip::FEDBufferBase::packetCode(), and edmLumisInFiles::summary.
|
inline |
Definition at line 182 of file SiStripFEDBuffer.h.
References sistrip::FEDBufferBase::checkCRC(), sistrip::FEDBufferBase::doChecks(), sistrip::FEDCH_PER_FED, and validChannels_.
|
virtual |
Definition at line 142 of file SiStripFEDBuffer.cc.
References checkChannelLengthsMatchBufferLength(), checkChannelPacketCodes(), sistrip::FEDBufferBase::checkCRC(), and checkFEUnitLengths().
|
inline |
Definition at line 163 of file SiStripFEDBuffer.h.
References sistrip::FEDBufferBase::feOverflow(), fePresent(), and sistrip::FEDBufferBase::majorityAddressErrorForFEUnit().
Referenced by channelGood(), checkAllChannelStatusBits(), checkChannelPacketCodes(), checkFEUnitAPVAddresses(), checkFEUnitLengths(), and checkSummary().
|
inline |
Definition at line 168 of file SiStripFEDBuffer.h.
References sistrip::FEDBufferBase::feOverflow(), and fePresent().
Referenced by channelGood().
|
inline |
Definition at line 154 of file SiStripFEDBuffer.h.
References feHeader_.
Referenced by print(), and sistrip::RawToDigiUnpacker::updateEventSummary().
|
inline |
Definition at line 172 of file SiStripFEDBuffer.h.
References fePresent_.
Referenced by checkChannelLengthsMatchBufferLength(), checkFEPayloadsPresent(), checkSummary(), feGood(), feGoodWithoutAPVEmulatorCheck(), findChannels(), and nFEUnitsPresent().
FEDBufferStatusCode sistrip::FEDBuffer::findChannels | ( | ) |
Read the channel lengths from the payload
This method should be called to after the constructor (and should not be called more than once for the same sistrip::FEDBuffer). In case any check fails, a value different from sistrip::FEDBufferStatusCode::SUCCESS is returned, and detailed information printed to LogDebug("FEDBuffer"), if relevant.
Definition at line 48 of file SiStripFEDBuffer.cc.
References sistrip::CHANNEL_BEGIN_BEYOND_PAYLOAD, sistrip::CHANNEL_END_BEYOND_PAYLOAD, sistrip::CHANNEL_TOO_SHORT, sistrip::FEDBufferBase::channels_, sistrip::FEDCH_PER_FED, sistrip::FEDCH_PER_FEUNIT, sistrip::FEDBufferBase::feEnabled(), fePresent(), mps_fire::i, submitPVResolutionJobs::key, LogDebug, payloadLength_, payloadPointer_, sistrip::READOUT_MODE_PREMIX_RAW, sistrip::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_FAKE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT_CMOVERRIDE, sistrip::FEDBufferBase::readoutMode(), sistrip::SUCCESS, UNLIKELY, and validChannels_.
|
inlineprivate |
Definition at line 104 of file SiStripFEDBuffer.h.
References legacyUnpacker_, and sistrip::FEDBufferBase::packetCode().
Referenced by checkChannelPacketCodes(), and checkSummary().
|
private |
Definition at line 366 of file SiStripFEDBuffer.cc.
References fePresent(), sistrip::FEUNITS_PER_FED, and mps_fire::result.
Referenced by print().
|
overridevirtual |
Reimplemented from sistrip::FEDBufferBase.
Definition at line 375 of file SiStripFEDBuffer.cc.
References feHeader(), sistrip::HEADER_TYPE_FULL_DEBUG, sistrip::FEDBufferBase::headerType(), nFEUnitsPresent(), and sistrip::FEDBufferBase::print().
|
inline |
Definition at line 68 of file SiStripFEDBuffer.h.
References legacyUnpacker_.
|
private |
Definition at line 106 of file SiStripFEDBuffer.h.
Referenced by checkFEUnitAPVAddresses(), checkFEUnitLengths(), checkStatusBits(), checkSummary(), FEDBuffer(), and feHeader().
|
private |
Definition at line 110 of file SiStripFEDBuffer.h.
Referenced by FEDBuffer(), and fePresent().
|
private |
Definition at line 111 of file SiStripFEDBuffer.h.
Referenced by getCorrectPacketCode(), and setLegacyMode().
|
private |
Definition at line 108 of file SiStripFEDBuffer.h.
Referenced by checkChannelLengthsMatchBufferLength(), FEDBuffer(), and findChannels().
|
private |
Definition at line 107 of file SiStripFEDBuffer.h.
Referenced by FEDBuffer(), and findChannels().
|
private |
Definition at line 109 of file SiStripFEDBuffer.h.
Referenced by channelGood(), checkChannelLengths(), doChecks(), FEDBuffer(), and findChannels().