19 unsigned int bxid = block.
amc().getBX();
22 if( (tmt-1) != ((bxid-1+3)%9) )
return true;
23 LogDebug(
"L1T") <<
"Unpacking TMT # " << tmt <<
" for BX " << bxid;
29 unsigned link_phi = (link % 2 == 0) ? link : (link -1);
37 int firstBX = -(std::ceil((
double)nBX/2.)-1);
40 lastBX = std::ceil((
double)nBX/2.);
42 lastBX = std::ceil((
double)nBX/2.)-1;
46 res_->setBXRange(
std::min(firstBX, res_->getFirstBX()),
std::max(lastBX, res_->getLastBX()));
48 LogDebug(
"L1T") <<
"Block : id=" << block.
header().
getID() <<
", size=" << block.
header().
getSize() <<
", link=" << link <<
", link_phi=" << link_phi <<
", nBX=" << nBX <<
", firstBX=" << firstBX <<
", lastBX=" << lastBX;
51 for (
int bx=firstBX; bx<=lastBX; bx++){
53 for (
unsigned iframe=0; iframe<nframes && iframe<block.
header().
getSize(); ++iframe) {
55 uint32_t raw_data = block.
payload().at(iframe);
57 if ((raw_data & 0xFFFF) != 0) {
62 tower1.
setHwPt(raw_data & 0x1FF);
68 if (link % 2!=0) ieta = ieta * -1;
73 <<
" phi " << tower1.
hwPhi()
74 <<
" pT " << tower1.
hwPt()
75 <<
" frame " << iframe
76 <<
" qual " << tower1.
hwQual()
79 res_->push_back(bx,tower1);
82 if (((raw_data >> 16)& 0xFFFF) != 0) {
87 tower2.
setHwPt((raw_data >> 16) & 0x1FF);
88 tower2.
setHwQual((raw_data >> 28 ) & 0xF);
93 if (link % 2!=0) ieta = ieta * -1;
97 <<
" phi " << tower2.
hwPhi()
98 <<
" pT " << tower2.
hwPt()
99 <<
" frame " << iframe
100 <<
" qual " << tower2.
hwQual()
103 res_->push_back(bx,tower2);
BlockHeader header() const
unsigned int offsetBoardId
std::vector< uint32_t > payload() const
void setHwEtRatio(int ratio)
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)