5#ifndef TRIGT1CALOBYTESTREAM_CPMSUBBLOCK_H
6#define TRIGT1CALOBYTESTREAM_CPMSUBBLOCK_H
37 int emErr,
int hadErr);
39 void setHits(
int slice,
unsigned int hit0,
unsigned int hit1);
97 int dataId(uint32_t word)
const;
99 int data(
int slice,
int channel,
int offset)
const;
101 int error(
int slice,
int channel,
int offset)
const;
103 unsigned int hits(
int slice,
int offset)
const;
107 void resize(std::vector<uint32_t>&
vec,
int channels);
std::vector< size_t > vec
char data[hepevt_bytes_allocation_ATLAS]
bool unpack()
Unpack data.
int timeslices() const
Return number of timeslices.
static const int s_ttBits
static const int s_fpgaBit
static const int s_parityABit
static const int s_wordIdVal
CPM header word ID.
static const uint32_t s_threshMask
static const int s_ttWordId
void setCpmHeader(int version, int format, int slice, int crate, int module, int timeslices)
Store CPM header.
static const int s_pairsPerPin
static const int s_ttDataABit
static const int s_pairBit
static const int s_errBits
static const int s_wordsPerPin
static const int s_wordLength
Data word length.
static const int s_indicatorBit
int emData(int slice, int channel) const
Return Em data for given channel.
static const int s_ttDataBBit
std::vector< uint32_t > m_ttData
Trigger tower data.
static const uint32_t s_dataIdMask
static const int s_hitWords
static const int s_linkDownABit
bool anyTowerData(int channel) const
Return true if there is tower data for given channel.
int emError(int slice, int channel) const
Return Em error for given channel.
bool packUncompressed()
Pack uncompressed data.
bool packNeutral()
Pack neutral data.
static const uint32_t s_threshWordId
static const int s_glinkPins
void clear()
Clear all data.
std::vector< uint32_t > m_hitData
Hit counts.
bool unpackNeutral()
Unpack neutral data.
int hadError(int slice, int channel) const
Return Had error for given channel.
static const uint32_t s_pairPinMask
static const int s_hitBits
std::vector< int > m_chanPresent
Channel present flags vector.
static const int s_linkDownBBit
static const int s_glinkBitsPerSlice
static const int s_parityBBit
unsigned int hits(int slice, int offset) const
Return hit counts with given offset.
bool unpackUncompressed()
Unpack uncompressed data.
int m_channels
Number of Trigger tower channels per module.
unsigned int hits0(int slice) const
Return e/gamma hit counts.
unsigned int hits1(int slice) const
Return tau hit counts.
static const uint32_t s_ttDataMask
void resize(std::vector< uint32_t > &vec, int channels)
Resize a data vector according to format.
static const int s_dataIdBit
int hadData(int slice, int channel) const
Return Had data for given channel.
int dataId(uint32_t word) const
Return data WordID.
void setHits(int slice, unsigned int hit0, unsigned int hit1)
Store hit counts.
void fillTowerData(int slice, int channel, int em, int had, int emErr, int hadErr)
Store trigger tower data.