12 unsigned int wdPerBX = 6;
18 int firstBX = -(
ceil((
double)nBX / 2.) - 1);
21 lastBX =
ceil((
double)nBX / 2.);
23 lastBX =
ceil((
double)nBX / 2.) - 1;
27 res_->setBXRange(firstBX, lastBX);
29 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
33 for (
int bx = firstBX;
bx <= lastBX;
bx++) {
36 LogDebug(
"L1T") <<
"Creating GT External Block for BX =" <<
bx;
38 res_->push_back(
bx, tExt);
46 int extOffset = ((block.
header().
getID() - 24) / 2) * 64;
48 for (
unsigned int wd = 0; wd < wdPerBX; wd++) {
49 uint32_t raw_data = block.
payload()[wd + numBX * wdPerBX];
50 LogDebug(
"L1T") <<
" payload word " << wd <<
" 0x" << hex << raw_data;
53 for (
unsigned int bt = 0; bt < 32; bt++) {
54 int val = ((raw_data >> bt) & 0x1);
55 int extBit = bt + wd * 32 + extOffset;
63 res_->set(
bx, 0, ext);
constexpr int32_t ceil(float num)
const std::vector< uint32_t > & payload() const
BlockHeader header() const
static const unsigned int numBX
void setExternalDecision(unsigned int bit, bool val)
Set decision bits.
bool unpack(const Block &block, UnpackerCollections *coll) override
#define DEFINE_L1T_UNPACKER(type)