#include <CastorMergerData.h>
Public Member Functions | |
void | adoptData (const unsigned short *data, int length) |
void | allocate (int version_to_create=0) |
CastorMergerData () | |
CastorMergerData (int version_to_create) | |
CastorMergerData (const unsigned short *data, int length) | |
CastorMergerData (const CastorMergerData &) | |
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 | getErrorsWord () const |
Get the errors word. More... | |
unsigned int | getExtHdr1 () const |
Get the Merger 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 | getFirmwareRevision () const |
Get the Merger firmware version. More... | |
int | getFormatVersion () const |
Get the version number of this event. More... | |
unsigned int | getL1ANumber () const |
Get the HTR event number. More... | |
unsigned int | getOrbitNumber () const |
Get the HTR orbit number. 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... | |
CastorMergerData & | operator= (const CastorMergerData &) |
void | pack (unsigned char *tp_lengths, unsigned short *tp_samples) |
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... | |
void | unpack (unsigned char *tp_lengths, unsigned short *tp_samples) const |
Unpack the HTR data into TP and DAQ data sorted by channel. More... | |
~CastorMergerData () | |
Protected Member Functions | |
void | determineSectionLengths (int &tpWords, int &headerWords, int &trailerWords) const |
void | determineStaticLengths (int &headerWords, int &trailerWords) 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 CastorMergerData 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 CastorMergerData.h.
CastorMergerData::CastorMergerData | ( | ) |
|
inline |
Definition at line 18 of file CastorMergerData.h.
References adoptData(), allocate(), CastorMergerData(), data, getFirmwareRevision(), m_ownData, and operator=().
CastorMergerData::CastorMergerData | ( | int | version_to_create | ) |
CastorMergerData::CastorMergerData | ( | const unsigned short * | data, |
int | length | ||
) |
Definition at line 14 of file CastorMergerData.cc.
References adoptData(), and m_ownData.
CastorMergerData::CastorMergerData | ( | const CastorMergerData & | hd | ) |
Definition at line 18 of file CastorMergerData.cc.
void CastorMergerData::adoptData | ( | const unsigned short * | data, |
int | length | ||
) |
Definition at line 43 of file CastorMergerData.cc.
References data, m_formatVersion, m_rawConst, and m_rawLength.
Referenced by CastorMergerData(), and ~CastorMergerData().
void CastorMergerData::allocate | ( | int | version_to_create = 0 | ) |
Definition at line 24 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, m_rawConst, and m_rawLength.
Referenced by CastorMergerData(), and ~CastorMergerData().
bool CastorMergerData::check | ( | ) | const |
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event.
Definition at line 56 of file CastorMergerData.cc.
References m_rawConst, and m_rawLength.
Referenced by getRawLength().
|
protected |
Definition at line 86 of file CastorMergerData.cc.
References m_rawConst.
Referenced by getExtHdr8(), and unpack().
|
protected |
Definition at line 93 of file CastorMergerData.cc.
Referenced by getExtHdr8(), and pack().
|
inline |
Get the HTR bunch number.
Definition at line 76 of file CastorMergerData.h.
References getOrbitNumber(), and m_rawConst.
|
inline |
Get the errors word.
Definition at line 30 of file CastorMergerData.h.
References m_rawConst.
Referenced by CastorCTDCHeader::copyMergerData().
|
inline |
Get the Merger Ext Header words.
Definition at line 84 of file CastorMergerData.h.
References m_rawConst.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 98 of file CastorMergerData.h.
References determineSectionLengths(), determineStaticLengths(), and m_rawConst.
unsigned int CastorMergerData::getFirmwareRevision | ( | ) | const |
Get the Merger firmware version.
Definition at line 147 of file CastorMergerData.cc.
References m_rawConst.
Referenced by ~CastorMergerData().
|
inline |
Get the version number of this event.
Definition at line 34 of file CastorMergerData.h.
References m_formatVersion.
|
inline |
unsigned int CastorMergerData::getOrbitNumber | ( | ) | const |
Get the HTR orbit number.
Definition at line 143 of file CastorMergerData.cc.
References m_rawConst.
Referenced by getBunchNumber().
|
inline |
Get a pointer to the raw data.
Definition at line 37 of file CastorMergerData.h.
References m_rawConst.
Referenced by CastorCTDCHeader::copyMergerData().
|
inline |
Get the length of the raw data.
Definition at line 40 of file CastorMergerData.h.
References check(), m_rawLength, pack(), packHeaderTrailer(), and unpack().
Referenced by CastorCTDCHeader::copyMergerData(), and CastorCtdcPacker::pack().
CastorMergerData & CastorMergerData::operator= | ( | const CastorMergerData & | hd | ) |
Definition at line 34 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, m_rawConst, and m_rawLength.
Referenced by ~CastorMergerData().
void CastorMergerData::pack | ( | unsigned char * | tp_lengths, |
unsigned short * | tp_samples | ||
) |
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 98 of file CastorMergerData.cc.
References determineStaticLengths(), m_ownData, and m_rawLength.
Referenced by pyrootRender.interactiveRender::draw(), and getRawLength().
void CastorMergerData::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 126 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, and m_rawLength.
Referenced by getRawLength().
void CastorMergerData::unpack | ( | unsigned char * | tp_lengths, |
unsigned short * | tp_samples | ||
) | const |
Unpack 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 67 of file CastorMergerData.cc.
References determineSectionLengths(), and m_rawConst.
Referenced by getRawLength().
|
protected |
Definition at line 107 of file CastorMergerData.h.
Referenced by adoptData(), allocate(), getFormatVersion(), operator=(), and packHeaderTrailer().
|
protected |
Definition at line 110 of file CastorMergerData.h.
Referenced by allocate(), CastorMergerData(), operator=(), pack(), packHeaderTrailer(), and ~CastorMergerData().
|
protected |
Definition at line 109 of file CastorMergerData.h.
Referenced by adoptData(), allocate(), check(), determineSectionLengths(), getBunchNumber(), getErrorsWord(), getExtHdr1(), getExtHdr2(), getExtHdr3(), getExtHdr4(), getExtHdr5(), getExtHdr6(), getExtHdr7(), getExtHdr8(), getFirmwareRevision(), getL1ANumber(), getOrbitNumber(), getRawData(), operator=(), and unpack().
|
protected |
Definition at line 108 of file CastorMergerData.h.
Referenced by adoptData(), allocate(), check(), getRawLength(), operator=(), pack(), and packHeaderTrailer().
|
protected |
Definition at line 111 of file CastorMergerData.h.