#include <HcalDTCHeader.h>
Public Member Functions | |
unsigned short | BOEshouldBe5Always () const |
short | BOEshouldBeZeroAlways () const |
void | clear () |
void | copySlotData (unsigned int slot_id, const HcalHTRData &data, bool valid=true) |
Add the given HcalHTRData as the given slot's data. This should be done in increasing slot order! More... | |
int | getBunchId () const |
HcalCalibrationEventType | getCalibType () const |
unsigned short | getCDFEventType () const |
short | getCDFversionNumber () const |
short | getDTCDataFormatVersion () const |
unsigned long | getDTCEventNumber () const |
unsigned int | getOrbitNumber () const |
unsigned int | getSlink64ReservedBits () const |
bool | getSlotCRCError (unsigned int nslot) const |
Read the "CRC-Mismatch" bit for this slot. More... | |
int | getSlotData (int nslot, HcalHTRData &decodeTool, int validSize) const |
unsigned int | getSlotDataLength (int nslot) const |
bool | getSlotEnabled (unsigned int nslot) const |
Read the "ENABLED" bit for this slot. More... | |
bool | getSlotPresent (unsigned int nslot) const |
Read the "PRESENT" bit for this slot. More... | |
int | getSlotSummary (int nslot) const |
bool | getSlotValid (unsigned int nslot) const |
Read the "VALID" bit for this slot; TTC EvN matched HTR EvN. More... | |
int | getSourceId () const |
unsigned int | getTotalLengthBytes () const |
HcalDTCHeader () | |
bool | isCalibType () const |
int | nDTCWords () const |
int | nSlotWords () const |
void | setHeader (int sourceid, int bcn, int l1aN, int orbN) |
bool | thereIsASecondCDFHeaderWord () const |
bool | thereIsAThirdCDFHeaderWord () const |
Static Public Attributes | |
static const int | MAXIMUM_SLOT = 12 |
static const int | MINIMUM_SLOT = 1 |
static const int | SLOT_COUNT = 12 |
Private Attributes | |
uint32_t | commondataformat0 |
uint32_t | commondataformat1 |
uint32_t | commondataformat2 |
uint32_t | commondataformat3 |
uint32_t | dcch0 |
uint32_t | dcch1 |
uint16_t | slotInfo [12] |
Interpretive class for the header of a FED-format data block from the DTC – the uTCA DAQ and timing card also called an AMC13
Definition at line 18 of file HcalDTCHeader.h.
HcalDTCHeader::HcalDTCHeader | ( | ) |
Definition at line 13 of file HcalDTCHeader.cc.
Referenced by copySlotData(), getSlotData(), and getTotalLengthBytes().
|
inline |
Get the inviolable '5' in the highest 4 bits of the CDF header.
Definition at line 43 of file HcalDTCHeader.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 53 of file HcalDTCHeader.h.
References commondataformat3.
void HcalDTCHeader::clear | ( | void | ) |
clear the contents of this header
Definition at line 37 of file HcalDTCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, commondataformat3, dcch0, dcch1, mps_fire::i, SLOT_COUNT, and slotInfo.
void HcalDTCHeader::copySlotData | ( | unsigned int | slot_id, |
const HcalHTRData & | data, | ||
bool | valid = true |
||
) |
Add the given HcalHTRData as the given slot's data. This should be done in increasing slot order!
slot_id | |
slot_data | |
valid | flag |
LRB_error_word |
Definition at line 53 of file HcalDTCHeader.cc.
References data, getSlotDataLength(), HcalDTCHeader(), mps_fire::i, SLOT_COUNT, slotInfo, and validateGeometry_cfg::valid.
|
inline |
get the bunch id from the CDF header
Definition at line 37 of file HcalDTCHeader.h.
References commondataformat0.
|
inline |
Definition at line 57 of file HcalDTCHeader.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 41 of file HcalDTCHeader.h.
References commondataformat1.
|
inline |
Get the Format Version of the Common Data Format
Definition at line 33 of file HcalDTCHeader.h.
References commondataformat0.
|
inline |
|
inline |
get the Event Number from the CDF header
Definition at line 39 of file HcalDTCHeader.h.
References commondataformat1.
|
inline |
Get the Orbit Number from the CDF.
Definition at line 49 of file HcalDTCHeader.h.
References commondataformat2, and commondataformat3.
|
inline |
get the (undefined) 'Reserved' part of the second Slink64 CDF word
Definition at line 51 of file HcalDTCHeader.h.
References commondataformat3.
|
inline |
Read the "CRC-Mismatch" bit for this slot.
Definition at line 93 of file HcalDTCHeader.h.
References slotInfo.
Referenced by operator<<(), and HcalUnpacker::unpackVME().
int HcalDTCHeader::getSlotData | ( | int | nslot, |
HcalHTRData & | decodeTool, | ||
int | validSize | ||
) | const |
Load the given decoder with the pointer and length from this slot Returns 0 on success Returns -1 if slot points to data area beyond validSize
Definition at line 22 of file HcalDTCHeader.cc.
References HcalHTRData::adoptData(), edmMakeDummyCfis::base, HcalDTCHeader(), mps_fire::i, hltrates_dqm_sourceclient-live_cfg::offset, and slotInfo.
Referenced by HcalUnpacker::unpackVME().
|
inline |
Get the size (in 16-bit words) of the data from this slot
Definition at line 76 of file HcalDTCHeader.h.
References slotInfo.
Referenced by copySlotData(), and operator<<().
|
inline |
Read the "ENABLED" bit for this slot.
Definition at line 81 of file HcalDTCHeader.h.
References slotInfo.
Referenced by operator<<().
|
inline |
Read the "PRESENT" bit for this slot.
Definition at line 85 of file HcalDTCHeader.h.
References slotInfo.
Referenced by operator<<(), and HcalUnpacker::unpackVME().
|
inline |
Get a given slot summary from the DTC Header
Definition at line 67 of file HcalDTCHeader.h.
References slotInfo.
|
inline |
Read the "VALID" bit for this slot; TTC EvN matched HTR EvN.
Definition at line 89 of file HcalDTCHeader.h.
References slotInfo.
Referenced by operator<<().
|
inline |
get the source id from the CDF header
Definition at line 35 of file HcalDTCHeader.h.
References commondataformat0.
Referenced by HcalUnpacker::unpackVME().
unsigned int HcalDTCHeader::getTotalLengthBytes | ( | ) | const |
Determine the expected total length of this packet in bytes
Definition at line 15 of file HcalDTCHeader.cc.
References HcalDTCHeader(), mps_fire::i, SLOT_COUNT, and slotInfo.
|
inline |
Get the Calibration Type
Definition at line 56 of file HcalDTCHeader.h.
References getCalibType().
|
inline |
|
inline |
void HcalDTCHeader::setHeader | ( | int | sourceid, |
int | bcn, | ||
int | l1aN, | ||
int | orbN | ||
) |
setup the header
Definition at line 48 of file HcalDTCHeader.cc.
References commondataformat0, and commondataformat1.
|
inline |
get the bit indicating that another CDF header Slink64 word follows the first one.
Definition at line 31 of file HcalDTCHeader.h.
References commondataformat0.
|
inline |
Check the third bit of second Slink64 CDF word
Definition at line 47 of file HcalDTCHeader.h.
References commondataformat2.
|
private |
Definition at line 113 of file HcalDTCHeader.h.
Referenced by clear(), getBunchId(), getCDFversionNumber(), getSourceId(), setHeader(), and thereIsASecondCDFHeaderWord().
|
private |
Definition at line 114 of file HcalDTCHeader.h.
Referenced by BOEshouldBe5Always(), clear(), getCDFEventType(), getDTCEventNumber(), and setHeader().
|
private |
Definition at line 115 of file HcalDTCHeader.h.
Referenced by clear(), getOrbitNumber(), and thereIsAThirdCDFHeaderWord().
|
private |
Definition at line 116 of file HcalDTCHeader.h.
Referenced by BOEshouldBeZeroAlways(), clear(), getCalibType(), getOrbitNumber(), and getSlink64ReservedBits().
|
private |
Definition at line 117 of file HcalDTCHeader.h.
Referenced by clear(), getDTCDataFormatVersion(), nDTCWords(), and nSlotWords().
|
private |
Definition at line 118 of file HcalDTCHeader.h.
Referenced by clear().
|
static |
Definition at line 22 of file HcalDTCHeader.h.
Referenced by HcalUnpacker::unpackVME().
|
static |
Definition at line 21 of file HcalDTCHeader.h.
|
static |
Definition at line 20 of file HcalDTCHeader.h.
Referenced by clear(), copySlotData(), getTotalLengthBytes(), and operator<<().
|
private |
Definition at line 119 of file HcalDTCHeader.h.
Referenced by clear(), copySlotData(), getSlotCRCError(), getSlotData(), getSlotDataLength(), getSlotEnabled(), getSlotPresent(), getSlotSummary(), getSlotValid(), and getTotalLengthBytes().