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 
24  struct Collections {
25  Collections();
26  std::vector<HBHEDataFrame>* hbheCont;
27  std::vector<HODataFrame>* hoCont;
28  std::vector<HFDataFrame>* hfCont;
29  std::vector<HcalCalibDataFrame>* calibCont;
30  std::vector<ZDCDataFrame>* zdcCont;
31  std::vector<HcalTriggerPrimitiveDigi>* tpCont;
32  std::vector<HOTriggerPrimitiveDigi>* tphoCont;
33  std::vector<HcalTTPDigi>* ttp;
38  // additional qie10 and qie11 data collections
39  std::unordered_map<int, QIE10DigiCollection*> qie10Addtl;
40  std::unordered_map<int, QIE11DigiCollection*> qie11Addtl;
42 
43  };
44 
46  HcalUnpacker(int sourceIdOffset, int beg, int end) : sourceIdOffset_(sourceIdOffset), startSample_(beg), endSample_(end), expectedOrbitMessageTime_(-1), mode_(0), nPrinted_ (0){ }
48  HcalUnpacker(int sourceIdOffset) : sourceIdOffset_(sourceIdOffset), startSample_(-1), endSample_(-1), expectedOrbitMessageTime_(-1), mode_(0) { }
50  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
51  void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
52  void setMode(int mode) { mode_=mode; }
53 private:
54  void unpackVME(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
55  void unpackUTCA(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
56  void unpackUMNio(const FEDRawData& raw, int slot, Collections& colls);
57 
58  void printInvalidDataMessage( const std::string &coll_type, int default_ns, int conflict_ns, bool extended=false );
59 
62  int endSample_;
64  int mode_;
65  std::set<HcalElectronicsId> unknownIds_,unknownIdsTrig_;
66 
67  int nPrinted_;
68 };
69 
70 #endif // HcalUnpacker_h_included
std::set< HcalElectronicsId > unknownIds_
Definition: HcalUnpacker.h:65
int sourceIdOffset_
number to subtract from the source id to get the dcc id
Definition: HcalUnpacker.h:60
int endSample_
last sample from fed raw data to copy (if present)
Definition: HcalUnpacker.h:62
int startSample_
first sample from fed raw data to copy
Definition: HcalUnpacker.h:61
void unpackUTCA(const FEDRawData &raw, const HcalElectronicsMap &emap, Collections &conts, HcalUnpackerReport &report, bool silent=false)
std::vector< HcalTTPDigi > * ttp
Definition: HcalUnpacker.h:33
std::vector< HFDataFrame > * hfCont
Definition: HcalUnpacker.h:28
HcalUMNioDigi * umnio
Definition: HcalUnpacker.h:41
QIE10DigiCollection * qie10Lasermon
Definition: HcalUnpacker.h:36
std::vector< HBHEDataFrame > * hbheCont
Definition: HcalUnpacker.h:26
std::vector< HOTriggerPrimitiveDigi > * tphoCont
Definition: HcalUnpacker.h:32
std::unordered_map< int, QIE11DigiCollection * > qie11Addtl
Definition: HcalUnpacker.h:40
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:39
QIE10DigiCollection * qie10ZDC
Definition: HcalUnpacker.h:35
int expectedOrbitMessageTime_
Expected orbit bunch time (needed to evaluate time differences)
Definition: HcalUnpacker.h:63
void unpackVME(const FEDRawData &raw, const HcalElectronicsMap &emap, Collections &conts, HcalUnpackerReport &report, bool silent=false)
std::vector< HcalTriggerPrimitiveDigi > * tpCont
Definition: HcalUnpacker.h:31
#define end
Definition: vmac.h:39
std::set< HcalElectronicsId > unknownIdsTrig_
Recorded to limit number of times a log message is generated.
Definition: HcalUnpacker.h:65
void setExpectedOrbitMessageTime(int time)
Definition: HcalUnpacker.h:49
void setMode(int mode)
Definition: HcalUnpacker.h:52
HcalUnpacker(int sourceIdOffset, int beg, int end)
for normal data
Definition: HcalUnpacker.h:46
void unpack(const FEDRawData &raw, const HcalElectronicsMap &emap, std::vector< HcalHistogramDigi > &histoDigis)
std::vector< HcalCalibDataFrame > * calibCont
Definition: HcalUnpacker.h:29
std::vector< HODataFrame > * hoCont
Definition: HcalUnpacker.h:27
QIE11DigiCollection * qie11
Definition: HcalUnpacker.h:37
QIE10DigiCollection * qie10
Definition: HcalUnpacker.h:34
std::vector< ZDCDataFrame > * zdcCont
Definition: HcalUnpacker.h:30
void unpackUMNio(const FEDRawData &raw, int slot, Collections &colls)
HcalUnpacker(int sourceIdOffset)
For histograms, no begin and end.
Definition: HcalUnpacker.h:48