CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
59  if (es_tm_link_map_watcher_.check(setup)) {
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_) {
135  putCounters(event, std::move(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_) {
303  counters.add(RPCAMCLinkEvents::amc_payload_incomplete_, RPCAMCLink(fed, amc_number));
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 
317  rpctwinmux::TwinMuxHeader header(word);
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_) {
331  counters.add(RPCAMCLinkEvents::amc_number_mismatch_, RPCAMCLink(fed, amc_number));
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  }
359  unsigned int type(rpctwinmux::TwinMuxRecord::getType(*word));
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;
368  } else if (type == rpctwinmux::TwinMuxRecord::rpc_second_type_) {
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 
382  rpctwinmux::TwinMuxTrailer trailer(*word);
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) {
411  counters.add(RPCAMCLinkEvents::input_link_error_, tm_link);
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) {
417  counters.add(RPCAMCLinkEvents::input_link_ack_fail_, tm_link);
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
431  counters.add(RPCAMCLinkEvents::input_eod_, tm_link);
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) {
437  counters.add(RPCAMCLinkEvents::amc_link_invalid_, RPCAMCLink(fed, amc_number));
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) {
447  counters.add(RPCAMCLinkEvents::input_lb_invalid_, tm_link);
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));
487  counters.add(RPCAMCLinkEvents::input_event_, tm_link);
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 
static unsigned int const fed_amc13_amc_number_invalid_
unsigned int getStrip(unsigned int channel) const
static unsigned int const fed_trailer_crc_mismatch_
unsigned int getNAMC() const
static unsigned int const input_connector_not_used_
RPCLinkRecord getRPCLinkRecord(unsigned int link) const
static unsigned int const amc_payload_incomplete_
static unsigned int const amc_event_
std::uint64_t const * getRecord() const
static unsigned int const fed_header_check_fail_
bool processCDFHeaders(int fed, std::uint64_t const *&word, std::uint64_t const *&word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters) const
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
static unsigned int const input_link_error_
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool check() const
Check that the header is OK.
Definition: FEDHeader.cc:44
static unsigned int const input_lb_invalid_
uint16_t sourceID() const
Identifier of the FED.
Definition: FEDHeader.cc:19
uint16_t crc() const
Cyclic Redundancy Code of the event fragment including header and trailer.
Definition: FEDTrailer.cc:15
int getBXOffset() const
bool check() const
Check that the trailer is OK.
Definition: FEDTrailer.cc:45
static unsigned int const amc_amc13_evc_bc_invalid_
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
unsigned int getAMCNumber() const
static unsigned int const fed_trailer_length_mismatch_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
uint32_t fragmentLength() const
The length of the event fragment counted in 64-bit words including header and trailer.
Definition: FEDTrailer.cc:13
edm::ESGetToken< RPCAMCLinkMap, RPCTwinMuxLinkMapRcd > es_tm_link_map_br_token_
RPCTwinMuxRawToDigi(edm::ParameterSet const &config)
static unsigned int const amc_link_invalid_
unsigned int getBXCounter() const
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
uint64_t word
void set(unsigned int word, std::uint64_t const record)
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t uint32_t CAHitNtupletGeneratorKernelsGPU::Counters * counters
unsigned int getType() const
unsigned int getAMCNumber() const
double amc
Definition: hdecay.h:20
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
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
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
def move
Definition: eostools.py:511
Transition
Definition: Transition.h:12
edm::ESGetToken< RPCAMCLinkMap, RPCTwinMuxLinkMapRcd > es_tm_link_map_token_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static unsigned int const rpc_first_type_
static unsigned int const fed_header_id_mismatch_
static unsigned int const amc_number_mismatch_
static unsigned int const fed_amc13_block_incomplete_
static unsigned int const input_event_
void add(unsigned int event, RPCAMCLink const &link, unsigned int count=1)
static unsigned int const fed_event_
edm::ESWatcher< RPCTwinMuxLinkMapRcd > es_tm_link_map_watcher_
static unsigned int const rpc_second_type_
static unsigned int const input_link_ack_fail_
edm::ESGetToken< RPCLBLinkMap, RPCLBLinkMapRcd > es_lb_link_map_token_
unsigned long long uint64_t
Definition: Time.h:13
std::pair< const_iterator, const_iterator > Range
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:56
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
bool hasRPCBXWindow() const
unsigned int getSize() const
tuple config
parse the configuration file
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
void produce(edm::Event &event, edm::EventSetup const &setup) override
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
std::vector< int > feds_
void putCounters(edm::Event &event, std::unique_ptr< RPCAMCLinkCounters > counters)
static void compute_crc_64bit(std::uint16_t &crc, std::uint64_t const &word)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
Log< level::Warning, false > LogWarning
edm::ESHandle< RPCLBLinkMap > es_lb_link_map_
edm::ESHandle< RPCAMCLinkMap > es_tm_link_map_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
tuple size
Write out results.
static unsigned int const fed_trailer_check_fail_
RPCDetId getRPCDetId() const
void putRPCDigis(edm::Event &event, std::set< std::pair< RPCDetId, RPCDigi > > const &digis)
Definition: Run.h:45
static unsigned int const input_eod_
#define LogDebug(id)
static unsigned int const input_connector_invalid_