#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 35 of file CastorCTDCHeader.cc.
References commondataformat0, commondataformat1, commondataformat2, commondataformat3, ctdch0, ctdch1, i, and spigotInfo.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), CastorCtdcPacker::pack(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().
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 |
|
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 94 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 104 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 100 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(), newFWLiteAna::base, CastorCTDCHeader(), i, evf::evtn::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.
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 98 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
Read the "ENABLED" bit for this spigot.
Definition at line 90 of file CastorCTDCHeader.h.
References spigotInfo.
Referenced by operator<<().
|
inline |
Access the HTR error bits (decoding tbd)
Definition at line 102 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 92 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 78 of file CastorCTDCHeader.h.
References spigotInfo.
|
inline |
Read the "VALID" bit for this spigot; TTC EvN matched HTR EvN.
Definition at line 96 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(), 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 66 of file CastorCTDCHeader.h.
References getDCCStatus().
|
inline |
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.
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 124 of file CastorCTDCHeader.h.
Referenced by clear(), getBunchId(), getCDFversionNumber(), getSourceId(), setHeader(), and thereIsASecondCDFHeaderWord().
|
private |
Definition at line 125 of file CastorCTDCHeader.h.
Referenced by BOEshouldBe5Always(), clear(), getCDFEventType(), getDCCEventNumber(), and setHeader().
|
private |
Definition at line 126 of file CastorCTDCHeader.h.
Referenced by clear(), getOrbitNumber(), and thereIsAThirdCDFHeaderWord().
|
private |
Definition at line 127 of file CastorCTDCHeader.h.
Referenced by BOEshouldBeZeroAlways(), clear(), and getSlink64ReservedBits().
|
private |
Definition at line 128 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), copySpigotData(), getAcceptTimeTTS(), getByte1Zeroes(), getByte3Zeroes(), getDCCDataFormatVersion(), getHTRStatusBits(), and getSpigotErrorFlag().
|
private |
Definition at line 129 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 130 of file CastorCTDCHeader.h.
Referenced by clear(), copyMergerData(), copySpigotData(), getBxMismatchWithDCC(), getLRBErrorBits(), getSpigotCRCError(), getSpigotData(), getSpigotDataLength(), getSpigotDataTruncated(), getSpigotEnabled(), getSpigotErrorBits(), getSpigotPresent(), getSpigotSummary(), getSpigotValid(), and getTotalLengthBytes().