#include <CastorCORData.h>
Public Member Functions | |
void | adoptData (const unsigned short *data, int length) |
void | allocate (int version_to_create=0) |
CastorCORData () | |
CastorCORData (int version_to_create) | |
CastorCORData (const unsigned short *data, int length) | |
CastorCORData (const CastorCORData &) | |
bool | check () const |
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event. More... | |
unsigned int | getBunchNumber () const |
Get the HTR bunch number. More... | |
unsigned int | getDLLunlock () const |
Get DLLunlock bits. More... | |
unsigned int | getErrorsWord () const |
Get the errors word. More... | |
unsigned int | getExtHdr1 () const |
Get the COR Ext Header words. More... | |
unsigned int | getExtHdr2 () const |
unsigned int | getExtHdr3 () const |
unsigned int | getExtHdr4 () const |
unsigned int | getExtHdr5 () const |
unsigned int | getExtHdr6 () const |
unsigned int | getExtHdr7 () const |
unsigned int | getExtHdr8 () const |
unsigned int | getFib1OrbMsgBCN () const |
Get the BCN of the Fiber Orbit Messages. More... | |
unsigned int | getFib2OrbMsgBCN () const |
unsigned int | getFib3OrbMsgBCN () const |
unsigned int | getFib4OrbMsgBCN () const |
unsigned int | getFib5OrbMsgBCN () const |
unsigned int | getFib6OrbMsgBCN () const |
unsigned int | getFib7OrbMsgBCN () const |
unsigned int | getFib8OrbMsgBCN () const |
unsigned int | getFirmwareRevision () const |
Get the COR firmware version. More... | |
int | getFormatVersion () const |
Get the version number of this event. More... | |
void | getHistogramFibers (int &a, int &b) const |
Get the fiber numbers for the data present in this event (only in histogram mode!) More... | |
unsigned int | getL1ANumber () const |
Get the HTR event number. More... | |
int | getNDD () const |
Get the number of daq data samples per channel when not zero-suppressed. More... | |
int | getNPrecisionWords () const |
Get the total number of precision data 16-bit words. More... | |
int | getNPS () const |
Get the number of presamples in daq data. More... | |
int | getNTP () const |
Get the number of trigger data samples when not zero-suppressed (not available after FW 4) More... | |
unsigned int | getOrbitNumber () const |
Get the HTR orbit number. More... | |
unsigned int | getPipelineLength () const |
Get the pipeline length used for this event. More... | |
const unsigned short * | getRawData () const |
Get a pointer to the raw data. More... | |
const int | getRawLength () const |
Get the length of the raw data. More... | |
unsigned int | getSubmodule () const |
Get the HTR submodule number. More... | |
unsigned int | getTTCready () const |
Get TTCready bits. More... | |
unsigned int | htrSlot () const |
HcalElectronicsId-style HTR slot. More... | |
unsigned int | htrTopBottom () const |
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom) More... | |
bool | isCalibrationStream () const |
Is this event a calibration-stream event? More... | |
bool | isHistogramEvent () const |
Is this event a histogram event? (do not call standard unpack in this case!!!!!) More... | |
bool | isPatternRAMEvent () const |
Is this event a pattern-ram event? More... | |
bool | isUnsuppressed () const |
Is this event an unsuppresed event? More... | |
CastorCORData & | operator= (const CastorCORData &) |
void | pack (unsigned char *daq_lengths, unsigned short *daq_samples, unsigned char *tp_lengths, unsigned short *tp_samples, bool do_capid=false) |
Unpack the HTR data into TP and DAQ data sorted by channel. More... | |
void | packHeaderTrailer (int L1Anumber, int bcn, int submodule, int orbitn, int pipeline, int ndd, int nps, int firmwareRev=0) |
pack header and trailer (call after pack) More... | |
unsigned int | readoutVMECrateId () const |
HcalElectronicsId-style VME crate number. More... | |
void | unpack (unsigned char *daq_lengths, unsigned short *daq_samples, unsigned char *tp_lengths, unsigned short *tp_samples) const |
Obtain the starting and ending pointers for external unpacking of the data. More... | |
bool | unpackHistogram (int fiber, int fiberchan, int capid, unsigned short *histogram) const |
Unpack special histogramming mode data. More... | |
bool | wasMarkAndPassZS (int fiber, int fiberchan) const |
Was this channel passed as part of Mark&Pass ZS? More... | |
~CastorCORData () | |
Static Public Attributes | |
static const int | CHANNELS_PER_SPIGOT = 36 |
static const int | MAXIMUM_SAMPLES_PER_CHANNEL = 20 |
Protected Member Functions | |
void | determineSectionLengths (int &tpWords, int &daqWords, int &headerWords, int &trailerWords, int &triggerWords) const |
Was there an error on the given fiber for this event (only in histogram mode!) More... | |
void | determineStaticLengths (int &headerWords, int &trailerWords, int &triggerWords) const |
Protected Attributes | |
int | m_formatVersion |
unsigned short * | m_ownData |
const unsigned short * | m_rawConst |
int | m_rawLength |
unsigned short * | m_unpackedData |
Interpretive class for CastorCORDat Since this class requires external specification of the length of the data, it is implemented as an interpreter, rather than a cast-able header class.
Definition at line 14 of file CastorCORData.h.
CastorCORData::CastorCORData | ( | ) |
Definition at line 20 of file CastorCORData.cc.
|
inline |
Definition at line 20 of file CastorCORData.h.
CastorCORData::CastorCORData | ( | int | version_to_create | ) |
Definition at line 27 of file CastorCORData.cc.
CastorCORData::CastorCORData | ( | const unsigned short * | data, |
int | length | ||
) |
Definition at line 21 of file CastorCORData.cc.
CastorCORData::CastorCORData | ( | const CastorCORData & | hd | ) |
Definition at line 25 of file CastorCORData.cc.
void CastorCORData::adoptData | ( | const unsigned short * | data, |
int | length | ||
) |
Definition at line 50 of file CastorCORData.cc.
Referenced by CastorCTDCHeader::getSpigotData().
void CastorCORData::allocate | ( | int | version_to_create = 0 | ) |
Definition at line 31 of file CastorCORData.cc.
Referenced by CastorCtdcPacker::pack().
bool CastorCORData::check | ( | ) | const |
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event.
Definition at line 63 of file CastorCORData.cc.
Referenced by CastorCtdcUnpacker::unpack().
|
protected |
Was there an error on the given fiber for this event (only in histogram mode!)
Definition at line 78 of file CastorCORData.cc.
|
protected |
Definition at line 92 of file CastorCORData.cc.
|
inline |
Get the HTR bunch number.
Definition at line 94 of file CastorCORData.h.
|
inline |
Get DLLunlock bits.
Definition at line 143 of file CastorCORData.h.
|
inline |
Get the errors word.
Definition at line 130 of file CastorCORData.h.
Referenced by CastorCTDCHeader::copySpigotData().
|
inline |
Get the COR Ext Header words.
Definition at line 185 of file CastorCORData.h.
|
inline |
Definition at line 187 of file CastorCORData.h.
|
inline |
Definition at line 189 of file CastorCORData.h.
|
inline |
Definition at line 191 of file CastorCORData.h.
|
inline |
Definition at line 193 of file CastorCORData.h.
|
inline |
Definition at line 195 of file CastorCORData.h.
|
inline |
Definition at line 197 of file CastorCORData.h.
|
inline |
Definition at line 199 of file CastorCORData.h.
|
inline |
Get the BCN of the Fiber Orbit Messages.
Definition at line 151 of file CastorCORData.h.
|
inline |
Definition at line 154 of file CastorCORData.h.
|
inline |
Definition at line 158 of file CastorCORData.h.
|
inline |
Definition at line 162 of file CastorCORData.h.
|
inline |
Definition at line 166 of file CastorCORData.h.
|
inline |
Definition at line 170 of file CastorCORData.h.
|
inline |
Definition at line 174 of file CastorCORData.h.
|
inline |
Definition at line 178 of file CastorCORData.h.
unsigned int CastorCORData::getFirmwareRevision | ( | ) | const |
Get the COR firmware version.
Definition at line 316 of file CastorCORData.cc.
|
inline |
Get the version number of this event.
Definition at line 30 of file CastorCORData.h.
void CastorCORData::getHistogramFibers | ( | int & | a, |
int & | b | ||
) | const |
Get the fiber numbers for the data present in this event (only in histogram mode!)
Definition at line 320 of file CastorCORData.cc.
|
inline |
Get the HTR event number.
Definition at line 90 of file CastorCORData.h.
int CastorCORData::getNDD | ( | ) | const |
Get the number of daq data samples per channel when not zero-suppressed.
Definition at line 298 of file CastorCORData.cc.
int CastorCORData::getNPrecisionWords | ( | ) | const |
Get the total number of precision data 16-bit words.
Definition at line 307 of file CastorCORData.cc.
int CastorCORData::getNPS | ( | ) | const |
Get the number of presamples in daq data.
Definition at line 310 of file CastorCORData.cc.
Referenced by CastorCtdcUnpacker::unpack().
int CastorCORData::getNTP | ( | ) | const |
Get the number of trigger data samples when not zero-suppressed (not available after FW 4)
Definition at line 301 of file CastorCORData.cc.
unsigned int CastorCORData::getOrbitNumber | ( | ) | const |
Get the HTR orbit number.
Definition at line 260 of file CastorCORData.cc.
unsigned int CastorCORData::getPipelineLength | ( | ) | const |
Get the pipeline length used for this event.
Definition at line 313 of file CastorCORData.cc.
|
inline |
Get a pointer to the raw data.
Definition at line 33 of file CastorCORData.h.
Referenced by CastorCTDCHeader::copySpigotData().
|
inline |
Get the length of the raw data.
Definition at line 36 of file CastorCORData.h.
Referenced by CastorCTDCHeader::copySpigotData(), and CastorCtdcPacker::pack().
unsigned int CastorCORData::getSubmodule | ( | ) | const |
Get the HTR submodule number.
Definition at line 263 of file CastorCORData.cc.
|
inline |
Get TTCready bits.
Definition at line 147 of file CastorCORData.h.
unsigned int CastorCORData::htrSlot | ( | ) | const |
HcalElectronicsId-style HTR slot.
Definition at line 266 of file CastorCORData.cc.
unsigned int CastorCORData::htrTopBottom | ( | ) | const |
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition at line 270 of file CastorCORData.cc.
bool CastorCORData::isCalibrationStream | ( | ) | const |
Is this event a calibration-stream event?
Definition at line 278 of file CastorCORData.cc.
bool CastorCORData::isHistogramEvent | ( | ) | const |
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
Definition at line 295 of file CastorCORData.cc.
Referenced by CastorCtdcUnpacker::unpack().
bool CastorCORData::isPatternRAMEvent | ( | ) | const |
Is this event a pattern-ram event?
Definition at line 292 of file CastorCORData.cc.
bool CastorCORData::isUnsuppressed | ( | ) | const |
Is this event an unsuppresed event?
Definition at line 281 of file CastorCORData.cc.
CastorCORData & CastorCORData::operator= | ( | const CastorCORData & | hd | ) |
Definition at line 41 of file CastorCORData.cc.
void CastorCORData::pack | ( | unsigned char * | daq_lengths, |
unsigned short * | daq_samples, | ||
unsigned char * | tp_lengths, | ||
unsigned short * | tp_samples, | ||
bool | do_capid = false |
||
) |
Unpack the HTR data into TP and DAQ data sorted by channel.
daq_lengths | unsigned char[24] of lengths |
daq_samples | unsigned short [24*20] of data |
tp_lengths | unsigned char[24] of lengths |
tp_samples | unsigned short [24*20] of data |
Definition at line 155 of file CastorCORData.cc.
Referenced by pyrootRender.interactiveRender::draw(), and CastorCtdcPacker::pack().
void CastorCORData::packHeaderTrailer | ( | int | L1Anumber, |
int | bcn, | ||
int | submodule, | ||
int | orbitn, | ||
int | pipeline, | ||
int | ndd, | ||
int | nps, | ||
int | firmwareRev = 0 |
||
) |
pack header and trailer (call after pack)
Definition at line 243 of file CastorCORData.cc.
Referenced by CastorCtdcPacker::pack().
unsigned int CastorCORData::readoutVMECrateId | ( | ) | const |
HcalElectronicsId-style VME crate number.
Definition at line 274 of file CastorCORData.cc.
void CastorCORData::unpack | ( | unsigned char * | daq_lengths, |
unsigned short * | daq_samples, | ||
unsigned char * | tp_lengths, | ||
unsigned short * | tp_samples | ||
) | const |
Obtain the starting and ending pointers for external unpacking of the data.
daq_first | Pointer to a pointer to the start of the DAQ data |
daq_last | Pointer to a pointer to the end of the DAQ data |
tp_first | Pointer to a pointer to the start of the TP data |
tp_last | Pointer to a pointer to the end of the TP dataUnpack the HTR data into TP and DAQ data sorted by channel |
daq_lengths | unsigned char[24] of lengths. High bit set indicates error with this channel |
daq_samples | unsigned short [24*20] of data |
tp_lengths | unsigned char[24] of lengths |
tp_samples | unsigned short [24*20] of data |
Definition at line 100 of file CastorCORData.cc.
Referenced by CastorCtdcUnpacker::unpack().
bool CastorCORData::unpackHistogram | ( | int | fiber, |
int | fiberchan, | ||
int | capid, | ||
unsigned short * | histogram | ||
) | const |
Unpack special histogramming mode data.
fiber | |
fiberchan | |
capid | Capacitor id for which to extract a histogram |
histogram | unsigned int[32] into which the data should be deposited |
Definition at line 332 of file CastorCORData.cc.
bool CastorCORData::wasMarkAndPassZS | ( | int | fiber, |
int | fiberchan | ||
) | const |
Was this channel passed as part of Mark&Pass ZS?
Definition at line 284 of file CastorCORData.cc.
|
static |
Definition at line 16 of file CastorCORData.h.
Referenced by CastorCtdcPacker::pack(), and CastorCtdcUnpacker::unpack().
|
protected |
Definition at line 220 of file CastorCORData.h.
|
protected |
Definition at line 223 of file CastorCORData.h.
|
protected |
Definition at line 222 of file CastorCORData.h.
|
protected |
Definition at line 221 of file CastorCORData.h.
|
protected |
Definition at line 224 of file CastorCORData.h.
|
static |
Definition at line 17 of file CastorCORData.h.
Referenced by CastorCtdcPacker::pack(), and CastorCtdcUnpacker::unpack().