test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalUnpacker.h
Go to the documentation of this file.
1 /* -*- C++ -*- */
2 #ifndef HcalUnpacker_h_included
3 #define HcalUnpacker_h_included 1
4 
17 #include <set>
18 
19 class HcalUnpacker {
20 public:
21 
22  struct Collections {
23  Collections();
24  std::vector<HBHEDataFrame>* hbheCont;
25  std::vector<HODataFrame>* hoCont;
26  std::vector<HFDataFrame>* hfCont;
27  std::vector<HcalCalibDataFrame>* calibCont;
28  std::vector<ZDCDataFrame>* zdcCont;
29  std::vector<HcalTriggerPrimitiveDigi>* tpCont;
30  std::vector<HOTriggerPrimitiveDigi>* tphoCont;
31  std::vector<HcalTTPDigi>* ttp;
32  };
33 
35  HcalUnpacker(int sourceIdOffset, int beg, int end) : sourceIdOffset_(sourceIdOffset), startSample_(beg), endSample_(end), expectedOrbitMessageTime_(-1), mode_(0) { }
37  HcalUnpacker(int sourceIdOffset) : sourceIdOffset_(sourceIdOffset), startSample_(-1), endSample_(-1), expectedOrbitMessageTime_(-1), mode_(0) { }
39  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
40  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
41  // Old -- deprecated
42  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HBHEDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
43  // Old -- deprecated
44  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HODataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
45  // Old -- deprecated
46  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HFDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
47  void setMode(int mode) { mode_=mode; }
48 private:
51  int endSample_;
53  int mode_;
54  std::set<HcalElectronicsId> unknownIds_,unknownIdsTrig_;
55 };
56 
57 #endif // HcalUnpacker_h_included
std::set< HcalElectronicsId > unknownIds_
Definition: HcalUnpacker.h:54
int sourceIdOffset_
number to subtract from the source id to get the dcc id
Definition: HcalUnpacker.h:49
int endSample_
last sample from fed raw data to copy (if present)
Definition: HcalUnpacker.h:51
int startSample_
first sample from fed raw data to copy
Definition: HcalUnpacker.h:50
std::vector< HcalTTPDigi > * ttp
Definition: HcalUnpacker.h:31
std::vector< HFDataFrame > * hfCont
Definition: HcalUnpacker.h:26
std::vector< HBHEDataFrame > * hbheCont
Definition: HcalUnpacker.h:24
std::vector< HOTriggerPrimitiveDigi > * tphoCont
Definition: HcalUnpacker.h:30
tuple report
Definition: zeeHLT_cff.py:9
int expectedOrbitMessageTime_
Expected orbit bunch time (needed to evaluate time differences)
Definition: HcalUnpacker.h:52
std::vector< HcalTriggerPrimitiveDigi > * tpCont
Definition: HcalUnpacker.h:29
#define end
Definition: vmac.h:37
std::set< HcalElectronicsId > unknownIdsTrig_
Recorded to limit number of times a log message is generated.
Definition: HcalUnpacker.h:54
void setExpectedOrbitMessageTime(int time)
Definition: HcalUnpacker.h:38
void setMode(int mode)
Definition: HcalUnpacker.h:47
HcalUnpacker(int sourceIdOffset, int beg, int end)
for normal data
Definition: HcalUnpacker.h:35
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
std::vector< HcalCalibDataFrame > * calibCont
Definition: HcalUnpacker.h:27
std::vector< HODataFrame > * hoCont
Definition: HcalUnpacker.h:25
std::vector< ZDCDataFrame > * zdcCont
Definition: HcalUnpacker.h:28
HcalUnpacker(int sourceIdOffset)
For histograms, no begin and end.
Definition: HcalUnpacker.h:37