CMS 3D CMS Logo

DTuROSRawToDigi.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
12 //
13 //--------------------------------------------------
14 #ifndef DTRawToDigi_DTuROSRawToDigi_h
15 #define DTRawToDigi_DTuROSRawToDigi_h
16 
24 
30 
31 #include <string>
32 
33 class DTReadOutMapping;
34 class DTuROSFEDData;
35 
37 public:
40 
42  ~DTuROSRawToDigi() override;
43 
45  void produce(edm::Event& e, const edm::EventSetup& c) override;
46 
48  bool fillRawData(edm::Event& e, const edm::EventSetup& c, DTDigiCollection& digis, std::vector<DTuROSFEDData>& words);
49 
50 private:
52 
53  bool debug_;
54 
55  int nfeds_;
56 
57  std::vector<int> feds_;
58 
59  unsigned char* lineFED;
60 
61  // Operations
62 
63  //process data
64 
65  void process(int DTuROSFED,
68  DTDigiCollection& digis,
69  DTuROSFEDData& fwords);
70 
71  // utilities
72  inline void readline(int& lines, long& dataWord) {
73  dataWord = *((long*)lineFED);
74  lineFED += 8;
75  ++lines;
76  }
77 
78  int theDDU(int crate, int slot, int link, bool tenDDU);
79 
80  int theROS(int slot, int link);
81 
82  int theROB(int slot, int link);
83 
85 
87 };
88 #endif
int theROS(int slot, int link)
void process(int DTuROSFED, edm::Handle< FEDRawDataCollection > data, edm::ESHandle< DTReadOutMapping > mapping, DTDigiCollection &digis, DTuROSFEDData &fwords)
~DTuROSRawToDigi() override
Destructor.
int theROB(int slot, int link)
std::vector< int > feds_
unsigned char * lineFED
void readline(int &lines, long &dataWord)
int theDDU(int crate, int slot, int link, bool tenDDU)
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
bool fillRawData(edm::Event &e, const edm::EventSetup &c, DTDigiCollection &digis, std::vector< DTuROSFEDData > &words)
Generate and fill FED raw data for a full event.
edm::InputTag DTuROSInputTag_
DTuROSRawToDigi(const edm::ParameterSet &pset)
Constructor.
edm::EDGetTokenT< FEDRawDataCollection > Raw_token
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
edm::InputTag getDTuROSInputTag()