CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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,
44  RPCAMCLinkCounters &counters) const;
45  bool processBlocks(int fed,
46  std::uint64_t const *&word,
47  std::uint64_t const *word_end,
48  std::uint16_t &crc,
49  RPCAMCLinkCounters &counters,
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_
void produce(edm::Event &event, edm::EventSetup const &setup) override
uint64_t word
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
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
~RPCAMCRawToDigi() override
unsigned long long uint64_t
Definition: Time.h:13
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
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
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:56
tuple config
parse the configuration file
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: Run.h:45