Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:21

0001 #ifndef CastorRawToDigi_h
0002 #define CastorRawToDigi_h
0003 
0004 /** \class CastorRawToDigi
0005  *
0006  * CastorRawToDigi is the EDProducer subclass which runs 
0007  * the Hcal Unpack algorithm.
0008  *
0009  * \author Alan Campbell
0010       
0011  *
0012  * \version   1st Version April 18, 2008  
0013 
0014  *
0015  ************************************************************/
0016 
0017 #include "FWCore/Framework/interface/stream/EDProducer.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "DataFormats/Common/interface/Handle.h"
0020 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0021 
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0024 #include "FWCore/Utilities/interface/ESGetToken.h"
0025 
0026 #include "EventFilter/CastorRawToDigi/interface/CastorUnpacker.h"
0027 #include "EventFilter/CastorRawToDigi/interface/CastorCtdcUnpacker.h"
0028 #include "EventFilter/CastorRawToDigi/interface/CastorDataFrameFilter.h"
0029 #include "DataFormats/HcalDigi/interface/ZDCDataFrame.h"
0030 #include "EventFilter/CastorRawToDigi/interface/ZdcUnpacker.h"
0031 #include "CondFormats/DataRecord/interface/HcalAllRcds.h"
0032 #include "CalibFormats/CastorObjects/interface/CastorDbService.h"
0033 #include "CalibFormats/CastorObjects/interface/CastorDbRecord.h"
0034 
0035 #include <map>
0036 //#include "Geometry/Records/interface/HcalRecNumberingRecord.h"
0037 
0038 class CastorRawToDigi : public edm::stream::EDProducer<> {
0039 public:
0040   explicit CastorRawToDigi(const edm::ParameterSet& ps);
0041   ~CastorRawToDigi() override;
0042   void produce(edm::Event& e, const edm::EventSetup& c) override;
0043   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0044 
0045 private:
0046   edm::InputTag dataTag_;
0047   CastorUnpacker unpacker_;
0048   ZdcUnpacker zdcunpacker_;
0049   CastorCtdcUnpacker ctdcunpacker_;
0050   CastorDataFrameFilter filter_;
0051   std::vector<int> fedUnpackList_;
0052   int firstFED_;
0053   bool complainEmptyData_;
0054   bool usingctdc_;
0055   bool unpackTTP_;
0056   bool unpackZDC_;
0057   bool silent_;
0058   bool usenominalOrbitMessageTime_;
0059   int expectedOrbitMessageTime_;
0060   std::unique_ptr<HcalElectronicsMap> myEMap;
0061   edm::EDGetTokenT<FEDRawDataCollection> tok_input_;
0062   edm::ParameterSet zdcemap;
0063   edm::ESGetToken<CastorDbService, CastorDbRecord> tok_pSetup_;
0064 };
0065 
0066 #endif