Go to the documentation of this file.
2 #ifndef CastorMergerData_H
3 #define CastorMergerData_H
26 void allocate(
int version_to_create = 0);
55 void unpack(
unsigned char* tp_lengths,
unsigned short* tp_samples)
const;
63 void pack(
unsigned char* tp_lengths,
unsigned short* tp_samples);
66 int L1Anumber,
int bcn,
int submodule,
int orbitn,
int pipeline,
int ndd,
int nps,
int firmwareRev = 0);
unsigned int getExtHdr5() const
const unsigned short * getRawData() const
Get a pointer to the raw data.
unsigned int getExtHdr2() const
unsigned short * m_ownData
int getFormatVersion() const
Get the version number of this event.
void determineSectionLengths(int &tpWords, int &headerWords, int &trailerWords) const
void determineStaticLengths(int &headerWords, int &trailerWords) const
const int getRawLength() const
Get the length of the raw data.
unsigned int getOrbitNumber() const
Get the HTR orbit number.
unsigned int getBunchNumber() const
Get the HTR bunch number.
void pack(unsigned char *tp_lengths, unsigned short *tp_samples)
Unpack the HTR data into TP and DAQ data sorted by channel.
void adoptData(const unsigned short *data, int length)
unsigned int getExtHdr6() const
unsigned int getExtHdr1() const
Get the Merger Ext Header words.
unsigned int getFirmwareRevision() const
Get the Merger firmware version.
void allocate(int version_to_create=0)
unsigned int getErrorsWord() const
Get the errors word.
void unpack(unsigned char *tp_lengths, unsigned short *tp_samples) const
Unpack the HTR data into TP and DAQ data sorted by channel.
unsigned int getExtHdr3() const
unsigned short * m_unpackedData
CastorMergerData & operator=(const CastorMergerData &)
unsigned int getExtHdr4() const
unsigned int getExtHdr8() const
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event.
const unsigned short * m_rawConst
char data[epos_bytes_allocation]
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)
unsigned int getExtHdr7() const
unsigned int getL1ANumber() const
Get the HTR event number.