12 int nBX, firstBX, lastBX;
16 auto resHFBitCounts_ =
static_cast<CaloCollections*
>(coll)->getCaloSpareHFBitCounts();
17 resHFBitCounts_->setBXRange(firstBX, lastBX);
19 auto resHFRingSums_ =
static_cast<CaloCollections*
>(coll)->getCaloSpareHFRingSums();
20 resHFRingSums_->setBXRange(firstBX, lastBX);
22 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
28 for (
int bx = firstBX;
bx <= lastBX;
bx++) {
29 uint32_t raw_data0 = block.
payload()[i++];
30 uint32_t raw_data1 = block.
payload()[i++];
35 candbit[0] = raw_data0 & 0xFFFF;
36 candbit[1] = raw_data1 & 0xFFFF;
38 int hfbitcount = candbit[0] & 0xFFF;
39 int hfringsum = ((candbit[0] >> 12) & 0x7) | ((candbit[1] & 0x1FF) << 3);
45 resHFBitCounts_->push_back(
bx, hfbc);
51 resHFRingSums_->push_back(
bx, hfrs);
constexpr int32_t ceil(float num)
const std::vector< uint32_t > & payload() const
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
void setType(CaloSpareType type)
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)