CMS 3D CMS Logo

CSCDigiToRaw.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCDigiToRaw_h
2 #define EventFilter_CSCDigiToRaw_h
3 
18 
21 class CSCChamberMap;
22 
23 class CSCDigiToRaw {
24 public:
26  explicit CSCDigiToRaw(const edm::ParameterSet & pset);
27 
29  void createFedBuffers(const CSCStripDigiCollection& stripDigis,
30  const CSCWireDigiCollection& wireDigis,
31  const CSCComparatorDigiCollection& comparatorDigis,
32  const CSCALCTDigiCollection& alctDigis,
33  const CSCCLCTDigiCollection& clctDigis,
34  const CSCCLCTPreTriggerCollection& preTriggers,
35  const CSCCorrelatedLCTDigiCollection& correlatedLCTDigis,
36  FEDRawDataCollection& fed_buffers,
37  const CSCChamberMap* theMapping,
38  edm::Event & e,
39  uint16_t theFormatVersion = 2005,
40  bool usePreTriggers = true,
41  bool packEverything = false) const;
42 
43 private:
47 
48  using ChamberDataMap = std::map<CSCDetId, CSCEventData>;
51  const uint16_t formatVersion_;
52  };
53 
54 
55  // specialized because it reverses strip direction
56  void add(const CSCStripDigiCollection& stripDigis,
57  const CSCCLCTPreTriggerCollection& preTriggers,
59  bool usePreTriggers,
60  bool packEverything ) const;
61  void add(const CSCWireDigiCollection& wireDigis,
62  const CSCALCTDigiCollection & alctDigis,
64  bool packEverything) const;
65  // may require CLCTs to read out comparators. Doesn't add CLCTs.
66  void add(const CSCComparatorDigiCollection & comparatorDigis,
67  const CSCCLCTDigiCollection & clctDigis,
69  bool packEverything) const;
70  void add(const CSCALCTDigiCollection & alctDigis,
71  FindEventDataInfo&) const;
72  void add(const CSCCLCTDigiCollection & clctDigis,
73  FindEventDataInfo&) const;
74  void add(const CSCCorrelatedLCTDigiCollection & corrLCTDigis,
75  FindEventDataInfo&) const;
77  CSCEventData & findEventData(const CSCDetId & cscDetId,
78  FindEventDataInfo& ) const;
79 
80  const int alctWindowMin_;
81  const int alctWindowMax_;
82  const int clctWindowMin_;
83  const int clctWindowMax_;
86 };
87 
88 
89 
90 
91 #endif
const int clctWindowMin_
Definition: CSCDigiToRaw.h:82
const int clctWindowMax_
Definition: CSCDigiToRaw.h:83
std::map< CSCDetId, CSCEventData > ChamberDataMap
Definition: CSCDigiToRaw.h:48
CSCEventData & findEventData(const CSCDetId &cscDetId, FindEventDataInfo &) const
pick out the correct data object for this chamber
const int preTriggerWindowMin_
Definition: CSCDigiToRaw.h:84
const int preTriggerWindowMax_
Definition: CSCDigiToRaw.h:85
CSCDigiToRaw(const edm::ParameterSet &pset)
Constructor.
const CSCChamberMap * theElectronicsMap
Definition: CSCDigiToRaw.h:50
void createFedBuffers(const CSCStripDigiCollection &stripDigis, const CSCWireDigiCollection &wireDigis, const CSCComparatorDigiCollection &comparatorDigis, const CSCALCTDigiCollection &alctDigis, const CSCCLCTDigiCollection &clctDigis, const CSCCLCTPreTriggerCollection &preTriggers, const CSCCorrelatedLCTDigiCollection &correlatedLCTDigis, FEDRawDataCollection &fed_buffers, const CSCChamberMap *theMapping, edm::Event &e, uint16_t theFormatVersion=2005, bool usePreTriggers=true, bool packEverything=false) const
Take a vector of digis and fill the FEDRawDataCollection.
const int alctWindowMin_
Definition: CSCDigiToRaw.h:80
FindEventDataInfo(const CSCChamberMap *map, uint16_t version)
Definition: CSCDigiToRaw.h:45
const int alctWindowMax_
Definition: CSCDigiToRaw.h:81
void add(const CSCStripDigiCollection &stripDigis, const CSCCLCTPreTriggerCollection &preTriggers, FindEventDataInfo &, bool usePreTriggers, bool packEverything) const