#include <SiStripFEDBufferComponents.h>
Public Member Functions | |
bool | badSourceID () const |
bool | cBit () const |
uint16_t | crc () const |
const uint8_t * | data () const |
uint8_t | eoeNibble () const |
uint32_t | eventLengthIn64BitWords () const |
uint32_t | eventLengthInBytes () const |
uint8_t | eventStatusNibble () const |
bool | fBit () const |
FEDDAQTrailer (const uint8_t *trailer) | |
FEDDAQTrailer () | |
FEDDAQTrailer (const uint32_t eventLengthIn64BitWords, const uint16_t crc=0, const FEDTTSBits ttsBits=TTS_READY, const bool slinkTransmissionError=false, const bool badFEDID=false, const bool slinkCRCError=false, const uint8_t eventStatusNibble=0) | |
bool | lastTrailer () const |
void | print (std::ostream &os) const |
bool | rBit () const |
FEDDAQTrailer & | setBadSourceIDBit (const bool bitSet) |
FEDDAQTrailer & | setCRC (const uint16_t crc) |
FEDDAQTrailer & | setEventLengthIn64BitWords (const uint32_t eventLengthIn64BitWords) |
FEDDAQTrailer & | setEventStatusNibble (const uint8_t eventStatusNibble) |
FEDDAQTrailer & | setSLinkCRCErrorBit (const bool bitSet) |
FEDDAQTrailer & | setSLinkTransmissionErrorBit (const bool bitSet) |
FEDDAQTrailer & | setTTSBits (const FEDTTSBits ttsBits) |
bool | slinkCRCError () const |
bool | slinkTransmissionError () const |
bool | tBit () const |
FEDTTSBits | ttsBits () const |
uint8_t | ttsNibble () const |
Private Attributes | |
uint8_t | trailer_ [8] |
Definition at line 176 of file SiStripFEDBufferComponents.h.
sistrip::FEDDAQTrailer::FEDDAQTrailer | ( | ) | [inline] |
Definition at line 179 of file SiStripFEDBufferComponents.h.
{ }
sistrip::FEDDAQTrailer::FEDDAQTrailer | ( | const uint8_t * | trailer | ) | [inline, explicit] |
Definition at line 1260 of file SiStripFEDBufferComponents.h.
References trailer_.
{ memcpy(trailer_,trailer,8); }
sistrip::FEDDAQTrailer::FEDDAQTrailer | ( | const uint32_t | eventLengthIn64BitWords, |
const uint16_t | crc = 0 , |
||
const FEDTTSBits | ttsBits = TTS_READY , |
||
const bool | slinkTransmissionError = false , |
||
const bool | badFEDID = false , |
||
const bool | slinkCRCError = false , |
||
const uint8_t | eventStatusNibble = 0 |
||
) |
Definition at line 888 of file SiStripFEDBufferComponents.cc.
References setBadSourceIDBit(), setCRC(), setEventLengthIn64BitWords(), setEventStatusNibble(), setSLinkCRCErrorBit(), setSLinkTransmissionErrorBit(), setTTSBits(), and trailer_.
{ //clear everything (T,x,$ all set to 0) memset(trailer_,0x0,8); //set the EoE nibble to indicate this is the last fragment trailer_[7] = 0xA0; //set variable fields vith values supplied setEventLengthIn64BitWords(eventLengthIn64BitWords); setEventStatusNibble(eventStatusNibble); setTTSBits(ttsBits); setCRC(crc); setSLinkTransmissionErrorBit(slinkTransmissionError); setBadSourceIDBit(badFEDID); setSLinkCRCErrorBit(slinkCRCError); }
bool sistrip::FEDDAQTrailer::badSourceID | ( | ) | const [inline] |
Definition at line 191 of file SiStripFEDBufferComponents.h.
References fBit().
Referenced by sistrip::FEDBufferBase::checkNoUnexpectedSourceID().
{ return fBit(); }
bool sistrip::FEDDAQTrailer::cBit | ( | ) | const [inline] |
Definition at line 1285 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by slinkTransmissionError().
{ return (trailer_[1] & 0x80); }
uint16_t sistrip::FEDDAQTrailer::crc | ( | void | ) | const [inline] |
Definition at line 1280 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by sistrip::FEDBufferBase::daqCRC().
const uint8_t * sistrip::FEDDAQTrailer::data | ( | ) | const [inline] |
Definition at line 1320 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by sistrip::FEDBufferGenerator::fillBuffer().
{ return trailer_; }
uint8_t sistrip::FEDDAQTrailer::eoeNibble | ( | ) | const [inline] |
Definition at line 1265 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by sistrip::FEDBufferBase::checkNoExtraHeadersOrTrailers().
{ return ( (trailer_[7] & 0xF0) >> 4 ); }
uint32_t sistrip::FEDDAQTrailer::eventLengthIn64BitWords | ( | ) | const [inline] |
Definition at line 1270 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by sistrip::FEDBufferBase::daqEventLengthIn64bitWords(), and eventLengthInBytes().
uint32_t sistrip::FEDDAQTrailer::eventLengthInBytes | ( | ) | const [inline] |
Definition at line 1275 of file SiStripFEDBufferComponents.h.
References eventLengthIn64BitWords().
Referenced by sistrip::FEDBufferBase::daqEventLengthInBytes().
{ return eventLengthIn64BitWords()*8; }
uint8_t sistrip::FEDDAQTrailer::eventStatusNibble | ( | ) | const [inline] |
Definition at line 1295 of file SiStripFEDBufferComponents.h.
References trailer_.
{ return (trailer_[1] & 0x0F); }
bool sistrip::FEDDAQTrailer::fBit | ( | ) | const [inline] |
Definition at line 1290 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by badSourceID().
{ return (trailer_[1] & 0x40); }
bool sistrip::FEDDAQTrailer::lastTrailer | ( | ) | const [inline] |
void sistrip::FEDDAQTrailer::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 1315 of file SiStripFEDBufferComponents.h.
References sistrip::printHex(), and trailer_.
Referenced by sistrip::operator<<().
bool sistrip::FEDDAQTrailer::rBit | ( | ) | const [inline] |
Definition at line 1310 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by slinkCRCError().
{ return (trailer_[0] & 0x04); }
FEDDAQTrailer & sistrip::FEDDAQTrailer::setBadSourceIDBit | ( | const bool | bitSet | ) |
Definition at line 928 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer().
FEDDAQTrailer & sistrip::FEDDAQTrailer::setCRC | ( | const uint16_t | crc | ) |
Definition at line 914 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer(), and sistrip::FEDBufferGenerator::fillBuffer().
FEDDAQTrailer & sistrip::FEDDAQTrailer::setEventLengthIn64BitWords | ( | const uint32_t | eventLengthIn64BitWords | ) |
Definition at line 906 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer(), and sistrip::FEDBufferGenerator::fillBuffer().
{ trailer_[4] = (eventLengthIn64BitWords & 0x000000FF); trailer_[5] = ( (eventLengthIn64BitWords & 0x0000FF00) >> 8); trailer_[6] = ( (eventLengthIn64BitWords & 0x00FF0000) >> 16); return *this; }
FEDDAQTrailer & sistrip::FEDDAQTrailer::setEventStatusNibble | ( | const uint8_t | eventStatusNibble | ) |
Definition at line 942 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer().
{ trailer_[1] = ( (trailer_[1] & 0xF0) | (eventStatusNibble & 0x0F) ); return *this; }
FEDDAQTrailer & sistrip::FEDDAQTrailer::setSLinkCRCErrorBit | ( | const bool | bitSet | ) |
Definition at line 935 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer().
FEDDAQTrailer & sistrip::FEDDAQTrailer::setSLinkTransmissionErrorBit | ( | const bool | bitSet | ) |
Definition at line 921 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer().
FEDDAQTrailer & sistrip::FEDDAQTrailer::setTTSBits | ( | const FEDTTSBits | ttsBits | ) |
Definition at line 948 of file SiStripFEDBufferComponents.cc.
References trailer_.
Referenced by FEDDAQTrailer().
bool sistrip::FEDDAQTrailer::slinkCRCError | ( | ) | const [inline] |
Definition at line 200 of file SiStripFEDBufferComponents.h.
References rBit().
Referenced by sistrip::FEDBufferBase::checkNoSlinkCRCError().
{ return rBit(); }
bool sistrip::FEDDAQTrailer::slinkTransmissionError | ( | ) | const [inline] |
Definition at line 188 of file SiStripFEDBufferComponents.h.
References cBit().
Referenced by sistrip::FEDBufferBase::checkNoSLinkTransmissionError().
{ return cBit(); }
bool sistrip::FEDDAQTrailer::tBit | ( | ) | const [inline] |
Definition at line 1305 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by lastTrailer().
{ return (trailer_[0] & 0x08); }
FEDTTSBits sistrip::FEDDAQTrailer::ttsBits | ( | ) | const |
Definition at line 872 of file SiStripFEDBufferComponents.cc.
References sistrip::TTS_BUSY, sistrip::TTS_DISCONNECTED0, sistrip::TTS_DISCONNECTED1, sistrip::TTS_ERROR, sistrip::TTS_INVALID, sistrip::TTS_OUT_OF_SYNC, sistrip::TTS_READY, sistrip::TTS_WARN_OVERFLOW, and ttsNibble().
Referenced by sistrip::FEDBufferBase::daqTTSState().
{ switch(ttsNibble()) { case TTS_DISCONNECTED0: case TTS_WARN_OVERFLOW: case TTS_OUT_OF_SYNC: case TTS_BUSY: case TTS_READY: case TTS_ERROR: case TTS_DISCONNECTED1: return FEDTTSBits(ttsNibble()); default: return TTS_INVALID; } }
uint8_t sistrip::FEDDAQTrailer::ttsNibble | ( | ) | const [inline] |
Definition at line 1300 of file SiStripFEDBufferComponents.h.
References trailer_.
Referenced by ttsBits().
{ return ( (trailer_[0] & 0xF0) >> 4); }
uint8_t sistrip::FEDDAQTrailer::trailer_[8] [private] |
Definition at line 215 of file SiStripFEDBufferComponents.h.
Referenced by cBit(), crc(), data(), eoeNibble(), eventLengthIn64BitWords(), eventStatusNibble(), fBit(), FEDDAQTrailer(), print(), rBit(), setBadSourceIDBit(), setCRC(), setEventLengthIn64BitWords(), setEventStatusNibble(), setSLinkCRCErrorBit(), setSLinkTransmissionErrorBit(), setTTSBits(), tBit(), and ttsNibble().