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
RPCAMCRawToDigi::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: RPCAMCRawToDigi.cc:47
RPCAMCRawToDigi::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
Definition: RPCAMCRawToDigi.cc:37
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< FEDRawDataCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
RPCAMCRawToDigi::produce
void produce(edm::Event &event, edm::EventSetup const &setup) override
Definition: RPCAMCRawToDigi.cc:51
EDProducer.h
RPCAMCUnpacker
Definition: RPCAMCUnpacker.h:20
RPCAMCRawToDigi::processCDFTrailers
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
Definition: RPCAMCRawToDigi.cc:159
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
RPCAMCRawToDigi::processBlocks
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
Definition: RPCAMCRawToDigi.cc:196
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
config
Definition: config.py:1
RPCAMCRawToDigi
Definition: RPCAMCRawToDigi.h:21
counters
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ const uint32_t *__restrict__ const gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell *__restrict__ uint32_t uint32_t CAHitNtupletGeneratorKernelsGPU::Counters * counters
Definition: CAHitNtupletGeneratorKernelsImpl.h:43
RPCAMCRawToDigi::calculate_crc_
bool calculate_crc_
Definition: RPCAMCRawToDigi.h:55
Event
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
RPCAMCRawToDigi::raw_token_
edm::EDGetTokenT< FEDRawDataCollection > raw_token_
Definition: RPCAMCRawToDigi.h:53
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
RPCAMCRawToDigi::compute_crc16_64bit
static void compute_crc16_64bit(std::uint16_t &crc, std::uint64_t const &word)
Definition: RPCAMCRawToDigi.h:60
FEDRawDataCollection.h
RPCAMC13Record.h
RPCAMCRawToDigi::~RPCAMCRawToDigi
~RPCAMCRawToDigi() override
Definition: RPCAMCRawToDigi.cc:35
edm::stream::EDProducer
Definition: EDProducer.h:38
RPCAMCRawToDigi::rpc_unpacker_
std::unique_ptr< RPCAMCUnpacker > rpc_unpacker_
Definition: RPCAMCRawToDigi.h:57
edm::EventSetup
Definition: EventSetup.h:58
RPCAMCLinkCounters.h
RPCAMCRawToDigi::processCDFHeaders
bool processCDFHeaders(int fed, std::uint64_t const *&word, std::uint64_t const *&word_end, std::uint16_t &crc, RPCAMCLinkCounters &counters) const
Definition: RPCAMCRawToDigi.cc:120
RPCAMCRawToDigi::RPCAMCRawToDigi
RPCAMCRawToDigi(edm::ParameterSet const &config)
Definition: RPCAMCRawToDigi.cc:20
writedatasetfile.run
run
Definition: writedatasetfile.py:27
ConfigurationDescriptions
RPCAMCRawToDigi::fill_counters_
bool fill_counters_
Definition: RPCAMCRawToDigi.h:55
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
EventSetup
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
evf::compute_crc_8bit
unsigned short compute_crc_8bit(unsigned short crc, unsigned char data)
Definition: CRC16.h:56
CRC16.h
RPCAMCLinkCounters
Definition: RPCAMCLinkCounters.h:9
Run