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 
27 
33 
34 #include <string>
35 
36 class DTReadOutMapping;
37 class DTuROSFEDData;
38 
40 public:
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, DTDigiCollection& digis, std::vector<DTuROSFEDData>& words);
52 
53 private:
55 
56  bool debug_;
57 
58  int nfeds_;
59 
60  std::vector<int> feds_;
61 
62  unsigned char* lineFED;
63 
64  // Operations
65 
66  //process data
67 
68  void process(int DTuROSFED,
71  DTDigiCollection& digis,
72  DTuROSFEDData& fwords);
73 
74  // utilities
75  inline void readline(int& lines, long& dataWord) {
76  dataWord = *((long*)lineFED);
77  lineFED += 8;
78  ++lines;
79  }
80 
81  int theDDU(int crate, int slot, int link, bool tenDDU);
82 
83  int theROS(int slot, int link);
84 
85  int theROB(int slot, int link);
86 
88 
91 };
92 #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::ESGetToken< DTReadOutMapping, DTReadOutMappingRcd > mapping_token_
edm::InputTag getDTuROSInputTag()