#include <CaloSpareHFUnpacker.h>
Definition at line 8 of file CaloSpareHFUnpacker.h.
Implements l1t::Unpacker.
Definition at line 10 of file CaloSpareHFUnpacker.cc.
References coll, DEFINE_L1T_UNPACKER, l1t::getBXRange(), l1t::BlockHeader::getID(), l1t::BlockHeader::getSize(), l1t::Block::header(), l1t::CaloSpare::HFBitCount, l1t::CaloSpare::HFRingSum, l1t::L1Candidate::hwPt(), mps_fire::i, createfilelist::int, LogDebug, l1t::Block::payload(), l1t::L1Candidate::setHwPt(), and l1t::CaloSpare::setType().
13 LogDebug(
"L1T") <<
"Block ID = " <<
block.header().getID() <<
" size = " <<
block.header().getSize();
15 int nBX, firstBX, lastBX;
16 nBX =
int(ceil(
block.header().getSize() / 2.));
19 auto resHFBitCounts_ =
static_cast<CaloCollections*
>(
coll)->getCaloSpareHFBitCounts();
20 resHFBitCounts_->setBXRange(firstBX, lastBX);
22 auto resHFRingSums_ =
static_cast<CaloCollections*
>(
coll)->getCaloSpareHFRingSums();
23 resHFRingSums_->setBXRange(firstBX, lastBX);
25 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
31 for (
int bx=firstBX; bx<=lastBX; bx++){
32 uint32_t raw_data0 =
block.payload()[i++];
33 uint32_t raw_data1 =
block.payload()[i++];
38 candbit[0] = raw_data0 & 0xFFFF;
39 candbit[1] = raw_data1 & 0xFFFF;
41 int hfbitcount=candbit[0] & 0xFFF;
42 int hfringsum=((candbit[0]>>12) & 0x7) | ((candbit[1] & 0x1FF) << 3);
48 resHFBitCounts_->push_back(bx,hfbc);
54 resHFRingSums_->push_back(bx,hfrs);
void getBXRange(int nbx, int &first, int &last)
void setType(CaloSpareType type)