20 bxBlocks = block.
getBxBlocks((
unsigned int)6,
true);
22 bxBlocks = block.
getBxBlocks((
unsigned int)6,
false);
27 int firstBX = 0, lastBX = 0;
29 if (!bxBlocks.empty()) {
30 nBX = bxBlocks[0].header().getTotalBx();
36 LogDebug(
"L1T") <<
"No BXs included in the given Block. Set the BXRange to be (-2,2).";
40 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" firstBX = " << firstBX <<
" lastBX = " << lastBX;
42 int processor = block.
amc().getBoardID() - 1;
43 if ( processor < 0 || processor > 11 )
45 edm::LogInfo (
"l1t:stage2::BMTFUnpackerOutput::unpack") <<
"Processor found out of range so it will be calculated by the old way";
46 if ( block.
amc().getAMCNumber()%2 != 0 )
47 processor = block.
amc().getAMCNumber()/2 ;
49 processor = 6 + (block.
amc().getAMCNumber()/2 -1);
52 for (
auto bxBlock : bxBlocks) {
53 int ibx = bxBlock.header().getBx();
55 for (
auto iw = 0; iw < 6; iw+=2) {
56 uint32_t raw_first = bxBlock.payload()[iw];
57 uint32_t raw_secnd = bxBlock.payload()[iw+1];
60 LogDebug(
"L1T") <<
"Raw data is zero";
70 if ( muCand.
hwQual() != 0 ) {
bool unpack(const Block &block, UnpackerCollections *coll) override
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
const int hwQual() const
Get quality code.
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
std::vector< BxBlock > BxBlocks
static void fillRegionalMuonCand(RegionalMuonCand &, uint32_t, uint32_t, int, tftype)
void setBXRange(int bxFirst, int bxLast)
BxBlocks getBxBlocks(unsigned int payloadWordsPerBx, bool bxHeader) const
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
void push_back(int bx, T object)