#include <CastorCTDCHeader.h>
Public Member Functions | |
unsigned short | BOEshouldBe5Always () const |
short | BOEshouldBeZeroAlways () const |
CastorCTDCHeader () | |
void | clear () |
void | copyMergerData (const CastorMergerData &data, bool valid) |
void | copySpigotData (unsigned int spigot_id, const CastorCORData &data, bool valid=true, unsigned char LRB_error_word=0) |
Add the given CastorCORData 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 |
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, CastorCORData &decodeTool, int validSize) 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 |
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 = 2 |
Private Attributes | |
unsigned int | commondataformat0 |
unsigned int | commondataformat1 |
unsigned int | commondataformat2 |
unsigned int | commondataformat3 |
unsigned int | ctdch0 |
unsigned int | ctdch1 |
unsigned int | spigotInfo [4] |
Interpretive class for an CastorCTDCHeader
Definition at line 17 of file CastorCTDCHeader.h.
CastorCTDCHeader::CastorCTDCHeader | ( | ) |
Definition at line 13 of file CastorCTDCHeader.cc.
Referenced by copyMergerData(), copySpigotData(), getSpigotData(), and getTotalLengthBytes().
|
inline |
Get the inviolable '5' in the highest 4 bits of the CDF header.
Definition at line 40 of file CastorCTDCHeader.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 CastorCTDCHeader.h.
References commondataformat3.
void CastorCTDCHeader::clear | ( | void | ) |
clear the contents of this header
Definition at line 37 of file CastorCTDCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, commondataformat3, ctdch0, ctdch1, mps_fire::i, and spigotInfo.
void CastorCTDCHeader::copyMergerData | ( | const CastorMergerData & | data, |
bool | valid | ||
) |
Definition at line 83 of file CastorCTDCHeader.cc.
References CastorCTDCHeader(), ctdch0, data, getSpigotDataLength(), mps_fire::i, spigotInfo, and validateGeometry_cfg::valid.
void CastorCTDCHeader::copySpigotData | ( | unsigned int | spigot_id, |
const CastorCORData & | data, | ||
bool | valid = true , |
||
unsigned char | LRB_error_word = 0 |
||
) |
Add the given CastorCORData 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 54 of file CastorCTDCHeader.cc.
References CastorCTDCHeader(), ctdch0, data, getSpigotDataLength(), mps_fire::i, SPIGOT_COUNT, spigotInfo, and validateGeometry_cfg::valid.
|
inline |
|
inline |
get the bunch id from the CDF header
Definition at line 34 of file CastorCTDCHeader.h.
References commondataformat0.
|
inline |
Read the "BxID FAILS TO MATCH WITH DCC" bit for this spigot.
Definition at line 99 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
|
inline |
|
inline |
|
inline |
Get the Event Type value (2007.11.03 - Not defined, but should stay consistent among events.)
Definition at line 38 of file CastorCTDCHeader.h.
References commondataformat1.
|
inline |
Get the Format Version of the Common Data Format
Definition at line 30 of file CastorCTDCHeader.h.
References commondataformat0.
|
inline |
|
inline |
get the Event Number from the CDF header
Definition at line 36 of file CastorCTDCHeader.h.
References commondataformat1.
|
inline |
Definition at line 58 of file CastorCTDCHeader.h.
References ctdch1.
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 119 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
Get the Orbit Number from the CDF.
Definition at line 46 of file CastorCTDCHeader.h.
References commondataformat2.
|
inline |
get the (undefined) 'Reserved' part of the second Slink64 CDF word
Definition at line 48 of file CastorCTDCHeader.h.
References commondataformat3.
|
inline |
get the source id from the CDF header
Definition at line 32 of file CastorCTDCHeader.h.
References commondataformat0.
Referenced by CastorCtdcUnpacker::unpack().
|
inline |
Read the "CRC-Mismatch" bit for this spigot.
Definition at line 111 of file CastorCTDCHeader.h.
References spigotInfo.
int CastorCTDCHeader::getSpigotData | ( | int | nspigot, |
CastorCORData & | 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 22 of file CastorCTDCHeader.cc.
References CastorCORData::adoptData(), edmMakeDummyCfis::base, CastorCTDCHeader(), mps_fire::i, HLT_IsoTrack_cff::offset, and spigotInfo.
Referenced by CastorCtdcUnpacker::unpack().
|
inline |
Get the size (in 32-bit words) of the data from this spigot
Definition at line 86 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by copyMergerData(), copySpigotData(), and operator<<().
|
inline |
Read the "TRUNCATED" bit for this spigot; LRB truncated data (took too long)
Definition at line 107 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
Read the "ENABLED" bit for this spigot.
Definition at line 91 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Access the HTR error bits (decoding tbd)
Definition at line 115 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Get the value flagging a spigot's summary of error flags.
Definition at line 62 of file CastorCTDCHeader.h.
References ctdch0.
|
inline |
Read the "PRESENT" bit for this spigot.
Definition at line 95 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by operator<<(), and CastorCtdcUnpacker::unpack().
|
inline |
Get a given spigot summary from the DCC Header
Definition at line 77 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
Read the "VALID" bit for this spigot; TTC EvN matched HTR EvN.
Definition at line 103 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by operator<<().
unsigned int CastorCTDCHeader::getTotalLengthBytes | ( | ) | const |
Determine the expected total length of this packet in bytes
Definition at line 15 of file CastorCTDCHeader.cc.
References CastorCTDCHeader(), mps_fire::i, SPIGOT_COUNT, and spigotInfo.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the status of these error counters in the DCC motherboard.
Definition at line 65 of file CastorCTDCHeader.h.
References getDCCStatus().
|
inline |
void CastorCTDCHeader::setHeader | ( | int | sourceid, |
int | bcn, | ||
int | l1aN, | ||
int | orbN | ||
) |
setup the header
Definition at line 49 of file CastorCTDCHeader.cc.
References commondataformat0, and commondataformat1.
|
inline |
get the bit indicating that another CDF header Slink64 word follows the first one.
Definition at line 28 of file CastorCTDCHeader.h.
References commondataformat0.
|
inline |
Check the third bit of second Slink64 CDF word
Definition at line 44 of file CastorCTDCHeader.h.
References commondataformat2.
|
private |
Definition at line 144 of file CastorCTDCHeader.h.
Referenced by clear(), getBunchId(), getCDFversionNumber(), getSourceId(), setHeader(), and thereIsASecondCDFHeaderWord().
|
private |
Definition at line 145 of file CastorCTDCHeader.h.
Referenced by BOEshouldBe5Always(), clear(), getCDFEventType(), getDCCEventNumber(), and setHeader().
|
private |
Definition at line 146 of file CastorCTDCHeader.h.
Referenced by clear(), getOrbitNumber(), and thereIsAThirdCDFHeaderWord().
|
private |
Definition at line 147 of file CastorCTDCHeader.h.
Referenced by BOEshouldBeZeroAlways(), clear(), and getSlink64ReservedBits().
|
private |
Definition at line 148 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), copySpigotData(), getAcceptTimeTTS(), getByte1Zeroes(), getByte3Zeroes(), getDCCDataFormatVersion(), getHTRStatusBits(), and getSpigotErrorFlag().
|
private |
Definition at line 149 of file CastorCTDCHeader.h.
Referenced by clear(), getByte567Zeroes(), and getDCCStatus().
|
static |
Definition at line 19 of file CastorCTDCHeader.h.
Referenced by copySpigotData(), getTotalLengthBytes(), operator<<(), CastorCtdcPacker::pack(), and CastorCtdcUnpacker::unpack().
|
private |
Definition at line 150 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), copySpigotData(), getBxMismatchWithDCC(), getLRBErrorBits(), getSpigotCRCError(), getSpigotData(), getSpigotDataLength(), getSpigotDataTruncated(), getSpigotEnabled(), getSpigotErrorBits(), getSpigotPresent(), getSpigotSummary(), getSpigotValid(), and getTotalLengthBytes().