Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RPCUnpackingModule_H
0002 #define RPCUnpackingModule_H
0003 
0004 /** \class RPCUnpackingModule
0005  ** unpacking RPC raw data
0006  **/
0007 
0008 #include "FWCore/Framework/interface/stream/EDProducer.h"
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "FWCore/Framework/interface/ESWatcher.h"
0011 #include "CondFormats/DataRecord/interface/RPCEMapRcd.h"
0012 #include "CondFormats/RPCObjects/interface/RPCEMap.h"
0013 #include "RPCReadOutMappingWithFastSearch.h"
0014 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0015 
0016 class RPCReadOutMapping;
0017 namespace edm {
0018   class Event;
0019   class EventSetup;
0020   class Run;
0021 }  // namespace edm
0022 
0023 class RPCUnpackingModule : public edm::stream::EDProducer<> {
0024 public:
0025   ///Constructor
0026   RPCUnpackingModule(const edm::ParameterSet& pset);
0027 
0028   ///Destructor
0029   ~RPCUnpackingModule() override;
0030 
0031   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0032 
0033   /** Retrieves a RPCDigiCollection from the Event, creates a
0034       FEDRawDataCollection (EDProduct) using the DigiToRaw converter,
0035       and attaches it to the Event. */
0036   void produce(edm::Event& ev, const edm::EventSetup& es) override;
0037 
0038   void beginRun(const edm::Run& run, const edm::EventSetup& es) override;
0039 
0040 private:
0041   edm::InputTag dataLabel_;
0042   bool doSynchro_;
0043   unsigned long eventCounter_;
0044 
0045   edm::ESWatcher<RPCEMapRcd> theRecordWatcher;
0046   edm::ESGetToken<RPCEMap, RPCEMapRcd> theReadoutMappingToken;
0047   const RPCReadOutMapping* theCabling;
0048   RPCReadOutMappingWithFastSearch theReadoutMappingSearch;
0049   edm::EDGetTokenT<FEDRawDataCollection> fedToken_;
0050 };
0051 
0052 #endif