CMS 3D CMS Logo

RPCTwinMuxRawToDigi.h
Go to the documentation of this file.
1 #ifndef EventFilter_RPCRawToDigi_RPCTwinMuxRawToDigi_h
2 #define EventFilter_RPCRawToDigi_RPCTwinMuxRawToDigi_h
3 
4 #include <cstdint>
5 #include <vector>
6 #include <utility>
7 #include <set>
8 
12 
19 
21 
22 namespace edm {
24  class Event;
25  class EventSetup;
26  class ParameterSet;
27  class Run;
28 } // namespace edm
29 
31 public:
33  ~RPCTwinMuxRawToDigi() override;
34 
35  static void compute_crc_64bit(std::uint16_t& crc, std::uint64_t const& word);
36 
38 
39  void beginRun(edm::Run const& run, edm::EventSetup const& setup) override;
40  void produce(edm::Event& event, edm::EventSetup const& setup) override;
41 
42 protected:
43  bool processCDFHeaders(int fed,
44  std::uint64_t const*& word,
45  std::uint64_t const*& word_end,
46  std::uint16_t& crc,
47  RPCAMCLinkCounters& counters) const;
48  bool processCDFTrailers(int fed,
49  unsigned int nwords,
50  std::uint64_t const*& word,
51  std::uint64_t const*& word_end,
52  std::uint16_t& crc,
53  RPCAMCLinkCounters& counters) const;
54  bool processBlock(int fed,
55  std::uint64_t const*& word,
56  std::uint64_t const* word_end,
57  std::uint16_t& crc,
58  RPCAMCLinkCounters& counters,
59  std::set<std::pair<RPCDetId, RPCDigi> >& digis) const;
60  bool processTwinMux(int fed,
61  unsigned int amc_number,
62  unsigned int size,
63  std::uint64_t const*& word,
64  std::uint64_t const* word_end,
65  std::uint16_t& crc,
66  RPCAMCLinkCounters& counters,
67  std::set<std::pair<RPCDetId, RPCDigi> >& digis) const;
68  void processRPCRecord(int fed,
69  unsigned int amc_number,
70  unsigned int bx_counter,
72  RPCAMCLinkCounters& counters,
73  std::set<std::pair<RPCDetId, RPCDigi> >& digis,
74  int bx_min,
75  int bx_max,
76  unsigned int link,
77  unsigned int link_max) const;
78  void putRPCDigis(edm::Event& event, std::set<std::pair<RPCDetId, RPCDigi> > const& digis);
79  void putCounters(edm::Event& event, std::unique_ptr<RPCAMCLinkCounters> counters);
80 
81 protected:
83 
84  bool calculate_crc_, fill_counters_;
85  int bx_min_, bx_max_;
86 
88  std::vector<int> feds_;
91 };
92 
93 #endif // EventFilter_RPCRawToDigi_RPCTwinMuxRawToDigi_h
size
Write out results.
JetCorrectorParameters::Record record
Definition: classes.h:7
Definition: config.py:1
uint64_t word
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
edm::ESWatcher< RPCTwinMuxLinkMapRcd > es_tm_link_map_watcher_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
unsigned long long uint64_t
Definition: Time.h:13
HLT enums.
std::vector< int > feds_
edm::ESHandle< RPCLBLinkMap > es_lb_link_map_
edm::ESHandle< RPCAMCLinkMap > es_tm_link_map_
Definition: event.py:1
Definition: Run.h:45
unsigned short compute_crc_64bit(unsigned short crc, unsigned char *p)
Definition: CRC16.h:61