CMS 3D CMS Logo

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 <set>
00017 
00018 class HcalUnpacker {
00019 public:
00020 
00021   struct Collections {
00022     Collections();
00023     std::vector<HBHEDataFrame>* hbheCont;
00024     std::vector<HODataFrame>* hoCont;
00025     std::vector<HFDataFrame>* hfCont;
00026     std::vector<HcalCalibDataFrame>* calibCont;
00027     std::vector<ZDCDataFrame>* zdcCont;
00028     std::vector<HcalTriggerPrimitiveDigi>* tpCont;
00029     std::vector<HOTriggerPrimitiveDigi>* tphoCont;
00030   };
00031 
00033   HcalUnpacker(int sourceIdOffset, int beg, int end) : sourceIdOffset_(sourceIdOffset), startSample_(beg), endSample_(end) { }
00035   HcalUnpacker(int sourceIdOffset) : sourceIdOffset_(sourceIdOffset), startSample_(-1), endSample_(-1) { }
00036   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
00037   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report, bool silent=false);
00038   // Old -- deprecated
00039   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HBHEDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00040   // Old -- deprecated
00041   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HODataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00042   // Old -- deprecated
00043   void unpack(const FEDRawData& raw, const HcalElectronicsMap& emap, std::vector<HFDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp);
00044 private:
00045   int sourceIdOffset_; 
00046   int startSample_; 
00047   int endSample_; 
00048   std::set<HcalElectronicsId> unknownIds_,unknownIdsTrig_; 
00049 };
00050 
00051 #endif // HcalUnpacker_h_included

Generated on Tue Jun 9 17:34:41 2009 for CMSSW by  doxygen 1.5.4