116 }
else if (source ==
REMOTE) {
119 }
else if (source ==
LOCAL || source ==
TOTAL) {
134 }
else if (source ==
REMOTE) {
137 }
else if (source ==
LOCAL || source ==
TOTAL) {
152 }
else if (source ==
REMOTE) {
155 }
else if (source ==
LOCAL || source ==
TOTAL) {
166 unsigned int map = 0;
177 unsigned int map = 0;
189 unsigned int map = 0;
200 const unsigned int ex,
const unsigned int ey,
201 const unsigned int et,
const int exError,
220 unsigned int sum =
ex;
224 for (
int i = 0; i < 3; ++i) {
248 const unsigned int map)
252 const int source =
TOTAL + 1;
267 const int source =
TOTAL + 2;
280 const unsigned int map)
284 const int source =
TOTAL;
369 for (
int pin = 0; pin <
s_maxJems; ++pin) {
425 std::vector<uint32_t>::const_iterator pos;
443 for (
int pin = 0; pin <
s_maxJems; ++pin) {
497 exErrRem, eyErrRem, etErrRem);
499 exErrLoc, eyErrLoc, etErrLoc);
501 exErrTot, eyErrTot, etErrTot);
int exError(int slice, int source) const
Return Ex subsum error for given JEM or source ID.
static const uint32_t s_exMask
static const int s_errorBit
void setMissingEtSigHits(int slice, unsigned int map)
Store Missing-ET-Sig Hits map.
static const int s_dataWordId
bool unpackUncompressed()
Unpack uncompressed data.
static const int s_fifoOverflowPin
static const uint32_t s_remoteErrorMask
static const int s_paddingBits
static const uint32_t s_etHitsMask
unsigned int ey(int slice, int source) const
Return Ey subsum for given JEM or source ID.
static const int s_jemErrorBit
static const int s_jemSumBits
unsigned int et(int slice, int source) const
Return Et subsum for given JEM or source ID.
std::vector< uint32_t > m_sumsData
Energy subsums data.
static const uint32_t s_errorMask
void setSumEtHits(int slice, unsigned int map)
Store Sum-Et Hits map.
bool packNeutral()
Pack neutral data.
static const uint32_t s_etHitsMaskV1
static const int s_wordLength
Data word length.
void clear()
Clear all data.
static const int s_dataWordIdBit
bool packUncompressed()
Pack uncompressed data.
static const int s_etMissSigBit
bool unpackNeutral()
Unpack neutral data.
static const uint32_t s_etMissSigMask
unsigned int sumEtHits(int slice) const
Return Sum-Et Hits map.
static const int s_etMissBit
int eyError(int slice, int source) const
Return Ey subsum error for given JEM or source ID.
static const int s_maxJems
static const int s_maxSums
unsigned int missingEtSigHits(int slice) const
Return Missing-ET-Sig Hits map.
bool unpack()
Unpack data.
static const uint32_t s_eyMask
static const uint32_t s_etMissMask
void setSubsums(int slice, int source, unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError)
Store energy subsums and errors for given JEM or source ID.
int index(int slice, int source) const
int sourceId(uint32_t word) const
static const int s_bunchCrossingBits
static const int s_sumBits
unsigned int missingEtHits(int slice) const
Return Missing-ET Hits map.
int etError(int slice, int source) const
Return Et subsum error for given JEM or source ID.
void setMissingEtHits(int slice, unsigned int map)
Store Missing-ET Hits map.
static const uint32_t s_etMask
static const int s_sourceIdBit
static const uint32_t s_sumsMask
static const int s_etHitsBit
static const uint32_t s_sourceIdMask
unsigned int ex(int slice, int source) const
Return Ex subsum for given JEM or source ID.
void setDaqOverflow(int bit=1)
Set DAQ FIFO Overflow bit in Sub-status word.
void setGlinkParity(int bit=1)
Set G-Link Parity bit in Sub-status word.
void packer(uint32_t datum, int nbits)
Pack given data into given number of bits.
uint32_t unpacker(int nbits)
Unpack given number of bits of data.
void setUnpackErrorCode(int code)
Set the unpacking error code.
bool unpackerSuccess() const
Return unpacker success flag.
bool unpackerNeutralParityError(int pin)
Unpack and test G-Link parity bit for given pin.
void clear()
Clear all data.
void packerNeutralParity(int pin)
Pack current G-Link parity bit for given pin.
void packerFlush()
Flush the current data word padded with zeros.
uint32_t unpackerNeutral(int pin, int nbits)
Unpack given number of bits of neutral data for given pin.
int bunchCrossing() const
Return the Bunch Crossing number (neutral format only)
void unpackerInit()
Initialise unpacker.
void packerNeutral(int pin, uint32_t datum, int nbits)
Pack given neutral data from given pin.
void setBunchCrossing(int bc)
Set the Bunch Crossing number (neutral format only)