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 edm::stream::EDProducer<>
32 {
33 public:
36 
37  static void compute_crc_64bit(std::uint16_t & crc, std::uint64_t const & word);
38 
39  static void fillDescriptions(edm::ConfigurationDescriptions & descs);
40 
41  void beginRun(edm::Run const & run, edm::EventSetup const & setup) override;
42  void produce(edm::Event & event, edm::EventSetup const & setup) override;
43 
44 protected:
45  bool processCDFHeaders(int fed
46  , std::uint64_t const * & word, std::uint64_t const * & word_end
47  , std::uint16_t & crc
48  , RPCAMCLinkCounters & counters) const;
49  bool processCDFTrailers(int fed, unsigned int nwords
50  , std::uint64_t const * & word, std::uint64_t const * & word_end
51  , std::uint16_t & crc
52  , RPCAMCLinkCounters & counters) const;
53  bool processBlock(int fed
54  , std::uint64_t const * & word, std::uint64_t const * word_end
55  , std::uint16_t & crc
56  , RPCAMCLinkCounters & counters
57  , std::set<std::pair<RPCDetId, RPCDigi> > & digis) const;
58  bool processTwinMux(int fed, unsigned int amc_number, unsigned int size
59  , std::uint64_t const * & word, std::uint64_t const * word_end
60  , std::uint16_t & crc
61  , RPCAMCLinkCounters & counters
62  , std::set<std::pair<RPCDetId, RPCDigi> > & digis) const;
63  void processRPCRecord(int fed, unsigned int amc_number
64  , unsigned int bx_counter
66  , RPCAMCLinkCounters & counters
67  , std::set<std::pair<RPCDetId, RPCDigi> > & digis
68  , int bx_min, int bx_max
69  , unsigned int link, unsigned int link_max) const;
70  void putRPCDigis(edm::Event & event
71  , std::set<std::pair<RPCDetId, RPCDigi> > const & digis);
72  void putCounters(edm::Event & event
73  , std::unique_ptr<RPCAMCLinkCounters> counters);
74 
75 protected:
77 
78  bool calculate_crc_, fill_counters_;
79  int bx_min_, bx_max_;
80 
82  std::vector<int> feds_;
85 };
86 
87 #endif // EventFilter_RPCRawToDigi_RPCTwinMuxRawToDigi_h
size
Write out results.
JetCorrectorParameters::Record record
Definition: classes.h:7
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
Definition: config.py:1
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
edm::ESWatcher< RPCTwinMuxLinkMapRcd > es_tm_link_map_watcher_
unsigned long long uint64_t
Definition: Time.h:15
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:42
unsigned short compute_crc_64bit(unsigned short crc, unsigned char *p)
Definition: CRC16.h:87