29 unsigned int bxid = block.
amc().getBX();
32 if( (tmt-1) != ((bxid-1+3)%9) )
return true;
33 LogDebug(
"L1T") <<
"Unpacking TMT # " << tmt <<
" for BX " << bxid;
39 unsigned link_phi = (link % 2 == 0) ? link : (link -1);
47 int firstBX = -(std::ceil((
double)nBX/2.)-1);
50 lastBX = std::ceil((
double)nBX/2.);
52 lastBX = std::ceil((
double)nBX/2.)-1;
56 res_->setBXRange(
std::min(firstBX, res_->getFirstBX()),
std::max(lastBX, res_->getLastBX()));
58 LogDebug(
"L1T") <<
"Block : id=" << block.
header().
getID() <<
", size=" << block.
header().
getSize() <<
", link=" << link <<
", link_phi=" << link_phi <<
", nBX=" << nBX <<
", firstBX=" << firstBX <<
", lastBX=" << lastBX;
61 for (
int bx=firstBX; bx<=lastBX; bx++){
63 for (
unsigned iframe=0; iframe<nframes && iframe<block.
header().
getSize(); ++iframe) {
65 uint32_t raw_data = block.
payload().at(iframe);
67 if ((raw_data & 0xFFFF) != 0) {
72 tower1.
setHwPt(raw_data & 0x1FF);
78 if (link % 2!=0) ieta = ieta * -1;
83 <<
" phi " << tower1.
hwPhi()
84 <<
" pT " << tower1.
hwPt()
85 <<
" frame " << iframe
86 <<
" qual " << tower1.
hwQual()
89 res_->push_back(bx,tower1);
92 if (((raw_data >> 16)& 0xFFFF) != 0) {
97 tower2.
setHwPt((raw_data >> 16) & 0x1FF);
98 tower2.
setHwQual((raw_data >> 28 ) & 0xF);
103 if (link % 2!=0) ieta = ieta * -1;
107 <<
" phi " << tower2.
hwPhi()
108 <<
" pT " << tower2.
hwPt()
109 <<
" frame " << iframe
110 <<
" qual " << tower2.
hwQual()
113 res_->push_back(bx,tower2);
BlockHeader header() const
unsigned int offsetBoardId
std::vector< uint32_t > payload() const
#define DEFINE_L1T_UNPACKER(type)
void setHwEtRatio(int ratio)
virtual bool unpack(const Block &block, UnpackerCollections *coll) override
void amc(const amc::Header &h)