28 int nBX, firstBX, lastBX;
43 LogDebug(
"L1T") <<
"nBX = " << nBX <<
" first BX = " << firstBX <<
" lastBX = " << lastBX;
47 for (
const auto& bxBlock : bxBlocks) {
49 const auto bx = bxBlock.header().getBx();
50 if (bx < firstBX || bx > lastBX) {
51 throw cms::Exception(
"CorruptData") <<
"Corrupt RAW data from FED " <<
fed_ <<
", AMC " << block.
amc().getAMCNumber() <<
". BX number " << bx <<
" in BX header is outside of the BX range [" << firstBX <<
"," << lastBX <<
"] defined in the block header.";
62 unsigned int i = startIdx;
64 if (i +
nWords_ <= payload.size()) {
65 for (
unsigned nWord = 0; nWord <
nWords_; nWord += 2) {
66 uint32_t raw_data_00_31 = payload[i++];
67 uint32_t raw_data_32_63 = payload[i++];
68 LogDebug(
"L1T") <<
"raw_data_00_31 = 0x" << hex << raw_data_00_31 <<
" raw_data_32_63 = 0x" << raw_data_32_63;
71 LogDebug(
"L1T") <<
"Muon hwPt zero. Skip.";
84 edm::LogWarning(
"L1T") <<
"Only " << payload.size() - i <<
" 32 bit words in this BX but " <<
nWords_ <<
" are required. Not unpacking the data for BX " << bx <<
".";
unsigned int algoVersion_
static unsigned bxzs_enable_shift_
void getBXRange(int nbx, int &first, int &last)
BlockHeader header() const
std::vector< uint32_t > payload() const
bool unpack(const Block &block, UnpackerCollections *coll) override
void unpackBx(int bx, const std::vector< uint32_t > &payload, unsigned int startIdx=0)
static const unsigned ptShift_
void setBXRange(int bxFirst, int bxLast)
BxBlocks getBxBlocks(unsigned int payloadWordsPerBx, bool bxHeader) const
#define DEFINE_L1T_UNPACKER(type)
void amc(const amc::Header &h)
int hwChargeValid() const
void push_back(int bx, T object)
static const unsigned ptMask_
static void fillMuon(Muon &, uint32_t, uint32_t, int, unsigned int)