5#ifndef TRIGT1CALOBYTESTREAM_CPMSUBBLOCKV2_H
6#define TRIGT1CALOBYTESTREAM_CPMSUBBLOCKV2_H
37 int emErr,
int hadErr);
87 int dataId(uint32_t word)
const;
89 int data(
int slice,
int channel,
int offset)
const;
91 int error(
int slice,
int channel,
int offset)
const;
95 void resize(std::vector<uint32_t>&
vec,
int channels);
std::vector< size_t > vec
char data[hepevt_bytes_allocation_ATLAS]
int hadData(int slice, int channel) const
Return Had data for given channel.
bool unpackNeutral()
Unpack neutral data.
static const int s_linkDownBBit
static const int s_wordIdVal
CPM header word ID.
int hadError(int slice, int channel) const
Return Had error for given channel.
int dataId(uint32_t word) const
Return data WordID.
static const int s_glinkBitsPerSlice
static const int s_bcnBits
static const int s_fpgaBit
int m_channels
Number of Trigger tower channels per module.
static const int s_linkDownABit
bool unpackUncompressed()
Unpack uncompressed data.
int emError(int slice, int channel) const
Return Em error for given channel.
static const int s_pairBit
bool unpack()
Unpack data.
static const uint32_t s_ttDataMask
static const int s_parityABit
void resize(std::vector< uint32_t > &vec, int channels)
Resize a data vector according to format.
int emData(int slice, int channel) const
Return Em data for given channel.
static const int s_wordLength
Data word length.
static const int s_pairsPerPin
void clear()
Clear all data.
int timeslices() const
Return number of timeslices.
static const int s_ttDataBBit
bool packUncompressed()
Pack uncompressed data.
static const uint32_t s_dataIdMask
std::vector< int > m_chanPresent
Channel present flags vector.
static const int s_parityBBit
void fillTowerData(int slice, int channel, int em, int had, int emErr, int hadErr)
Store trigger tower data.
static const int s_ttWordId
static const int s_glinkPins
std::vector< uint32_t > m_ttData
Trigger tower data.
void setCpmHeader(int version, int format, int slice, int crate, int module, int timeslices)
Store CPM header.
static const int s_ttBits
bool packNeutral()
Pack neutral data.
static const uint32_t s_pairPinMask
static const int s_errBits
static const int s_bcnPin
static const int s_wordsPerPin
static const int s_ttDataABit
bool anyTowerData(int channel) const
Return true if there is tower data for given channel.
static const int s_dataIdBit