CMS 3D CMS Logo

RPCTwinMuxRawToDigi.cc
Go to the documentation of this file.
2 
3 #include <memory>
4 
14 
22 
24  : calculate_crc_(config.getParameter<bool>("calculateCRC")),
25  fill_counters_(config.getParameter<bool>("fillCounters")),
26  bx_min_(config.getParameter<int>("bxMin")),
27  bx_max_(config.getParameter<int>("bxMax")),
28  es_tm_link_map_br_token_(esConsumes<RPCAMCLinkMap, RPCTwinMuxLinkMapRcd, edm::Transition::BeginRun>()),
29  es_tm_link_map_token_(esConsumes<RPCAMCLinkMap, RPCTwinMuxLinkMapRcd>()),
30  es_lb_link_map_token_(esConsumes<RPCLBLinkMap, RPCLBLinkMapRcd>()) {
31  produces<RPCDigiCollection>();
32  if (fill_counters_) {
33  produces<RPCAMCLinkCounters>();
34  }
35  raw_token_ = consumes<FEDRawDataCollection>(config.getParameter<edm::InputTag>("inputTag"));
36 }
37 
39 
41  std::uint16_t &crc, std::uint64_t const &word) { // overcome constness problem evf::compute_crc_64bit
42  unsigned char const *uchars(reinterpret_cast<unsigned char const *>(&word));
43  for (unsigned char const *uchar = uchars + 7; uchar >= uchars; --uchar) {
44  crc = evf::compute_crc_8bit(crc, *uchar);
45  }
46 }
47 
50  desc.add<edm::InputTag>("inputTag", edm::InputTag("rawDataCollector", ""));
51  desc.add<bool>("calculateCRC", true);
52  desc.add<bool>("fillCounters", true);
53  desc.add<int>("bxMin", -2);
54  desc.add<int>("bxMax", 2);
55  descs.add("rpcTwinMuxRawToDigi", desc);
56 }
57 
60  auto link_map = setup.getHandle(es_tm_link_map_br_token_);
61  std::set<int> feds;
62  for (auto const &tm_link : link_map->getMap()) {
63  feds.insert(tm_link.first.getFED());
64  }
65  feds_.assign(feds.begin(), feds.end());
66  }
67 }
68 
70  // Get EventSetup Electronics Maps
73 
74  // Get RAW Data
75  edm::Handle<FEDRawDataCollection> raw_data_collection;
76  event.getByToken(raw_token_, raw_data_collection);
77 
78  std::set<std::pair<RPCDetId, RPCDigi> > rpc_digis;
79  std::unique_ptr<RPCAMCLinkCounters> counters(new RPCAMCLinkCounters());
80 
81  // Loop over the FEDs
82  for (int fed : feds_) {
83  if (fill_counters_) {
85  }
86 
87  std::uint16_t crc(0xffff);
88 
89  FEDRawData const &raw_data = raw_data_collection->FEDData(fed);
90  unsigned int nwords(raw_data.size() / sizeof(std::uint64_t));
91  if (!nwords) {
92  continue;
93  }
94 
95  std::uint64_t const *word(reinterpret_cast<std::uint64_t const *>(raw_data.data()));
96  std::uint64_t const *word_end = word + nwords;
97 
98  LogDebug("RPCTwinMuxRawToDigi") << "Handling FED " << fed << " with length " << nwords;
99 
100  // Handle the CDF Headers
101  if (!processCDFHeaders(fed, word, word_end, crc, *counters)) {
102  continue;
103  }
104 
105  // Handle the CDF Trailers
106  if (!processCDFTrailers(fed, nwords, word, word_end, crc, *counters)) {
107  continue;
108  }
109 
110  // Loop over the Blocks
111  while (word < word_end) {
112  processBlock(fed, word, word_end, crc, *counters, rpc_digis);
113  }
114 
115  // Complete CRC check with trailer
116  if (calculate_crc_) {
117  word = word_end;
118  word_end = reinterpret_cast<std::uint64_t const *>(raw_data.data()) + nwords - 1;
119  for (; word < word_end; ++word) {
120  compute_crc_64bit(crc, *word);
121  }
122  compute_crc_64bit(crc, (*word & 0xffffffff0000ffff)); // trailer excluding crc
123  FEDTrailer trailer(reinterpret_cast<unsigned char const *>(word_end));
124  if ((unsigned int)(trailer.crc()) != crc) {
125  if (fill_counters_) {
127  }
128  edm::LogWarning("RPCTwinMuxRawToDigi") << "FED Trailer CRC doesn't match for FED id " << fed;
129  }
130  }
131  }
132 
133  putRPCDigis(event, rpc_digis);
134  if (fill_counters_) {
136  }
137 }
138 
140  std::uint64_t const *&word,
141  std::uint64_t const *&word_end,
142  std::uint16_t &crc,
143  RPCAMCLinkCounters &counters) const {
144  bool more_headers(true);
145  for (; word < word_end && more_headers; ++word) {
146  if (calculate_crc_) {
147  compute_crc_64bit(crc, *word);
148  }
149 
150  LogDebug("RPCTwinMuxRawToDigi") << "CDF Header " << std::hex << *word << std::dec;
151  FEDHeader header(reinterpret_cast<unsigned char const *>(word));
152  if (!header.check()) {
153  if (fill_counters_) {
155  }
156  edm::LogWarning("RPCTwinMuxRawToDigi") << "FED Header check failed for FED id " << fed;
157  ++word;
158  break;
159  }
160  if (header.sourceID() != fed) {
161  if (fill_counters_) {
163  }
164  edm::LogWarning("RPCTwinMuxRawToDigi")
165  << "FED Header Source ID " << header.sourceID() << " does not match requested FED id " << fed;
166  break;
167  }
168 
169  // moreHeaders() not used
170  // more_headers = header.moreHeaders();
171  more_headers = false;
172  }
173 
174  return !more_headers;
175 }
176 
178  unsigned int nwords,
179  std::uint64_t const *&word,
180  std::uint64_t const *&word_end,
181  std::uint16_t &crc,
182  RPCAMCLinkCounters &counters) const {
183  bool more_trailers(true);
184  for (--word_end; word_end > word && more_trailers; --word_end) {
185  FEDTrailer trailer(reinterpret_cast<unsigned char const *>(word_end));
186  LogDebug("RPCTwinMuxRawToDigi") << "CDF Trailer " << std::hex << *word_end << std::dec << ", length "
187  << trailer.fragmentLength();
188  if (!trailer.check()) {
189  if (fill_counters_) {
191  }
192  edm::LogWarning("RPCTwinMuxRawToDigi") << "FED Trailer check failed for FED id " << fed;
193  --word_end;
194  break;
195  }
196  if (trailer.fragmentLength() != nwords) {
197  if (fill_counters_) {
199  }
200  edm::LogWarning("RPCTwinMuxRawToDigi") << "FED Trailer length " << trailer.fragmentLength()
201  << " does not match actual data size " << nwords << " for FED id " << fed;
202  --word_end;
203  break;
204  }
205 
206  // moreTrailers() not used
207  // more_trailers = trailer.moreTrailers();
208  more_trailers = false;
209  }
210 
211  ++word_end;
212 
213  return !more_trailers;
214 }
215 
217  std::uint64_t const *&word,
218  std::uint64_t const *word_end,
219  std::uint16_t &crc,
221  std::set<std::pair<RPCDetId, RPCDigi> > &digis) const {
222  // Block Header and Content
223  rpctwinmux::BlockHeader block_header(*word);
224  if (calculate_crc_) {
225  compute_crc_64bit(crc, *word);
226  }
227  ++word;
228 
229  unsigned int n_amc(block_header.getNAMC());
230  if (word + n_amc + 1 >= word_end) {
231  if (fill_counters_) {
233  }
234  edm::LogWarning("RPCTwinMuxRawToDigi") << "Block can not be complete for FED " << fed;
235  word = word_end;
236  return false;
237  }
238 
239  std::vector<std::pair<unsigned int, unsigned int> > amc_size_map;
240  for (unsigned int amc = 0; amc < n_amc; ++amc) {
241  LogDebug("RPCTwinMuxRawToDigi") << "Block AMC " << amc;
242  rpctwinmux::BlockAMCContent amc_content(*word);
243  if (calculate_crc_) {
244  compute_crc_64bit(crc, *word);
245  }
246  ++word;
247 
248  amc_size_map.push_back(std::make_pair(amc_content.getAMCNumber(), amc_content.getSize()));
249  if (!amc_content.isValid()) {
250  if (fill_counters_) {
252  }
253  edm::LogWarning("RPCTwinMuxRawToDigi")
254  << "BlockAMCContent is reporting an invalid "
255  << "Event Counter or Bunch Counter for FED " << fed << ", AMC " << amc_content.getAMCNumber();
256  }
257  }
258 
259  for (std::pair<unsigned int, unsigned int> const &amc_size : amc_size_map) {
260  processTwinMux(fed, amc_size.first, amc_size.second, word, word_end, crc, counters, digis);
261  }
262 
263  if (word < word_end) {
264  rpctwinmux::BlockTrailer block_trailer(*word);
265  if (calculate_crc_) {
266  compute_crc_64bit(crc, *word);
267  }
268  ++word;
269  return true;
270  } else {
271  return false;
272  }
273 }
274 
276  unsigned int amc_number,
277  unsigned int size,
278  std::uint64_t const *&word,
279  std::uint64_t const *word_end,
280  std::uint16_t &crc,
282  std::set<std::pair<RPCDetId, RPCDigi> > &digis) const {
283  LogDebug("RPCTwinMuxRawToDigi") << "TwinMux AMC#" << amc_number << ", size " << size;
284  if (!size) {
285  return true;
286  }
287  if (amc_number > (unsigned int)RPCAMCLink::max_amcnumber_) {
288  if (fill_counters_) {
290  }
291  edm::LogWarning("RPCTwinMuxRawToDigi") << "Invalid AMC Number " << amc_number << " for FED " << fed;
292  if (calculate_crc_) {
293  for (; size > 0; --size, ++word) {
294  compute_crc_64bit(crc, *word);
295  }
296  } else {
297  word += size;
298  }
299  return false;
300  }
301  if (word + size >= word_end || size < 3) {
302  if (fill_counters_) {
304  }
305  edm::LogWarning("RPCTwinMuxRawToDigi")
306  << "TwinMux Data can not be complete for FED " << fed << " AMC #" << amc_number;
307  if (calculate_crc_) {
308  for (; size > 0; --size, ++word) {
309  compute_crc_64bit(crc, *word);
310  }
311  } else {
312  word += size;
313  }
314  return false;
315  }
316 
318  unsigned int bx_counter(header.getBXCounter());
319  if (calculate_crc_) {
320  compute_crc_64bit(crc, *word);
321  ++word;
322  compute_crc_64bit(crc, *word);
323  ++word;
324  } else {
325  word += 2;
326  }
327  size -= 2;
328 
329  if (amc_number != header.getAMCNumber()) {
330  if (fill_counters_) {
332  }
333  edm::LogWarning("RPCTwinMuxRawToDigi")
334  << "AMC Number inconsistent in TwinMuxHeader vs BlockAMCContent: " << header.getAMCNumber() << " vs "
335  << amc_number;
336  if (calculate_crc_) {
337  for (; size > 0; --size, ++word) {
338  compute_crc_64bit(crc, *word);
339  }
340  } else {
341  word += size;
342  }
343  return false;
344  }
345 
346  int bx_min(bx_min_), bx_max(bx_max_);
347  if (header.hasRPCBXWindow()) {
348  bx_min = std::max(bx_min, header.getRPCBXMin());
349  bx_max = std::min(bx_max, header.getRPCBXMax());
350  LogDebug("RPCTwinMuxRawToDigi") << "BX range set to " << bx_min << ", " << bx_max;
351  }
352 
353  bool has_first_rpc_word(false);
354  rpctwinmux::RPCRecord rpc_record;
355  for (; size > 1; --size, ++word) {
356  if (calculate_crc_) {
357  compute_crc_64bit(crc, *word);
358  }
360  LogDebug("RPCTwinMuxRawToDigi") << "TwinMux data type " << std::hex << type << std::dec;
362  if (has_first_rpc_word) {
363  processRPCRecord(fed, amc_number, bx_counter, rpc_record, counters, digis, bx_min, bx_max, 0, 1);
364  }
365  rpc_record.reset();
366  rpc_record.set(0, *word);
367  has_first_rpc_word = true;
369  if (!has_first_rpc_word) {
370  edm::LogWarning("RPCTwinMuxRawToDigi") << "Received second RPC word without first";
371  } else {
372  rpc_record.set(1, *word);
373  processRPCRecord(fed, amc_number, bx_counter, rpc_record, counters, digis, bx_min, bx_max, 0, 4);
374  has_first_rpc_word = false;
375  }
376  }
377  }
378  if (has_first_rpc_word) {
379  processRPCRecord(fed, amc_number, bx_counter, rpc_record, counters, digis, bx_min, bx_max, 0, 1);
380  }
381 
383  LogDebug("RPCTwinMuxRawToDigi") << "TwinMux Trailer " << std::hex << *word << std::dec;
384  if (calculate_crc_) {
385  compute_crc_64bit(crc, *word);
386  }
387  ++word;
388  return true;
389 }
390 
392  unsigned int amc_number,
393  unsigned int bx_counter,
396  std::set<std::pair<RPCDetId, RPCDigi> > &digis,
397  int bx_min,
398  int bx_max,
399  unsigned int link,
400  unsigned int link_max) const {
401  LogDebug("RPCTwinMuxRawToDigi") << "RPCRecord " << std::hex << record.getRecord()[0] << ", " << record.getRecord()[1]
402  << std::dec << std::endl;
403  int bx_offset(record.getBXOffset());
404  RPCAMCLink tm_link(fed, amc_number);
405  for (; link <= link_max; ++link) {
406  tm_link.setAMCInput(link);
407  rpctwinmux::RPCLinkRecord link_record(record.getRPCLinkRecord(link));
408 
409  if (link_record.isError()) {
410  if (fill_counters_ && bx_offset == 0) {
412  }
413  LogDebug("RPCTwinMuxRawToDigi") << "Link in error for " << tm_link;
414  continue;
415  } else if (!link_record.isAcknowledge()) {
416  if (fill_counters_ && bx_offset == 0) {
418  }
419  LogDebug("RPCTwinMuxRawToDigi") << "Link without acknowledge for " << tm_link;
420  continue;
421  }
422 
423  if (!link_record.getPartitionData()) {
424  continue;
425  }
426 
427  int bx(bx_offset - (int)(link_record.getDelay()));
428  LogDebug("RPCTwinMuxRawToDigi") << "RPC BX " << bx << " for offset " << bx_offset;
429 
430  if (fill_counters_ && bx == 0 && link_record.isEOD()) { // EOD comes at the last delay
432  }
433 
434  RPCAMCLinkMap::map_type::const_iterator tm_link_it = es_tm_link_map_->getMap().find(tm_link);
435  if (tm_link_it == es_tm_link_map_->getMap().end()) {
436  if (fill_counters_ && bx_offset == 0) {
438  }
439  LogDebug("RPCTwinMuxRawToDigi") << "Skipping unknown TwinMuxLink " << tm_link;
440  continue;
441  }
442 
443  RPCLBLink lb_link = tm_link_it->second;
444 
445  if (link_record.getLinkBoard() > (unsigned int)RPCLBLink::max_linkboard_) {
446  if (fill_counters_ && bx_offset == 0) {
448  }
449  LogDebug("RPCTwinMuxRawToDigi") << "Skipping invalid LinkBoard " << link_record.getLinkBoard() << " for record "
450  << link << " (" << std::hex << link_record.getRecord() << " in "
451  << record.getRecord()[0] << ':' << record.getRecord()[1] << std::dec << " from "
452  << tm_link;
453  continue;
454  }
455 
456  if (link_record.getConnector() > (unsigned int)RPCLBLink::max_connector_) {
457  if (fill_counters_ && bx_offset == 0) {
459  }
460  LogDebug("RPCTwinMuxRawToDigi") << "Skipping invalid Connector " << link_record.getConnector() << " for record "
461  << link << " (" << std::hex << link_record.getRecord() << " in "
462  << record.getRecord()[0] << ':' << record.getRecord()[1] << std::dec << ") from "
463  << tm_link;
464  continue;
465  }
466 
467  lb_link.setLinkBoard(link_record.getLinkBoard());
468  lb_link.setConnector(link_record.getConnector());
469 
470  RPCLBLinkMap::map_type::const_iterator lb_link_it = es_lb_link_map_->getMap().find(lb_link);
471  if (lb_link_it == es_lb_link_map_->getMap().end()) {
472  if (fill_counters_ && bx_offset == 0) {
474  }
475  LogDebug("RPCTwinMuxRawToDigi") << "Could not find " << lb_link << " for record " << link << " (" << std::hex
476  << link_record.getRecord() << " in " << record.getRecord()[0] << ':'
477  << record.getRecord()[1] << std::dec << ") from " << tm_link;
478  continue;
479  }
480 
481  if (bx < bx_min || bx > bx_max) {
482  continue;
483  }
484 
485  if (fill_counters_ && bx == 0) {
486  counters.add(RPCAMCLinkEvents::amc_event_, RPCAMCLink(fed, amc_number));
488  }
489 
490  RPCFebConnector const &feb_connector(lb_link_it->second);
491  RPCDetId det_id(feb_connector.getRPCDetId());
492  unsigned int channel_offset(link_record.getPartition() ? 9 : 1); // 1-16
493  std::uint8_t data(link_record.getPartitionData());
494 
495  for (unsigned int channel = 0; channel < 8; ++channel) {
496  if (data & (0x1 << channel)) {
497  unsigned int strip(feb_connector.getStrip(channel + channel_offset));
498  if (strip) {
499  digis.insert(std::pair<RPCDetId, RPCDigi>(det_id, RPCDigi(strip, bx)));
500  LogDebug("RPCTwinMuxRawToDigi") << "RPCDigi " << det_id.rawId() << ", " << strip << ", " << bx;
501  }
502  }
503  }
504 
505  // rpctwinmux::RPCBXRecord checks postponed: not implemented in firmware as planned and tbd if design or firmware should change
506  }
507 }
508 
509 void RPCTwinMuxRawToDigi::putRPCDigis(edm::Event &event, std::set<std::pair<RPCDetId, RPCDigi> > const &digis) {
510  std::unique_ptr<RPCDigiCollection> rpc_digi_collection(new RPCDigiCollection());
511  RPCDetId rpc_det_id;
512  std::vector<RPCDigi> local_digis;
513  for (std::pair<RPCDetId, RPCDigi> const &rpc_digi : digis) {
514  LogDebug("RPCTwinMuxRawToDigi") << "RPCDigi " << rpc_digi.first.rawId() << ", " << rpc_digi.second.strip() << ", "
515  << rpc_digi.second.bx();
516  if (rpc_digi.first != rpc_det_id) {
517  if (!local_digis.empty()) {
518  rpc_digi_collection->put(RPCDigiCollection::Range(local_digis.begin(), local_digis.end()), rpc_det_id);
519  local_digis.clear();
520  }
521  rpc_det_id = rpc_digi.first;
522  }
523  local_digis.push_back(rpc_digi.second);
524  }
525  if (!local_digis.empty()) {
526  rpc_digi_collection->put(RPCDigiCollection::Range(local_digis.begin(), local_digis.end()), rpc_det_id);
527  }
528 
529  event.put(std::move(rpc_digi_collection));
530 }
531 
532 void RPCTwinMuxRawToDigi::putCounters(edm::Event &event, std::unique_ptr<RPCAMCLinkCounters> counters) {
533  event.put(std::move(counters));
534 }
535 
ConfigurationDescriptions.h
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
l1tstage2emulator_dqm_sourceclient-live_cfg.feds
feds
Definition: l1tstage2emulator_dqm_sourceclient-live_cfg.py:152
RPCAMCLinkEvents::fed_amc13_amc_number_invalid_
static unsigned const int fed_amc13_amc_number_invalid_
Definition: RPCAMCLinkEvents.h:20
RPCTwinMuxRawToDigi::processBlock
bool processBlock(int fed, std::uint64_t const *&word, std::uint64_t const *word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters, std::set< std::pair< RPCDetId, RPCDigi > > &digis) const
Definition: RPCTwinMuxRawToDigi.cc:216
Handle.h
electrons_cff.bool
bool
Definition: electrons_cff.py:366
RPCAMCLinkEvents.h
RPCTwinMuxRawToDigi::processTwinMux
bool processTwinMux(int fed, unsigned int amc_number, unsigned int size, std::uint64_t const *&word, std::uint64_t const *word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters, std::set< std::pair< RPCDetId, RPCDigi > > &digis) const
Definition: RPCTwinMuxRawToDigi.cc:275
MessageLogger.h
RPCTwinMuxRawToDigi::es_tm_link_map_br_token_
edm::ESGetToken< RPCAMCLinkMap, RPCTwinMuxLinkMapRcd > es_tm_link_map_br_token_
Definition: RPCTwinMuxRawToDigi.h:93
rpctwinmux::TwinMuxRecord::rpc_first_type_
static unsigned const int rpc_first_type_
Definition: RPCTwinMuxRecord.h:11
RPCTwinMuxRawToDigi
Definition: RPCTwinMuxRawToDigi.h:32
rpctwinmux::TwinMuxTrailer
Definition: RPCTwinMuxRecord.h:250
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
rpctwinmux::TwinMuxRecord::rpc_second_type_
static unsigned const int rpc_second_type_
Definition: RPCTwinMuxRecord.h:12
rpctwinmux::TwinMuxHeader
Definition: RPCTwinMuxRecord.h:170
RPCAMCLinkEvents::input_event_
static unsigned const int input_event_
Definition: RPCAMCLinkEvents.h:36
RPCTwinMuxRawToDigi::produce
void produce(edm::Event &event, edm::EventSetup const &setup) override
Definition: RPCTwinMuxRawToDigi.cc:69
RPCFebConnector::getRPCDetId
RPCDetId getRPCDetId() const
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
RPCAMCLinkEvents::input_connector_invalid_
static unsigned const int input_connector_invalid_
Definition: RPCAMCLinkEvents.h:41
RPCDetId
Definition: RPCDetId.h:16
FEDTrailer::crc
uint16_t crc() const
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:15
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
RPCAMCLinkMap
Definition: RPCAMCLinkMap.h:11
RPCFebConnector
Definition: RPCFebConnector.h:12
RPCTwinMuxRawToDigi::bx_max_
int bx_max_
Definition: RPCTwinMuxRawToDigi.h:87
RPCTwinMuxRawToDigi::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
Definition: RPCTwinMuxRawToDigi.cc:48
FEDRawData.h
edm::Handle< FEDRawDataCollection >
RPCLBLinkMap::getMap
map_type & getMap()
Definition: RPCLBLinkMap.h:27
RPCAMCLinkEvents::fed_trailer_length_mismatch_
static unsigned const int fed_trailer_length_mismatch_
Definition: RPCAMCLinkEvents.h:15
RPCAMCLinkEvents::amc_number_mismatch_
static unsigned const int amc_number_mismatch_
Definition: RPCAMCLinkEvents.h:30
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
RPCTwinMuxRawToDigi::processRPCRecord
void processRPCRecord(int fed, unsigned int amc_number, unsigned int bx_counter, rpctwinmux::RPCRecord const &record, RPCAMCLinkCounters &counters, std::set< std::pair< RPCDetId, RPCDigi > > &digis, int bx_min, int bx_max, unsigned int link, unsigned int link_max) const
Definition: RPCTwinMuxRawToDigi.cc:391
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
rpctwinmux::BlockAMCContent::getAMCNumber
unsigned int getAMCNumber() const
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
FEDRawData
Definition: FEDRawData.h:19
RPCTwinMuxRawToDigi::putRPCDigis
void putRPCDigis(edm::Event &event, std::set< std::pair< RPCDetId, RPCDigi > > const &digis)
Definition: RPCTwinMuxRawToDigi.cc:509
RPCTwinMuxRecord.h
FEDTrailer::check
bool check() const
Check that the trailer is OK.
Definition: FEDTrailer.cc:45
RPCAMCLinkEvents::input_lb_invalid_
static unsigned const int input_lb_invalid_
Definition: RPCAMCLinkEvents.h:40
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
RPCTwinMuxRawToDigi::processCDFTrailers
bool processCDFTrailers(int fed, unsigned int nwords, std::uint64_t const *&word, std::uint64_t const *&word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters) const
Definition: RPCTwinMuxRawToDigi.cc:177
config
Definition: config.py:1
RPCTwinMuxRawToDigi::putCounters
void putCounters(edm::Event &event, std::unique_ptr< RPCAMCLinkCounters > counters)
Definition: RPCTwinMuxRawToDigi.cc:532
RPCTwinMuxRawToDigi::es_lb_link_map_token_
edm::ESGetToken< RPCLBLinkMap, RPCLBLinkMapRcd > es_lb_link_map_token_
Definition: RPCTwinMuxRawToDigi.h:95
rpctwinmux::RPCRecord::set
void set(unsigned int word, std::uint64_t const record)
MakerMacros.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
counters
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ uint32_t uint32_t CAHitNtupletGeneratorKernelsGPU::Counters * counters
Definition: CAHitNtupletGeneratorKernelsImpl.h:43
RPCAMCLinkEvents::amc_event_
static unsigned const int amc_event_
Definition: RPCAMCLinkEvents.h:23
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
RPCAMCLinkEvents::fed_event_
static unsigned const int fed_event_
Definition: RPCAMCLinkEvents.h:11
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
RPCTwinMuxRawToDigi::~RPCTwinMuxRawToDigi
~RPCTwinMuxRawToDigi() override
Definition: RPCTwinMuxRawToDigi.cc:38
RPCTwinMuxRawToDigi::feds_
std::vector< int > feds_
Definition: RPCTwinMuxRawToDigi.h:90
RPCAMCLinkEvents::amc_payload_incomplete_
static unsigned const int amc_payload_incomplete_
Definition: RPCAMCLinkEvents.h:28
RPCAMCLinkEvents::fed_header_check_fail_
static unsigned const int fed_header_check_fail_
Definition: RPCAMCLinkEvents.h:12
RPCTwinMuxRawToDigi::RPCTwinMuxRawToDigi
RPCTwinMuxRawToDigi(edm::ParameterSet const &config)
Definition: RPCTwinMuxRawToDigi.cc:23
RPCAMCLinkEvents::fed_trailer_crc_mismatch_
static unsigned const int fed_trailer_crc_mismatch_
Definition: RPCAMCLinkEvents.h:16
rpctwinmux::BlockHeader::getNAMC
unsigned int getNAMC() const
ParameterSetDescription.h
FEDRawDataCollection::FEDData
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Definition: FEDRawDataCollection.cc:19
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
rpctwinmux::BlockAMCContent::isValid
bool isValid() const
RPCAMCLinkEvents::fed_trailer_check_fail_
static unsigned const int fed_trailer_check_fail_
Definition: RPCAMCLinkEvents.h:14
RPCAMCLinkEvents::input_link_ack_fail_
static unsigned const int input_link_ack_fail_
Definition: RPCAMCLinkEvents.h:38
rpctwinmux::RPCLinkRecord
Definition: RPCTwinMuxRecord.h:281
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
edm::Transition
Transition
Definition: Transition.h:12
FEDTrailer
Definition: FEDTrailer.h:14
Event.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
RPCTwinMuxRawToDigi::processCDFHeaders
bool processCDFHeaders(int fed, std::uint64_t const *&word, std::uint64_t const *&word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters) const
Definition: RPCTwinMuxRawToDigi.cc:139
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
RPCDigiCollection
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
Definition: RPCDigiCollection.h:13
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
RPCTwinMuxRawToDigi::es_tm_link_map_
edm::ESHandle< RPCAMCLinkMap > es_tm_link_map_
Definition: RPCTwinMuxRawToDigi.h:91
createfilelist.int
int
Definition: createfilelist.py:10
RPCLBLinkMap
Definition: RPCLBLinkMap.h:11
rpctwinmux::BlockTrailer
Definition: RPCTwinMuxRecord.h:69
RPCLBLinkMapRcd
Definition: RPCLBLinkMapRcd.h:6
edm::EventSetup
Definition: EventSetup.h:58
rpctwinmux::RPCRecord
Definition: RPCTwinMuxRecord.h:352
RPCAMCLinkEvents::fed_amc13_block_incomplete_
static unsigned const int fed_amc13_block_incomplete_
Definition: RPCAMCLinkEvents.h:18
RPCTwinMuxRawToDigi::fill_counters_
bool fill_counters_
Definition: RPCTwinMuxRawToDigi.h:86
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
InputTag.h
RPCAMCLinkEvents::amc_link_invalid_
static unsigned const int amc_link_invalid_
Definition: RPCAMCLinkEvents.h:34
RPCTwinMuxRawToDigi::es_tm_link_map_watcher_
edm::ESWatcher< RPCTwinMuxLinkMapRcd > es_tm_link_map_watcher_
Definition: RPCTwinMuxRawToDigi.h:89
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
RPCAMCLinkEvents::amc_amc13_evc_bc_invalid_
static unsigned const int amc_amc13_evc_bc_invalid_
Definition: RPCAMCLinkEvents.h:24
eostools.move
def move(src, dest)
Definition: eostools.py:511
writedatasetfile.run
run
Definition: writedatasetfile.py:27
RPCDigi
Definition: RPCDigi.h:19
RPCTwinMuxRawToDigi::bx_min_
int bx_min_
Definition: RPCTwinMuxRawToDigi.h:87
RPCTwinMuxRawToDigi::raw_token_
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
Definition: RPCTwinMuxRawToDigi.h:84
rpctwinmux::TwinMuxRecord::getType
unsigned int getType() const
RPCTwinMuxRawToDigi::compute_crc_64bit
static void compute_crc_64bit(std::uint16_t &crc, std::uint64_t const &word)
Definition: RPCTwinMuxRawToDigi.cc:40
RPCAMCLinkEvents::fed_header_id_mismatch_
static unsigned const int fed_header_id_mismatch_
Definition: RPCAMCLinkEvents.h:13
RPCTwinMuxRawToDigi::es_tm_link_map_token_
edm::ESGetToken< RPCAMCLinkMap, RPCTwinMuxLinkMapRcd > es_tm_link_map_token_
Definition: RPCTwinMuxRawToDigi.h:94
RPCTwinMuxRawToDigi::es_lb_link_map_
edm::ESHandle< RPCLBLinkMap > es_lb_link_map_
Definition: RPCTwinMuxRawToDigi.h:92
EventSetup.h
MuonDigiCollection< RPCDetId, RPCDigi >::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
RPCDigiCollection.h
rpctwinmux::RPCRecord::reset
void reset()
amc
Definition: AMCSpec.h:8
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
rpctwinmux::BlockAMCContent
Definition: RPCTwinMuxRecord.h:104
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
RPCTwinMuxRawToDigi.h
RPCTwinMuxRawToDigi::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: RPCTwinMuxRawToDigi.cc:58
RPCAMCLinkEvents::input_connector_not_used_
static unsigned const int input_connector_not_used_
Definition: RPCAMCLinkEvents.h:42
RPCAMCLinkMap::getMap
map_type & getMap()
Definition: RPCAMCLinkMap.h:27
amc
double amc
Definition: hdecay.h:20
ParameterSet.h
RPCAMCLinkEvents::input_link_error_
static unsigned const int input_link_error_
Definition: RPCAMCLinkEvents.h:37
event
Definition: event.py:1
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
FEDHeader
Definition: FEDHeader.h:14
edm::Event
Definition: Event.h:73
RPCTwinMuxLinkMapRcd
Definition: RPCTwinMuxLinkMapRcd.h:6
FEDHeader.h
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
evf::compute_crc_8bit
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:56
edm::InputTag
Definition: InputTag.h:15
RPCTwinMuxRawToDigi::calculate_crc_
bool calculate_crc_
Definition: RPCTwinMuxRawToDigi.h:86
rpctwinmux::BlockHeader
Definition: RPCTwinMuxRecord.h:38
RPCFebConnector::getStrip
unsigned int getStrip(unsigned int channel) const
RPCAMCLinkEvents::input_eod_
static unsigned const int input_eod_
Definition: RPCAMCLinkEvents.h:39
CRC16.h
RPCAMCLinkCounters
Definition: RPCAMCLinkCounters.h:9
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
FEDTrailer::fragmentLength
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:13
rpctwinmux::BlockAMCContent::getSize
unsigned int getSize() const
FEDTrailer.h