29 int firstBX = -(std::ceil((
double)nBX/2.)-1);
32 lastBX = std::ceil((
double)nBX/2.);
34 lastBX = std::ceil((
double)nBX/2.)-1;
38 res_->setBXRange(
std::min(firstBX, res_->getFirstBX()),
std::max(lastBX, res_->getLastBX()));
40 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
49 unsigned link_phi = (link % 2 == 0) ? link : (link -1);
52 for (
int bx=firstBX; bx<=lastBX; bx++){
54 for (
unsigned frame=1; frame<42 && frame<(block.
header().
getSize()+1); frame++){
56 uint32_t raw_data = block.
payload()[i++];
58 if ((raw_data & 0xFFFF) != 0) {
63 tower1.
setHwPt(raw_data & 0x1FF);
75 <<
" phi " << tower1.
hwPhi()
76 <<
" pT " << tower1.
hwPt()
78 <<
" qual " << tower1.
hwQual()
81 res_->push_back(bx,tower1);
84 if (((raw_data >> 16)& 0xFFFF) != 0) {
89 tower2.
setHwPt((raw_data >> 16) & 0x1FF);
90 tower2.
setHwQual((raw_data >> 28 ) & 0xF);
101 <<
" phi " << tower2.
hwPhi()
102 <<
" pT " << tower2.
hwPt()
103 <<
" frame " << frame
104 <<
" qual " << tower2.
hwQual()
107 res_->push_back(bx,tower2);
BlockHeader header() const
std::vector< uint32_t > payload() const
#define DEFINE_L1T_UNPACKER(type)
void setHwEtRatio(int ratio)
virtual bool unpack(const Block &block, UnpackerCollections *coll) override