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 
36 
38 
39 public:
40 
43 
45  ~DTuROSRawToDigi() override ;
46 
48  void produce(edm::Event& e, const edm::EventSetup& c) override ;
49 
51  bool fillRawData(edm::Event& e, const edm::EventSetup& c,
52  DTDigiCollection& digis, std::vector<DTuROSFEDData>& words);
53 
54 private:
55 
57 
58  bool debug_;
59 
60  int nfeds_;
61 
62  std::vector<int> feds_;
63 
64  unsigned char* lineFED;
65 
66  // Operations
67 
68  //process data
69 
70  void process(int DTuROSFED,
73  DTDigiCollection& digis,
74  DTuROSFEDData& fwords);
75 
76  // utilities
77  inline void readline(int& lines, long& dataWord) {
78  dataWord = *((long*)lineFED);
79  lineFED += 8;
80  ++lines;
81  }
82 
83  int theDDU(int crate, int slot, int link, bool tenDDU);
84 
85  int theROS(int slot, int link);
86 
87  int theROB(int slot, int link);
88 
90 
92 
93 };
94 #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:82
edm::InputTag getDTuROSInputTag()