#include <HcalDCCHeader.h>
Public Member Functions | |
unsigned short | BOEshouldBe5Always () const |
short | BOEshouldBeZeroAlways () const |
void | clear () |
void | copySpigotData (unsigned int spigot_id, const HcalHTRData &data, bool valid=true, unsigned char LRB_error_word=0) |
Add the given HcalHTRData as the given spigot's data. This should be done in increasing spigot order! More... | |
int | getAcceptTimeTTS () const |
int | getBunchId () const |
bool | getBxMismatchWithDCC (unsigned int nspigot) const |
Read the "BxID FAILS TO MATCH WITH DCC" bit for this spigot. More... | |
int | getByte1Zeroes () const |
int | getByte3Zeroes () const |
int | getByte567Zeroes () const |
HcalCalibrationEventType | getCalibType () const |
unsigned short | getCDFEventType () const |
short | getCDFversionNumber () const |
short | getDCCDataFormatVersion () const |
unsigned long | getDCCEventNumber () const |
int | getDCCStatus () const |
int | getHTRStatusBits () const |
unsigned char | getLRBErrorBits (unsigned int nspigot) const |
Access the Link Receiver Board error bits (decoding tbd) More... | |
unsigned int | getOrbitNumber () const |
unsigned int | getSlink64ReservedBits () const |
int | getSourceId () const |
bool | getSpigotCRCError (unsigned int nspigot) const |
Read the "CRC-Mismatch" bit for this spigot. More... | |
int | getSpigotData (int nspigot, HcalHTRData &decodeTool, int validSize) const |
void | getSpigotData (int nspigot, HcalHTRData &decodeTool) const |
unsigned int | getSpigotDataLength (int nspigot) const |
bool | getSpigotDataTruncated (unsigned int nspigot) const |
Read the "TRUNCATED" bit for this spigot; LRB truncated data (took too long) More... | |
bool | getSpigotEnabled (unsigned int nspigot) const |
Read the "ENABLED" bit for this spigot. More... | |
unsigned char | getSpigotErrorBits (unsigned int nspigot) const |
Access the HTR error bits (decoding tbd) More... | |
bool | getSpigotErrorFlag (int nspigot) const |
bool | getSpigotPresent (unsigned int nspigot) const |
Read the "PRESENT" bit for this spigot. More... | |
int | getSpigotSummary (int nspigot) const |
bool | getSpigotValid (unsigned int nspigot) const |
Read the "VALID" bit for this spigot; TTC EvN matched HTR EvN. More... | |
unsigned int | getTotalLengthBytes () const |
HcalDCCHeader () | |
bool | isCalibType () const |
bool | SawCT_BcN_MxMx () const |
bool | SawCT_EvN_MxMx () const |
bool | SawL1A_BcN_MxMx () const |
bool | SawL1A_EvN_MxMx () const |
bool | SawOrbitLengthErr () const |
bool | SawTTC_DoubErr () const |
bool | SawTTC_SingErr () const |
bool | SawTTS_BSY () const |
bool | SawTTS_OFW () const |
bool | SawTTS_SYN () const |
void | setHeader (int sourceid, int bcn, int l1aN, int orbN) |
bool | thereIsASecondCDFHeaderWord () const |
bool | thereIsAThirdCDFHeaderWord () const |
Static Public Attributes | |
static const int | SPIGOT_COUNT = 15 |
Private Attributes | |
uint32_t | commondataformat0 |
uint32_t | commondataformat1 |
uint32_t | commondataformat2 |
uint32_t | commondataformat3 |
uint32_t | dcch0 |
uint32_t | dcch1 |
uint32_t | spigotInfo [18] |
Interpretive class for an HcalDCCHeader
Definition at line 17 of file HcalDCCHeader.h.
HcalDCCHeader::HcalDCCHeader | ( | ) |
Definition at line 12 of file HcalDCCHeader.cc.
Referenced by copySpigotData(), getSpigotData(), and getTotalLengthBytes().
|
inline |
Get the inviolable '5' in the highest 4 bits of the CDF header.
Definition at line 40 of file HcalDCCHeader.h.
References commondataformat1.
|
inline |
Get the Beginning Of Event bits. If it's not the first or last CDF Slink64 word, the high 4 bits must be zero.
Definition at line 50 of file HcalDCCHeader.h.
References commondataformat3.
Referenced by HcalUnpacker::unpack().
void HcalDCCHeader::clear | ( | void | ) |
clear the contents of this header
Definition at line 42 of file HcalDCCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, commondataformat3, dcch0, dcch1, mps_fire::i, and spigotInfo.
Referenced by CastorPacker::pack(), and HcalPacker::pack().
void HcalDCCHeader::copySpigotData | ( | unsigned int | spigot_id, |
const HcalHTRData & | data, | ||
bool | valid = true , |
||
unsigned char | LRB_error_word = 0 |
||
) |
Add the given HcalHTRData as the given spigot's data. This should be done in increasing spigot order!
spigot_id | |
spigot_data | |
valid | flag |
LRB_error_word |
Definition at line 60 of file HcalDCCHeader.cc.
References dcch0, HcalHTRData::getErrorsWord(), HcalHTRData::getRawData(), HcalHTRData::getRawLength(), getSpigotDataLength(), HcalDCCHeader(), mps_fire::i, SPIGOT_COUNT, and spigotInfo.
Referenced by CastorPacker::pack(), and HcalPacker::pack().
|
inline |
|
inline |
get the bunch id from the CDF header
Definition at line 34 of file HcalDCCHeader.h.
References commondataformat0.
Referenced by RawTask::_process().
|
inline |
Read the "BxID FAILS TO MATCH WITH DCC" bit for this spigot.
Definition at line 110 of file HcalDCCHeader.h.
References spigotInfo.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 54 of file HcalDCCHeader.h.
References commondataformat3.
Referenced by isCalibType().
|
inline |
Get the Event Type value (2007.11.03 - Not defined, but should stay consistent among events.)
Definition at line 38 of file HcalDCCHeader.h.
References commondataformat1.
|
inline |
Get the Format Version of the Common Data Format
Definition at line 30 of file HcalDCCHeader.h.
References commondataformat0.
|
inline |
Definition at line 59 of file HcalDCCHeader.h.
References dcch0.
Referenced by HcalUnpacker::unpackVME().
|
inline |
get the Event Number from the CDF header
Definition at line 36 of file HcalDCCHeader.h.
References commondataformat1.
Referenced by RawTask::_process().
|
inline |
Definition at line 64 of file HcalDCCHeader.h.
References dcch1.
Referenced by SawCT_BcN_MxMx(), SawCT_EvN_MxMx(), SawL1A_BcN_MxMx(), SawL1A_EvN_MxMx(), SawOrbitLengthErr(), SawTTC_DoubErr(), SawTTC_SingErr(), SawTTS_BSY(), SawTTS_OFW(), and SawTTS_SYN().
|
inline |
|
inline |
Access the Link Receiver Board error bits (decoding tbd)
Definition at line 130 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Get the Orbit Number from the CDF.
Definition at line 46 of file HcalDCCHeader.h.
References commondataformat2, and commondataformat3.
Referenced by RawTask::_process().
|
inline |
get the (undefined) 'Reserved' part of the second Slink64 CDF word
Definition at line 48 of file HcalDCCHeader.h.
References commondataformat3.
|
inline |
get the source id from the CDF header
Definition at line 32 of file HcalDCCHeader.h.
References commondataformat0.
Referenced by RawTask::_process(), HcalTriggerPrimitiveAlgo::runFEFormatError(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), and HcalUnpacker::unpackVME().
|
inline |
Read the "CRC-Mismatch" bit for this spigot.
Definition at line 122 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by CastorUnpacker::unpack(), ZdcUnpacker::unpack(), and HcalUnpacker::unpackVME().
int HcalDCCHeader::getSpigotData | ( | int | nspigot, |
HcalHTRData & | decodeTool, | ||
int | validSize | ||
) | const |
Load the given decoder with the pointer and length from this spigot Returns 0 on success Returns -1 if spigot points to data area beyond validSize
Definition at line 27 of file HcalDCCHeader.cc.
References HcalHTRData::adoptData(), newFWLiteAna::base, HcalDCCHeader(), mps_fire::i, hltrates_dqm_sourceclient-live_cfg::offset, and spigotInfo.
Referenced by RawTask::_process(), DQMHcalPhiSymAlCaReco::analyze(), HcalEmptyEventFilter::filter(), getSpigotData(), HLTHcalNZSFilter::hltFilter(), HcalTriggerPrimitiveAlgo::runFEFormatError(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), and HcalUnpacker::unpackVME().
void HcalDCCHeader::getSpigotData | ( | int | nspigot, |
HcalHTRData & | decodeTool | ||
) | const |
Old (unsafe) getSpigotData. All calls should be replaced by the new call. This call will generate WARN log messages.
Definition at line 21 of file HcalDCCHeader.cc.
References getSpigotData().
|
inline |
Get the size (in 32-bit words) of the data from this spigot
Definition at line 97 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by copySpigotData(), and operator<<().
|
inline |
Read the "TRUNCATED" bit for this spigot; LRB truncated data (took too long)
Definition at line 118 of file HcalDCCHeader.h.
References spigotInfo.
|
inline |
Read the "ENABLED" bit for this spigot.
Definition at line 102 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Access the HTR error bits (decoding tbd)
Definition at line 126 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Get the value flagging a spigot's summary of error flags.
Definition at line 68 of file HcalDCCHeader.h.
References dcch0.
|
inline |
Read the "PRESENT" bit for this spigot.
Definition at line 106 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by DQMHcalPhiSymAlCaReco::analyze(), HcalEmptyEventFilter::filter(), HLTHcalNZSFilter::hltFilter(), operator<<(), HcalTriggerPrimitiveAlgo::runFEFormatError(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), and HcalUnpacker::unpackVME().
|
inline |
Get a given spigot summary from the DCC Header
Definition at line 83 of file HcalDCCHeader.h.
References spigotInfo.
|
inline |
Read the "VALID" bit for this spigot; TTC EvN matched HTR EvN.
Definition at line 114 of file HcalDCCHeader.h.
References spigotInfo.
Referenced by operator<<().
unsigned int HcalDCCHeader::getTotalLengthBytes | ( | ) | const |
Determine the expected total length of this packet in bytes
Definition at line 14 of file HcalDCCHeader.cc.
References HcalDCCHeader(), mps_fire::i, SPIGOT_COUNT, and spigotInfo.
|
inline |
Get the Calibration Type
Definition at line 53 of file HcalDCCHeader.h.
References getCalibType().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the status of these error counters in the DCC motherboard.
Definition at line 71 of file HcalDCCHeader.h.
References getDCCStatus().
|
inline |
void HcalDCCHeader::setHeader | ( | int | sourceid, |
int | bcn, | ||
int | l1aN, | ||
int | orbN | ||
) |
setup the header
Definition at line 53 of file HcalDCCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, and commondataformat3.
Referenced by CastorPacker::pack(), and HcalPacker::pack().
|
inline |
get the bit indicating that another CDF header Slink64 word follows the first one.
Definition at line 28 of file HcalDCCHeader.h.
References commondataformat0.
|
inline |
Check the third bit of second Slink64 CDF word
Definition at line 44 of file HcalDCCHeader.h.
References commondataformat2.
|
private |
Definition at line 153 of file HcalDCCHeader.h.
Referenced by clear(), getBunchId(), getCDFversionNumber(), getSourceId(), setHeader(), and thereIsASecondCDFHeaderWord().
|
private |
Definition at line 154 of file HcalDCCHeader.h.
Referenced by BOEshouldBe5Always(), clear(), getCDFEventType(), getDCCEventNumber(), and setHeader().
|
private |
Definition at line 155 of file HcalDCCHeader.h.
Referenced by clear(), getOrbitNumber(), setHeader(), and thereIsAThirdCDFHeaderWord().
|
private |
Definition at line 156 of file HcalDCCHeader.h.
Referenced by BOEshouldBeZeroAlways(), clear(), getCalibType(), getOrbitNumber(), getSlink64ReservedBits(), and setHeader().
|
private |
Definition at line 157 of file HcalDCCHeader.h.
Referenced by clear(), copySpigotData(), getAcceptTimeTTS(), getByte1Zeroes(), getByte3Zeroes(), getDCCDataFormatVersion(), getHTRStatusBits(), and getSpigotErrorFlag().
|
private |
Definition at line 158 of file HcalDCCHeader.h.
Referenced by clear(), getByte567Zeroes(), and getDCCStatus().
|
static |
Definition at line 19 of file HcalDCCHeader.h.
Referenced by RawTask::_process(), DQMHcalPhiSymAlCaReco::analyze(), copySpigotData(), HcalEmptyEventFilter::filter(), getTotalLengthBytes(), HLTHcalNZSFilter::hltFilter(), operator<<(), HcalTriggerPrimitiveAlgo::runFEFormatError(), CastorUnpacker::unpack(), ZdcUnpacker::unpack(), HcalUnpacker::unpack(), and HcalUnpacker::unpackVME().
|
private |
Definition at line 159 of file HcalDCCHeader.h.
Referenced by clear(), copySpigotData(), getBxMismatchWithDCC(), getLRBErrorBits(), getSpigotCRCError(), getSpigotData(), getSpigotDataLength(), getSpigotDataTruncated(), getSpigotEnabled(), getSpigotErrorBits(), getSpigotPresent(), getSpigotSummary(), getSpigotValid(), and getTotalLengthBytes().