CMS 3D CMS Logo

HcalUnpacker.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef HcalUnpacker_h_included
3 #define HcalUnpacker_h_included 1
4 
19 #include <set>
20 
21 class HcalUnpacker {
22 public:
23  struct Collections {
24  Collections();
25  std::vector<HBHEDataFrame>* hbheCont;
26  std::vector<HODataFrame>* hoCont;
27  std::vector<HFDataFrame>* hfCont;
28  std::vector<HcalCalibDataFrame>* calibCont;
29  std::vector<ZDCDataFrame>* zdcCont;
30  std::vector<HcalTriggerPrimitiveDigi>* tpCont;
31  std::vector<HOTriggerPrimitiveDigi>* tphoCont;
32  std::vector<HcalTTPDigi>* ttp;
37  // additional qie10 and qie11 data collections
38  std::unordered_map<int, QIE10DigiCollection*> qie10Addtl;
39  std::unordered_map<int, QIE11DigiCollection*> qie11Addtl;
41  };
42 
44  HcalUnpacker(int sourceIdOffset, int beg, int end)
45  : sourceIdOffset_(sourceIdOffset),
46  startSample_(beg),
47  endSample_(end),
49  mode_(0),
50  nPrinted_(0) {}
52  HcalUnpacker(int sourceIdOffset)
53  : sourceIdOffset_(sourceIdOffset),
54  startSample_(-1),
55  endSample_(-1),
57  mode_(0),
58  nPrinted_(0) {}
60  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
61  void unpack(const FEDRawData& raw,
62  const HcalElectronicsMap& emap,
63  Collections& conts,
65  bool silent = false);
66  void setMode(int mode) { mode_ = mode; }
67 
68 private:
69  void unpackVME(const FEDRawData& raw,
70  const HcalElectronicsMap& emap,
71  Collections& conts,
72  HcalUnpackerReport& report,
73  bool silent = false);
74  void unpackUTCA(const FEDRawData& raw,
75  const HcalElectronicsMap& emap,
76  Collections& conts,
77  HcalUnpackerReport& report,
78  bool silent = false);
79  void unpackUMNio(const FEDRawData& raw, int slot, Collections& colls);
80 
81  void printInvalidDataMessage(const std::string& coll_type, int default_ns, int conflict_ns, bool extended = false);
82 
85  int endSample_;
87  int mode_;
88  std::set<HcalElectronicsId> unknownIds_,
90 
91  int nPrinted_;
92 };
93 
94 #endif // HcalUnpacker_h_included
std::set< HcalElectronicsId > unknownIds_
Definition: HcalUnpacker.h:88
int sourceIdOffset_
number to subtract from the source id to get the dcc id
Definition: HcalUnpacker.h:83
int endSample_
last sample from fed raw data to copy (if present)
Definition: HcalUnpacker.h:85
int startSample_
first sample from fed raw data to copy
Definition: HcalUnpacker.h:84
void unpackUTCA(const FEDRawData &raw, const HcalElectronicsMap &emap, Collections &conts, HcalUnpackerReport &report, bool silent=false)
std::vector< HcalTTPDigi > * ttp
Definition: HcalUnpacker.h:32
std::vector< HFDataFrame > * hfCont
Definition: HcalUnpacker.h:27
HcalUMNioDigi * umnio
Definition: HcalUnpacker.h:40
QIE10DigiCollection * qie10Lasermon
Definition: HcalUnpacker.h:35
std::vector< HBHEDataFrame > * hbheCont
Definition: HcalUnpacker.h:25
std::vector< HOTriggerPrimitiveDigi > * tphoCont
Definition: HcalUnpacker.h:31
std::unordered_map< int, QIE11DigiCollection * > qie11Addtl
Definition: HcalUnpacker.h:39
void printInvalidDataMessage(const std::string &coll_type, int default_ns, int conflict_ns, bool extended=false)
std::unordered_map< int, QIE10DigiCollection * > qie10Addtl
Definition: HcalUnpacker.h:38
QIE10DigiCollection * qie10ZDC
Definition: HcalUnpacker.h:34
int expectedOrbitMessageTime_
Expected orbit bunch time (needed to evaluate time differences)
Definition: HcalUnpacker.h:86
void unpackVME(const FEDRawData &raw, const HcalElectronicsMap &emap, Collections &conts, HcalUnpackerReport &report, bool silent=false)
std::vector< HcalTriggerPrimitiveDigi > * tpCont
Definition: HcalUnpacker.h:30
#define end
Definition: vmac.h:39
std::set< HcalElectronicsId > unknownIdsTrig_
Recorded to limit number of times a log message is generated.
Definition: HcalUnpacker.h:88
void setExpectedOrbitMessageTime(int time)
Definition: HcalUnpacker.h:59
void setMode(int mode)
Definition: HcalUnpacker.h:66
HcalUnpacker(int sourceIdOffset, int beg, int end)
for normal data
Definition: HcalUnpacker.h:44
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
std::vector< HcalCalibDataFrame > * calibCont
Definition: HcalUnpacker.h:28
std::vector< HODataFrame > * hoCont
Definition: HcalUnpacker.h:26
QIE11DigiCollection * qie11
Definition: HcalUnpacker.h:36
QIE10DigiCollection * qie10
Definition: HcalUnpacker.h:33
std::vector< ZDCDataFrame > * zdcCont
Definition: HcalUnpacker.h:29
void unpackUMNio(const FEDRawData &raw, int slot, Collections &colls)
HcalUnpacker(int sourceIdOffset)
For histograms, no begin and end.
Definition: HcalUnpacker.h:52