#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.
|
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.
void CastorCTDCHeader::clear | ( | void | ) |
clear the contents of this header
Definition at line 35 of file CastorCTDCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, commondataformat3, ctdch0, ctdch1, i, and spigotInfo.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), CastorCtdcPacker::pack(), and Vispa.Views.WidgetView.WidgetView::setDataObjects().
void CastorCTDCHeader::copyMergerData | ( | const CastorMergerData & | data, |
bool | valid | ||
) |
Definition at line 74 of file CastorCTDCHeader.cc.
References CastorCTDCHeader(), ctdch0, CastorMergerData::getErrorsWord(), CastorMergerData::getRawData(), CastorMergerData::getRawLength(), getSpigotDataLength(), i, and spigotInfo.
Referenced by CastorCtdcPacker::pack().
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 53 of file CastorCTDCHeader.cc.
References CastorCTDCHeader(), ctdch0, CastorCORData::getErrorsWord(), CastorCORData::getRawData(), CastorCORData::getRawLength(), getSpigotDataLength(), i, SPIGOT_COUNT, and spigotInfo.
Referenced by CastorCtdcPacker::pack().
|
inline |
Definition at line 54 of file CastorCTDCHeader.h.
|
inline |
get the bunch id from the CDF header
Definition at line 34 of file CastorCTDCHeader.h.
|
inline |
Read the "BxID FAILS TO MATCH WITH DCC" bit for this spigot.
Definition at line 94 of file CastorCTDCHeader.h.
|
inline |
Definition at line 55 of file CastorCTDCHeader.h.
|
inline |
Definition at line 57 of file CastorCTDCHeader.h.
|
inline |
Definition at line 59 of file CastorCTDCHeader.h.
|
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.
|
inline |
Get the Format Version of the Common Data Format
Definition at line 30 of file CastorCTDCHeader.h.
|
inline |
Definition at line 53 of file CastorCTDCHeader.h.
|
inline |
get the Event Number from the CDF header
Definition at line 36 of file CastorCTDCHeader.h.
|
inline |
Definition at line 58 of file CastorCTDCHeader.h.
|
inline |
Definition at line 56 of file CastorCTDCHeader.h.
|
inline |
Access the Link Receiver Board error bits (decoding tbd)
Definition at line 104 of file CastorCTDCHeader.h.
|
inline |
Get the Orbit Number from the CDF.
Definition at line 46 of file CastorCTDCHeader.h.
|
inline |
get the (undefined) 'Reserved' part of the second Slink64 CDF word
Definition at line 48 of file CastorCTDCHeader.h.
|
inline |
get the source id from the CDF header
Definition at line 32 of file CastorCTDCHeader.h.
Referenced by CastorCtdcUnpacker::unpack().
|
inline |
Read the "CRC-Mismatch" bit for this spigot.
Definition at line 100 of file CastorCTDCHeader.h.
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(), newFWLiteAna::base, CastorCTDCHeader(), i, hltrates_dqm_sourceclient-live_cfg::offset, and spigotInfo.
Referenced by CastorCtdcUnpacker::unpack().
|
inline |
Get the size (in 32-bit words) of the data from this spigot
Definition at line 87 of file CastorCTDCHeader.h.
Referenced by copyMergerData(), copySpigotData(), and operator<<().
|
inline |
Read the "TRUNCATED" bit for this spigot; LRB truncated data (took too long)
Definition at line 98 of file CastorCTDCHeader.h.
|
inline |
Read the "ENABLED" bit for this spigot.
Definition at line 90 of file CastorCTDCHeader.h.
Referenced by operator<<().
|
inline |
Access the HTR error bits (decoding tbd)
Definition at line 102 of file CastorCTDCHeader.h.
Referenced by operator<<().
|
inline |
Get the value flagging a spigot's summary of error flags.
Definition at line 62 of file CastorCTDCHeader.h.
|
inline |
Read the "PRESENT" bit for this spigot.
Definition at line 92 of file CastorCTDCHeader.h.
Referenced by operator<<(), and CastorCtdcUnpacker::unpack().
|
inline |
Get a given spigot summary from the DCC Header
Definition at line 78 of file CastorCTDCHeader.h.
|
inline |
Read the "VALID" bit for this spigot; TTC EvN matched HTR EvN.
Definition at line 96 of file CastorCTDCHeader.h.
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(), i, SPIGOT_COUNT, and spigotInfo.
|
inline |
Definition at line 72 of file CastorCTDCHeader.h.
|
inline |
Definition at line 71 of file CastorCTDCHeader.h.
|
inline |
Definition at line 70 of file CastorCTDCHeader.h.
|
inline |
Definition at line 69 of file CastorCTDCHeader.h.
|
inline |
Definition at line 73 of file CastorCTDCHeader.h.
|
inline |
Definition at line 75 of file CastorCTDCHeader.h.
|
inline |
Definition at line 74 of file CastorCTDCHeader.h.
|
inline |
Definition at line 67 of file CastorCTDCHeader.h.
|
inline |
Get the status of these error counters in the DCC motherboard.
Definition at line 66 of file CastorCTDCHeader.h.
|
inline |
Definition at line 68 of file CastorCTDCHeader.h.
void CastorCTDCHeader::setHeader | ( | int | sourceid, |
int | bcn, | ||
int | l1aN, | ||
int | orbN | ||
) |
setup the header
Definition at line 48 of file CastorCTDCHeader.cc.
References commondataformat0, and commondataformat1.
Referenced by CastorCtdcPacker::pack().
|
inline |
get the bit indicating that another CDF header Slink64 word follows the first one.
Definition at line 28 of file CastorCTDCHeader.h.
|
inline |
Check the third bit of second Slink64 CDF word
Definition at line 44 of file CastorCTDCHeader.h.
|
private |
Definition at line 124 of file CastorCTDCHeader.h.
Referenced by clear(), and setHeader().
|
private |
Definition at line 125 of file CastorCTDCHeader.h.
Referenced by clear(), and setHeader().
|
private |
Definition at line 126 of file CastorCTDCHeader.h.
Referenced by clear().
|
private |
Definition at line 127 of file CastorCTDCHeader.h.
Referenced by clear().
|
private |
Definition at line 128 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), and copySpigotData().
|
private |
Definition at line 129 of file CastorCTDCHeader.h.
Referenced by clear().
|
static |
Definition at line 19 of file CastorCTDCHeader.h.
Referenced by copySpigotData(), getTotalLengthBytes(), operator<<(), CastorCtdcPacker::pack(), and CastorCtdcUnpacker::unpack().
|
private |
Definition at line 130 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), copySpigotData(), getSpigotData(), and getTotalLengthBytes().