CMS 3D CMS Logo

RPCAMCRawToDigi.h
Go to the documentation of this file.
1 #ifndef EventFilter_RPCRawToDigi_RPCAMCRawToDigi_h
2 #define EventFilter_RPCRawToDigi_RPCAMCRawToDigi_h
3 
6 
10 
11 namespace edm {
13  class Event;
14  class EventSetup;
15  class ParameterSet;
16  class Run;
17 } // namespace edm
18 
19 class RPCAMCUnpacker;
20 
22 public:
24  ~RPCAMCRawToDigi() override;
25 
26  static void compute_crc16_64bit(std::uint16_t &crc, std::uint64_t const &word);
27 
29 
30  void beginRun(edm::Run const &run, edm::EventSetup const &setup) override;
31  void produce(edm::Event &event, edm::EventSetup const &setup) override;
32 
33 protected:
34  bool processCDFHeaders(int fed,
35  std::uint64_t const *&word,
36  std::uint64_t const *&word_end,
37  std::uint16_t &crc,
39  bool processCDFTrailers(int fed,
40  unsigned int nwords,
41  std::uint64_t const *&word,
42  std::uint64_t const *&word_end,
43  std::uint16_t &crc,
45  bool processBlocks(int fed,
46  std::uint64_t const *&word,
47  std::uint64_t const *word_end,
48  std::uint16_t &crc,
50  std::map<RPCAMCLink, rpcamc13::AMCPayload> &amc_payload) const;
51 
52 protected:
54 
56 
57  std::unique_ptr<RPCAMCUnpacker> rpc_unpacker_;
58 };
59 
61  std::uint16_t &crc, std::uint64_t const &word) { // overcome constness problem evf::compute_crc_64bit
62  unsigned char const *uchars(reinterpret_cast<unsigned char const *>(&word));
63  for (unsigned char const *uchar = uchars + 7; uchar >= uchars; --uchar) {
64  crc = evf::compute_crc_8bit(crc, *uchar);
65  }
66 }
67 
68 #endif // EventFilter_RPCRawToDigi_RPCAMCRawToDigi_h
static void compute_crc16_64bit(std::uint16_t &crc, std::uint64_t const &word)
RPCAMCRawToDigi(edm::ParameterSet const &config)
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
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
Definition: config.py:1
void produce(edm::Event &event, edm::EventSetup const &setup) override
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
uint64_t word
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
bool processBlocks(int fed, std::uint64_t const *&word, std::uint64_t const *word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters, std::map< RPCAMCLink, rpcamc13::AMCPayload > &amc_payload) const
~RPCAMCRawToDigi() override
unsigned long long uint64_t
Definition: Time.h:13
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:56
HLT enums.
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
std::unique_ptr< RPCAMCUnpacker > rpc_unpacker_
Definition: event.py:1
Definition: Run.h:45