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);
void unpack(unsigned char *tp_lengths, unsigned short *tp_samples) const
Unpack the HTR data into TP and DAQ data sorted by channel.
void adoptData(const unsigned short *data, int length)
unsigned short * m_unpackedData
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 getExtHdr8() const
unsigned int getErrorsWord() const
Get the errors word.
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
unsigned int getExtHdr3() const
CastorMergerData & operator=(const CastorMergerData &)
unsigned int getExtHdr4() const
unsigned int getExtHdr5() const
const unsigned short * m_rawConst
unsigned int getExtHdr7() const
unsigned int getL1ANumber() const
Get the HTR event number.
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 getExtHdr2() const
const unsigned short * getRawData() const
Get a pointer to the raw data.
unsigned int getOrbitNumber() const
Get the HTR orbit number.
unsigned int getBunchNumber() const
Get the HTR bunch number.
int getFormatVersion() const
Get the version number of this event.
char data[epos_bytes_allocation]
unsigned short * m_ownData
void determineSectionLengths(int &tpWords, int &headerWords, int &trailerWords) const
void determineStaticLengths(int &headerWords, int &trailerWords) const
void pack(unsigned char *tp_lengths, unsigned short *tp_samples)
Unpack the HTR data into TP and DAQ data sorted by channel.
const int getRawLength() const
Get the length of the raw data.