#include <SiStripFEDBufferComponents.h>
Public Member Functions | |
bool | feDataMissingFlag (const uint8_t internalFEUnitNum) const |
FEDStatusRegister (const FEDBufferState qdrMemoryBufferState=BUFFER_STATE_UNSET, const FEDBufferState l1aBxFIFOBufferState=BUFFER_STATE_UNSET, const bool trackerHeaderMonitorDataReadyFlagSet=false, const bool slinkFullFlagSet=false) | |
FEDStatusRegister (const uint16_t fedStatusRegister) | |
bool | l1aBxFIFOEmptyFlag () const |
bool | l1aBxFIFOFullFlag () const |
bool | l1aBxFIFOPartialFullFlag () const |
FEDBufferState | l1aBxFIFOState () const |
operator uint16_t () const | |
void | print (std::ostream &os) const |
void | printFlags (std::ostream &os) const |
bool | qdrMemoryEmptyFlag () const |
bool | qdrMemoryFullFlag () const |
bool | qdrMemoryPartialFullFlag () const |
FEDBufferState | qdrMemoryState () const |
FEDStatusRegister & | setL1ABXFIFOBufferState (const FEDBufferState state) |
FEDStatusRegister & | setQDRMemoryBufferState (const FEDBufferState state) |
FEDStatusRegister & | setSLinkFullFlag (const bool bitSet) |
FEDStatusRegister & | setTrackerHeaderMonitorDataReadyFlag (const bool bitSet) |
bool | slinkFullFlag () const |
bool | trackerHeaderMonitorDataReadyFlag () const |
Private Member Functions | |
bool | getBit (const uint8_t num) const |
void | setBit (const uint8_t num, const bool bitSet) |
void | setL1ABXFIFOEmptyFlag (const bool bitSet) |
void | setL1ABXFIFOFullFlag (const bool bitSet) |
void | setL1ABXFIFOPartialFullFlag (const bool bitSet) |
void | setQDRMemoryEmptyFlag (const bool bitSet) |
void | setQDRMemoryFullFlag (const bool bitSet) |
void | setQDRMemoryPartialFullFlag (const bool bitSet) |
Private Attributes | |
uint16_t | data_ |
Definition at line 218 of file SiStripFEDBufferComponents.h.
sistrip::FEDStatusRegister::FEDStatusRegister | ( | const uint16_t | fedStatusRegister | ) | [inline] |
Definition at line 783 of file SiStripFEDBufferComponents.h.
: data_(fedStatusRegister) { }
sistrip::FEDStatusRegister::FEDStatusRegister | ( | const FEDBufferState | qdrMemoryBufferState = BUFFER_STATE_UNSET , |
const FEDBufferState | l1aBxFIFOBufferState = BUFFER_STATE_UNSET , |
||
const bool | trackerHeaderMonitorDataReadyFlagSet = false , |
||
const bool | slinkFullFlagSet = false |
||
) | [inline] |
Definition at line 848 of file SiStripFEDBufferComponents.h.
References setL1ABXFIFOBufferState(), setQDRMemoryBufferState(), setSLinkFullFlag(), and setTrackerHeaderMonitorDataReadyFlag().
: data_(0x0000) { setSLinkFullFlag(slinkFullFlagSet); setTrackerHeaderMonitorDataReadyFlag(trackerHeaderMonitorDataReadyFlagSet); setQDRMemoryBufferState(qdrMemoryBufferState); setL1ABXFIFOBufferState(l1aBxFIFOBufferState); }
bool sistrip::FEDStatusRegister::feDataMissingFlag | ( | const uint8_t | internalFEUnitNum | ) | const [inline] |
Definition at line 816 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by sistrip::FEDBuffer::FEDBuffer(), and printFlags().
{ return getBit(8+internalFEUnitNum); }
bool sistrip::FEDStatusRegister::getBit | ( | const uint8_t | num | ) | const [inline, private] |
Definition at line 789 of file SiStripFEDBufferComponents.h.
References data_.
Referenced by feDataMissingFlag(), l1aBxFIFOEmptyFlag(), l1aBxFIFOFullFlag(), l1aBxFIFOPartialFullFlag(), qdrMemoryEmptyFlag(), qdrMemoryFullFlag(), qdrMemoryPartialFullFlag(), slinkFullFlag(), and trackerHeaderMonitorDataReadyFlag().
bool sistrip::FEDStatusRegister::l1aBxFIFOEmptyFlag | ( | ) | const [inline] |
Definition at line 813 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by l1aBxFIFOState(), and printFlags().
{ return getBit(7); }
bool sistrip::FEDStatusRegister::l1aBxFIFOFullFlag | ( | ) | const [inline] |
Definition at line 807 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by l1aBxFIFOState(), and printFlags().
{ return getBit(5); }
bool sistrip::FEDStatusRegister::l1aBxFIFOPartialFullFlag | ( | ) | const [inline] |
Definition at line 810 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by l1aBxFIFOState(), and printFlags().
{ return getBit(6); }
FEDBufferState sistrip::FEDStatusRegister::l1aBxFIFOState | ( | ) | const |
Definition at line 462 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, l1aBxFIFOEmptyFlag(), l1aBxFIFOFullFlag(), l1aBxFIFOPartialFullFlag(), and query::result.
{ uint8_t result(0x00); if (l1aBxFIFOFullFlag()) result |= BUFFER_STATE_FULL; if (l1aBxFIFOPartialFullFlag()) result |= BUFFER_STATE_PARTIAL_FULL; if (l1aBxFIFOEmptyFlag()) result |= BUFFER_STATE_EMPTY; return FEDBufferState(result); }
sistrip::FEDStatusRegister::operator uint16_t | ( | ) | const [inline] |
void sistrip::FEDStatusRegister::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 821 of file SiStripFEDBufferComponents.h.
References data_, and sistrip::printHex().
Referenced by sistrip::operator<<().
void sistrip::FEDStatusRegister::printFlags | ( | std::ostream & | os | ) | const |
Definition at line 438 of file SiStripFEDBufferComponents.cc.
References feDataMissingFlag(), sistrip::FEUNITS_PER_FED, l1aBxFIFOEmptyFlag(), l1aBxFIFOFullFlag(), l1aBxFIFOPartialFullFlag(), qdrMemoryEmptyFlag(), qdrMemoryFullFlag(), qdrMemoryPartialFullFlag(), slinkFullFlag(), and trackerHeaderMonitorDataReadyFlag().
Referenced by sistrip::FEDBufferBase::print().
{ if (slinkFullFlag()) os << "SLINK_FULL "; if (trackerHeaderMonitorDataReadyFlag()) os << "HEADER_MONITOR_READY "; if (qdrMemoryFullFlag()) os << "QDR_FULL "; if (qdrMemoryPartialFullFlag()) os << "QDR_PARTIAL_FULL "; if (qdrMemoryEmptyFlag()) os << "QDR_EMPTY "; if (l1aBxFIFOFullFlag()) os << "L1A_FULL "; if (l1aBxFIFOPartialFullFlag()) os << "L1A_PARTIAL_FULL "; if (l1aBxFIFOEmptyFlag()) os << "L1A_EMPTY "; for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) { if (feDataMissingFlag(iFE)) os << "FEUNIT" << uint16_t(iFE) << "MISSING "; } }
bool sistrip::FEDStatusRegister::qdrMemoryEmptyFlag | ( | ) | const [inline] |
Definition at line 804 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags(), and qdrMemoryState().
{ return getBit(4); }
bool sistrip::FEDStatusRegister::qdrMemoryFullFlag | ( | ) | const [inline] |
Definition at line 798 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags(), and qdrMemoryState().
{ return getBit(2); }
bool sistrip::FEDStatusRegister::qdrMemoryPartialFullFlag | ( | ) | const [inline] |
Definition at line 801 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags(), and qdrMemoryState().
{ return getBit(3); }
FEDBufferState sistrip::FEDStatusRegister::qdrMemoryState | ( | ) | const |
Definition at line 453 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, qdrMemoryEmptyFlag(), qdrMemoryFullFlag(), qdrMemoryPartialFullFlag(), and query::result.
{ uint8_t result(0x00); if (qdrMemoryFullFlag()) result |= BUFFER_STATE_FULL; if (qdrMemoryPartialFullFlag()) result |= BUFFER_STATE_PARTIAL_FULL; if (qdrMemoryEmptyFlag()) result |= BUFFER_STATE_EMPTY; return FEDBufferState(result); }
void sistrip::FEDStatusRegister::setBit | ( | const uint8_t | num, |
const bool | bitSet | ||
) | [private] |
Definition at line 471 of file SiStripFEDBufferComponents.cc.
References data_.
Referenced by setL1ABXFIFOEmptyFlag(), setL1ABXFIFOFullFlag(), setL1ABXFIFOPartialFullFlag(), setQDRMemoryEmptyFlag(), setQDRMemoryFullFlag(), setQDRMemoryPartialFullFlag(), setSLinkFullFlag(), and setTrackerHeaderMonitorDataReadyFlag().
FEDStatusRegister & sistrip::FEDStatusRegister::setL1ABXFIFOBufferState | ( | const FEDBufferState | state | ) |
Definition at line 498 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, sistrip::BUFFER_STATE_UNSET, Exception, sistrip::printHex(), setL1ABXFIFOEmptyFlag(), setL1ABXFIFOFullFlag(), and setL1ABXFIFOPartialFullFlag().
Referenced by FEDStatusRegister().
{ switch (state) { case BUFFER_STATE_FULL: case BUFFER_STATE_PARTIAL_FULL: case BUFFER_STATE_EMPTY: case BUFFER_STATE_UNSET: break; default: std::ostringstream ss; ss << "Invalid buffer state: "; printHex(&state,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } setL1ABXFIFOFullFlag(state & BUFFER_STATE_FULL); setL1ABXFIFOPartialFullFlag(state & BUFFER_STATE_PARTIAL_FULL); setL1ABXFIFOEmptyFlag(state & BUFFER_STATE_EMPTY); return *this; }
void sistrip::FEDStatusRegister::setL1ABXFIFOEmptyFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 845 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setL1ABXFIFOBufferState().
{ setBit(7,bitSet); }
void sistrip::FEDStatusRegister::setL1ABXFIFOFullFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 839 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setL1ABXFIFOBufferState().
{ setBit(5,bitSet); }
void sistrip::FEDStatusRegister::setL1ABXFIFOPartialFullFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 842 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setL1ABXFIFOBufferState().
{ setBit(6,bitSet); }
FEDStatusRegister & sistrip::FEDStatusRegister::setQDRMemoryBufferState | ( | const FEDBufferState | state | ) |
Definition at line 478 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, sistrip::BUFFER_STATE_UNSET, Exception, sistrip::printHex(), setQDRMemoryEmptyFlag(), setQDRMemoryFullFlag(), and setQDRMemoryPartialFullFlag().
Referenced by FEDStatusRegister().
{ switch (state) { case BUFFER_STATE_FULL: case BUFFER_STATE_PARTIAL_FULL: case BUFFER_STATE_EMPTY: case BUFFER_STATE_UNSET: break; default: std::ostringstream ss; ss << "Invalid buffer state: "; printHex(&state,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } setQDRMemoryFullFlag(state & BUFFER_STATE_FULL); setQDRMemoryPartialFullFlag(state & BUFFER_STATE_PARTIAL_FULL); setQDRMemoryEmptyFlag(state & BUFFER_STATE_EMPTY); return *this; }
void sistrip::FEDStatusRegister::setQDRMemoryEmptyFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 836 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setQDRMemoryBufferState().
{ setBit(4,bitSet); }
void sistrip::FEDStatusRegister::setQDRMemoryFullFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 830 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setQDRMemoryBufferState().
{ setBit(2,bitSet); }
void sistrip::FEDStatusRegister::setQDRMemoryPartialFullFlag | ( | const bool | bitSet | ) | [inline, private] |
Definition at line 833 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by setQDRMemoryBufferState().
{ setBit(3,bitSet); }
FEDStatusRegister & sistrip::FEDStatusRegister::setSLinkFullFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 824 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDStatusRegister().
{ setBit(0,bitSet); return *this; }
FEDStatusRegister & sistrip::FEDStatusRegister::setTrackerHeaderMonitorDataReadyFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 827 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDStatusRegister().
{ setBit(1,bitSet); return *this; }
bool sistrip::FEDStatusRegister::slinkFullFlag | ( | ) | const [inline] |
Definition at line 792 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(0); }
bool sistrip::FEDStatusRegister::trackerHeaderMonitorDataReadyFlag | ( | ) | const [inline] |
Definition at line 795 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(1); }
uint16_t sistrip::FEDStatusRegister::data_ [private] |
Definition at line 254 of file SiStripFEDBufferComponents.h.
Referenced by getBit(), operator uint16_t(), print(), and setBit().