00001 /* -*- C++ -*- */ 00002 #ifndef CastorUnpacker_h_included 00003 #define CastorUnpacker_h_included 1 00004 00005 #include "DataFormats/HcalDigi/interface/CastorDataFrame.h" 00006 #include "DataFormats/HcalDigi/interface/HcalCalibDataFrame.h" 00007 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h" 00008 // #include "DataFormats/HcalDigi/interface/HcalHistogramDigi.h" 00009 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h" 00010 #include "DataFormats/FEDRawData/interface/FEDRawData.h" 00011 #include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h" 00012 #include <set> 00013 00014 class CastorUnpacker { 00015 public: 00016 00017 struct Collections { 00018 Collections(); 00019 std::vector<CastorDataFrame>* castorCont; 00020 std::vector<HcalCalibDataFrame>* calibCont; 00021 std::vector<HcalTriggerPrimitiveDigi>* tpCont; 00022 }; 00023 00025 CastorUnpacker(int sourceIdOffset, int beg, int end) ; 00026 //CastorUnpacker(int sourceIdOffset, int beg, int end) : sourceIdOffset_(sourceIdOffset), startSample_(beg), endSample_(end) { } 00028 // CastorUnpacker(int sourceIdOffset) : sourceIdOffset_(sourceIdOffset), startSample_(-1), endSample_(-1) { } 00029 // void unpack(const FEDRawData& raw, const CastorElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis); 00030 void unpack(const FEDRawData& raw, const CastorElectronicsMap& emap, Collections& conts, HcalUnpackerReport& report); 00031 // Old -- deprecated 00032 // void unpack(const FEDRawData& raw, const CastorElectronicsMap& emap, std::vector<CastorDataFrame>& precision, std::vector<HcalTriggerPrimitiveDigi>& tp); 00033 private: 00034 int sourceIdOffset_; 00035 int startSample_; 00036 int endSample_; 00037 std::set<CastorElectronicsId> unknownIds_,unknownIdsTrig_; 00038 }; 00039 00040 #endif // CastorUnpacker_h_included