11 unsigned int blockId =
block.header().getID();
12 LogDebug(
"L1T") <<
"Block ID = " << blockId <<
" size = " <<
block.header().getSize();
15 if (
block.header().getSize() < 1) {
34 unsigned int linkId = blockId / 2;
38 if (linkId > 47 && linkId < 60) {
39 res = static_cast<GMTCollections*>(coll)->getRegionalMuonCandsBMTF();
41 processor = linkId - 48;
42 }
else if (linkId > 41 && linkId < 66) {
43 res = static_cast<GMTCollections*>(coll)->getRegionalMuonCandsOMTF();
46 processor = linkId - 42;
49 processor = linkId - 60;
51 }
else if (linkId > 35 && linkId < 72) {
52 res = static_cast<GMTCollections*>(coll)->getRegionalMuonCandsEMTF();
55 processor = linkId - 36;
58 processor = linkId - 66;
61 edm::LogError(
"L1T") <<
"No TF muon expected for link " << linkId;
70 for (
const auto& bxBlock : bxBlocks) {
72 const auto bx = bxBlock.header().getBx();
73 if (bx < firstBX || bx >
lastBX) {
74 throw cms::Exception(
"CorruptData") <<
"Corrupt RAW data from AMC " <<
block.amc().getAMCNumber()
75 <<
". BX number " <<
bx <<
" in BX header is outside of the BX range ["
76 <<
firstBX <<
"," <<
lastBX <<
"] defined in the block header.";
79 auto bxPayload = bxBlock.payload();
80 if (
nWords_ <= bxPayload.size()) {
81 for (
unsigned nWord = 0; nWord <
nWords_; nWord += 2) {
82 uint32_t raw_data_00_31 = bxPayload[nWord];
83 uint32_t raw_data_32_63 = bxPayload[nWord + 1];
84 LogDebug(
"L1T") <<
"raw_data_00_31 = 0x" << hex << setw(8) << setfill(
'0') << raw_data_00_31
85 <<
" raw_data_32_63 = 0x" << setw(8) << setfill(
'0') << raw_data_32_63;
89 LogDebug(
"L1T") <<
"Muon hwPt zero. Skip.";
93 if (raw_data_00_31 == 0x505050bc || raw_data_32_63 == 0x505050bc) {
94 edm::LogWarning(
"L1T") <<
"Comma detected in raw data stream. Orbit number: "
95 <<
block.amc().getOrbitNumber() <<
", BX ID: " <<
block.amc().getBX()
96 <<
", BX: " <<
bx <<
", linkId: " << linkId <<
", Raw data: 0x" << hex << setw(8)
97 << setfill(
'0') << raw_data_32_63 << setw(8) << setfill(
'0') << raw_data_00_31
105 mu, raw_data_00_31, raw_data_32_63, processor, trackFinder,
isRun3_);
107 LogDebug(
"L1T") <<
"Mu" << nWord / 2 <<
": eta " <<
mu.hwEta() <<
" phi " <<
mu.hwPhi() <<
" pT "
108 <<
mu.hwPt() <<
" qual " <<
mu.hwQual() <<
" sign " <<
mu.hwSign() <<
" sign valid "
109 <<
mu.hwSignValid() <<
" unconstrained pT " <<
mu.hwPtUnconstrained();
114 unsigned int nWords =
116 edm::LogWarning(
"L1T") <<
"Only " << bxPayload.size() <<
" 32 bit words in this BX but " << nWords
117 <<
" are required. Not unpacking the data for BX " <<
bx <<
".";