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