81 produces<l1t::RegionalMuonCandBxCollection>(
theOutputTag);
96 desc.add<
bool>(
"skipRpc",
false);
97 desc.add<
bool>(
"skipCsc",
false);
98 desc.add<
bool>(
"skipDt",
false);
99 desc.add<
bool>(
"skipMuon",
false);
100 desc.add<
bool>(
"useRpcConnectionFile",
false);
103 descriptions.
add(
"omtfUnpacker",
desc);
134 auto producedRPCDigis = std::make_unique<RPCDigiCollection>();
135 auto producedCscLctDigis = std::make_unique<CSCCorrelatedLCTDigiCollection>();
136 auto producedMuonDigis = std::make_unique<l1t::RegionalMuonCandBxCollection>();
137 producedMuonDigis->setBXRange(-3, 4);
138 auto producedDTPhDigis = std::make_unique<L1MuDTChambPhContainer>();
139 auto producedDTThDigis = std::make_unique<L1MuDTChambThContainer>();
140 std::vector<L1MuDTChambPhDigi> phi_Container;
141 std::vector<L1MuDTChambThDigi> the_Container;
155 if (!fedHeader.check()) {
156 LogTrace(
"") <<
" ** PROBLEM **, header.check() failed, break";
159 if (fedHeader.sourceID() !=
fedId) {
160 LogTrace(
"") <<
" ** PROBLEM **, fedHeader.sourceID() != fedId"
161 <<
"fedId = " <<
fedId <<
" sourceID=" << fedHeader.sourceID();
163 int triggerBX = fedHeader.bxID();
165 std::ostringstream
str;
166 str <<
" header: " << *
reinterpret_cast<const std::bitset<64>*
>(
header) << std::endl;
167 str <<
" header triggerType: " << fedHeader.triggerType() << std::endl;
168 str <<
" header lvl1ID: " << fedHeader.lvl1ID() << std::endl;
169 str <<
" header bxID: " << fedHeader.bxID() << std::endl;
170 str <<
" header sourceID: " << fedHeader.sourceID() << std::endl;
171 str <<
" header version: " << fedHeader.version() << std::endl;
172 str <<
" header more : " << fedHeader.moreHeaders() << std::endl;
173 str <<
" triggerBx " << triggerBX << std::endl;
180 const Word64* trailer = reinterpret_cast<const Word64*>(
rawData.data()) + (nWords - 1);
182 bool moreTrailers =
true;
183 while (moreTrailers) {
185 FEDTrailer fedTrailer(reinterpret_cast<const unsigned char*>(trailer));
186 if (!fedTrailer.
check()) {
188 LogTrace(
"") <<
" ** PROBLEM **, trailer.check() failed, break";
193 LogTrace(
"") <<
" ** PROBLEM **, fedTrailer.fragmentLength()!= nWords, break";
198 std::ostringstream
str;
199 str <<
" trailer: " << *
reinterpret_cast<const std::bitset<64>*
>(trailer) << std::endl;
201 str <<
" trailer crc: " << fedTrailer.
crc() << std::endl;
202 str <<
" trailer evtStatus: " << fedTrailer.
evtStatus() << std::endl;
203 str <<
" trailer ttsBits: " << fedTrailer.
ttsBits() << std::endl;
212 std::ostringstream
str;
214 str <<
" data: " << *
reinterpret_cast<const std::bitset<64>*
>(
word) << std::endl;
225 std::ostringstream
str;
226 str <<
" headerAMC13: " << *
reinterpret_cast<const std::bitset<64>*
>(headerAmc13raw) << std::endl;
227 str <<
" amc13 check: " << headerAmc13.
check() << std::endl;
241 const Word64* trailerAmc13raw = trailer - 1;
244 std::ostringstream
str;
245 str <<
" trailerAMC13: " << *
reinterpret_cast<const std::bitset<64>*
>(trailerAmc13raw) << std::endl;
246 str <<
" crc: " << trailerAmc13.
getCRC() << std::endl;
247 str <<
" block: " << trailerAmc13.
getBlock() << std::endl;
248 str <<
" LV1ID: " << trailerAmc13.
getLV1ID() << std::endl;
249 str <<
" BX: " << trailerAmc13.
getBX() << std::endl;
257 if (!packetAmc13.
parse(
header,
header + 1, nWords - 2, fedHeader.lvl1ID(), fedHeader.bxID(),
true,
false)) {
266 unsigned int blockNum = 0;
270 std::ostringstream
str;
271 str <<
" ----------- #" << blockNum++ << std::endl;
272 str <<
" blockheader: " << std::bitset<64>(bh.
raw()) << std::endl;
284 std::ostringstream
str;
285 str <<
" AMC header[0]: " << std::bitset<64>(headerAmc.
raw()[0]) << std::endl;
286 str <<
" AMC header[1]: " << std::bitset<64>(headerAmc.
raw()[1]) << std::endl;
298 std::ostringstream
str;
299 str <<
" AMC trailer: " << std::bitset<64>(trailerAmc.raw()) << std::endl;
300 str <<
" getLV1ID: " << trailerAmc.getLV1ID() << std::endl;
301 str <<
" size: " << trailerAmc.getSize() << std::endl;
308 const auto& payload64 =
amc.data();
310 for (
unsigned int iWord = 1; iWord <=
amc.size(); iWord++,
word++) {
313 if (iWord ==
amc.size())
316 LogTrace(
"") <<
" payload: " << *
reinterpret_cast<const std::bitset<64>*
>(
word);
319 unsigned int fedId = fedHeader.sourceID();
354 producedDTPhDigis->setContainer(phi_Container);
356 producedDTThDigis->setContainer(the_Container);
362 using namespace omtf;