#include <CastorMergerData.h>
Public Member Functions | |
void | adoptData (const unsigned short *data, int length) |
void | allocate (int version_to_create=0) |
CastorMergerData () | |
CastorMergerData (const CastorMergerData &) | |
CastorMergerData (const unsigned short *data, int length) | |
CastorMergerData (int version_to_create) | |
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 | ( | ) |
Definition at line 13 of file CastorMergerData.cc.
|
inline |
Definition at line 17 of file CastorMergerData.h.
References m_ownData.
CastorMergerData::CastorMergerData | ( | int | version_to_create | ) |
Definition at line 21 of file CastorMergerData.cc.
References allocate().
CastorMergerData::CastorMergerData | ( | const unsigned short * | data, |
int | length | ||
) |
Definition at line 14 of file CastorMergerData.cc.
References adoptData(), data, 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 44 of file CastorMergerData.cc.
References data, m_formatVersion, m_rawConst, and m_rawLength.
Referenced by CastorMergerData().
void CastorMergerData::allocate | ( | int | version_to_create = 0 | ) |
Definition at line 25 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, m_rawConst, and m_rawLength.
Referenced by 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 57 of file CastorMergerData.cc.
References m_rawConst, and m_rawLength.
|
protected |
|
protected |
Definition at line 92 of file CastorMergerData.cc.
Referenced by pack().
|
inline |
|
inline |
|
inline |
Get the Merger Ext Header words.
Definition at line 76 of file CastorMergerData.h.
References m_rawConst.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
unsigned int CastorMergerData::getFirmwareRevision | ( | ) | const |
Get the Merger firmware version.
Definition at line 141 of file CastorMergerData.cc.
References m_rawConst.
|
inline |
Get the version number of this event.
Definition at line 35 of file CastorMergerData.h.
References m_formatVersion.
|
inline |
unsigned int CastorMergerData::getOrbitNumber | ( | ) | const |
Get the HTR orbit number.
Definition at line 139 of file CastorMergerData.cc.
References m_rawConst.
|
inline |
Get a pointer to the raw data.
Definition at line 38 of file CastorMergerData.h.
References m_rawConst.
|
inline |
Get the length of the raw data.
Definition at line 41 of file CastorMergerData.h.
References m_rawLength.
Referenced by CastorCtdcPacker::pack().
CastorMergerData & CastorMergerData::operator= | ( | const CastorMergerData & | hd | ) |
Definition at line 35 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, m_rawConst, and m_rawLength.
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 96 of file CastorMergerData.cc.
References determineStaticLengths(), m_ownData, m_rawLength, and testProducerWithPsetDescEmpty_cfi::x1.
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 121 of file CastorMergerData.cc.
References m_formatVersion, m_ownData, and m_rawLength.
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 69 of file CastorMergerData.cc.
References determineSectionLengths(), and m_rawConst.
|
protected |
Definition at line 89 of file CastorMergerData.h.
Referenced by adoptData(), allocate(), getFormatVersion(), operator=(), and packHeaderTrailer().
|
protected |
Definition at line 92 of file CastorMergerData.h.
Referenced by allocate(), CastorMergerData(), operator=(), pack(), packHeaderTrailer(), and ~CastorMergerData().
|
protected |
Definition at line 91 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 90 of file CastorMergerData.h.
Referenced by adoptData(), allocate(), check(), getRawLength(), operator=(), pack(), and packHeaderTrailer().
|
protected |
Definition at line 93 of file CastorMergerData.h.