CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/EventFilter/HcalRawToDigi/interface/HcalUnpacker.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 #ifndef HcalUnpacker_h_included
00003 #define HcalUnpacker_h_included 1
00004 
00005 #include "DataFormats/HcalDigi/interface/HBHEDataFrame.h"
00006 #include "DataFormats/HcalDigi/interface/HODataFrame.h"
00007 #include "DataFormats/HcalDigi/interface/HFDataFrame.h"
00008 #include "DataFormats/HcalDigi/interface/ZDCDataFrame.h"
00009 #include "DataFormats/HcalDigi/interface/HcalCalibDataFrame.h"
00010 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h"
00011 #include "DataFormats/HcalDigi/interface/HOTriggerPrimitiveDigi.h"
00012 #include "DataFormats/HcalDigi/interface/HcalHistogramDigi.h"
00013 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
00014 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
00015 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
00016 #include "DataFormats/HcalDigi/interface/HcalTTPDigi.h"
00017 #include <set>
00018 
00019 class HcalUnpacker {
00020 public:
00021 
00022   struct Collections {
00023     Collections();
00024     std::vector<HBHEDataFrame>* hbheCont;
00025     std::vector<HODataFrame>* hoCont;
00026     std::vector<HFDataFrame>* hfCont;
00027     std::vector<HcalCalibDataFrame>* calibCont;
00028     std::vector<ZDCDataFrame>* zdcCont;
00029     std::vector<HcalTriggerPrimitiveDigi>* tpCont;
00030     std::vector<HOTriggerPrimitiveDigi>* tphoCont;
00031     std::vector<HcalTTPDigi>* ttp;
00032   };
00033 
00035   HcalUnpacker(int sourceIdOffset, int beg, int end) : sourceIdOffset_(sourceIdOffset), startSample_(beg), endSample_(end), expectedOrbitMessageTime_(-1) { }
00037   HcalUnpacker(int sourceIdOffset) : sourceIdOffset_(sourceIdOffset), startSample_(-1), endSample_(-1),  expectedOrbitMessageTime_(-1) { }
00038   void setExpectedOrbitMessageTime(int time) { expectedOrbitMessageTime_=time; }
00039   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
00040   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
00041   // Old -- deprecated
00042   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HBHEDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00043   // Old -- deprecated
00044   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HODataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00045   // Old -- deprecated
00046   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HFDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00047 private:
00048   int sourceIdOffset_; 
00049   int startSample_; 
00050   int endSample_; 
00051   int expectedOrbitMessageTime_; 
00052   std::set<HcalElectronicsId> unknownIds_,unknownIdsTrig_; 
00053 };
00054 
00055 #endif // HcalUnpacker_h_included