CMS 3D CMS Logo

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