Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:34

0001 /* -*- C++ -*- */
0002 #ifndef CastorUnpacker_h_included
0003 #define CastorUnpacker_h_included 1
0004 
0005 #include "DataFormats/HcalDigi/interface/CastorDataFrame.h"
0006 #include "DataFormats/HcalDigi/interface/HcalCalibDataFrame.h"
0007 #include "DataFormats/HcalDigi/interface/HcalTriggerPrimitiveDigi.h"
0008 // #include "DataFormats/HcalDigi/interface/HcalHistogramDigi.h"
0009 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
0010 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0011 #include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h"
0012 #include <set>
0013 #include "EventFilter/CastorRawToDigi/interface/CastorRawCollections.h"
0014 
0015 class CastorUnpacker {
0016 public:
0017   /// for normal data
0018   CastorUnpacker(int sourceIdOffset, int beg, int end);
0019   void setExpectedOrbitMessageTime(int time) { expectedOrbitMessageTime_ = time; }
0020   /// For histograms, no begin and end
0021   // void unpack(const FEDRawData& raw, const CastorElectronicsMap& emap, std::vector<HcalHistogramDigi>& histoDigis);
0022   void unpack(const FEDRawData& raw,
0023               const CastorElectronicsMap& emap,
0024               CastorRawCollections& conts,
0025               HcalUnpackerReport& report,
0026               bool silent = false);
0027 
0028 private:
0029   int sourceIdOffset_;            ///< number to subtract from the source id to get the dcc id
0030   int startSample_;               ///< first sample from fed raw data to copy
0031   int endSample_;                 ///< last sample from fed raw data to copy (if present)
0032   int expectedOrbitMessageTime_;  ///< Expected orbit bunch time (needed to evaluate time differences)
0033   std::set<CastorElectronicsId> unknownIds_,
0034       unknownIdsTrig_;  ///< Recorded to limit number of times a log message is generated
0035 };
0036 
0037 #endif  // CastorUnpacker_h_included