5#ifndef TRIGT1CALOBYTESTREAM_CMXJETSUBBLOCK_H
6#define TRIGT1CALOBYTESTREAM_CMXJETSUBBLOCK_H
53 unsigned int hits(
int slice,
int source,
int flag)
const;
133 int jem(uint32_t word)
const;
134 int hlFlag(uint32_t word)
const;
138 unsigned int hitIndex(
int slice,
int source,
int flag)
const;
unsigned int parIndex(int slice, int jem) const
static const int s_threshBit
static const uint32_t s_dataWordIdMask
static const uint32_t s_topoCheckMask
static const int s_muxPhases
static const int s_sourceIdBit
int energyLarge(int slice, int jem, int tob) const
Return energy large window size for given jem and tob.
std::vector< unsigned int > m_presenceMaps
Presence maps.
static const int s_threshWordId
static const int s_threshHlFlagBit
bool unpackNeutral()
Unpack neutral data.
static const int s_topoCountsBits
std::vector< uint32_t > m_tobData
TOB data.
static const int s_coordBits
int localCoord(int slice, int jem, int tob) const
Return Local coordinate for given jem and tob.
void setParityBits(int slice, int jem, int parity)
Store parity bits for neutral format.
static const uint32_t s_tobEnergyLgMask
static const int s_topoPaddingBits
static const int s_tobEnergySmBit
bool unpack()
Unpack data.
int frame(int slice, int jem, int tob) const
Return frame for given jem and tob.
bool unpackUncompressed()
Unpack uncompressed data.
static const int s_tobWordId
int jem(uint32_t word) const
static const int s_parityErrorBits
int energySmall(int slice, int jem, int tob) const
Return energy small window size for given jem and tob.
int sourceId(uint32_t word) const
static const int s_energySmBits[8]
bool packUncompressed()
Pack uncompressed data.
unsigned int hits(int slice, int source, int flag) const
Return hit/topo counts for given source ID and HL flag.
static const int s_tobEnergyLgBit
static const int s_topoMapBits
static const uint32_t s_threshMainMask
unsigned int presenceMap(int slice, int jem) const
Return presence map for given JEM.
static const int s_bunchCrossingBits
static const uint32_t s_tobEnergySmMask
static const int s_threshMainBits
unsigned int mapIndex(int slice, int jem) const
static const int s_topoHlFlagBit
int parityBits(int slice, int jem) const
Return parity bits for given JEM.
unsigned int hitIndex(int slice, int source, int flag) const
static const int s_hlFlagBit
static const uint32_t s_threshFwdLMask
static const uint32_t s_sourceIdMask
static const int s_fifoOverflowBits
std::vector< int > m_parityBits
Parity data for neutral format.
static const int s_threshFwdLBits
static const int s_threshFwdHBits
unsigned int tobIndex(int slice, int jem, int tob) const
static const int s_presenceBits
static const uint32_t s_tobJemMask
static const uint32_t s_tobCoordMask
static const int s_dataWordIdBit
void setHits(int slice, int source, int flag, unsigned int hits, int error)
Store hit counts for given source ID and HL flag.
static const int s_energyLgBits
static const int s_tobCoordBit
static const int s_tobFrameBit
static const uint32_t s_topoMapMask
static const uint32_t s_tobFrameMask
static const int s_paddingBits
std::vector< uint32_t > m_hitsData
Hits and topo data.
static const uint32_t s_threshFwdHMask
static const uint32_t s_errorMask
int dataWordId(uint32_t word) const
static const int s_tobErrorBit
static const int s_tobJemBit
static const int s_roiOverflowBits
void setPresenceMap(int slice, int jem, unsigned int map)
Store presence map.
static const int s_modules
void setTob(int slice, int jem, int frame, int loc, int energyLarge, int energySmall, int error)
Store TOB (RoI) data for given JEM, frame, local coord.
static const int s_wordLength
Data word length.
std::vector< int > m_jemTobCount
JEM TOB count vector for unpacking.
void clear()
Clear all data.
static const uint32_t s_topoCountsMask
int hitsError(int slice, int source, int flag) const
Return hit error for given source ID and HL flag.
static const int s_topoChecksumBits
static const uint32_t s_hlFlagMask
static const int s_glinkPins
static const uint32_t s_tobErrorMask
bool packNeutral()
Pack neutral data.
static const int s_threshErrorBit
int tobError(int slice, int jem, int tob) const
Return error bit for given jem and tob.
int hlFlag(uint32_t word) const
static const int s_tobsPerModule