File indexing completed on 2024-04-06 12:10:57
0001 #ifndef RPCRawToDigi_RPCPackingModule_H
0002 #define RPCRawToDigi_RPCPackingModule_H
0003
0004
0005
0006
0007
0008 #include "FWCore/Framework/interface/stream/EDProducer.h"
0009 #include "EventFilter/RPCRawToDigi/interface/EventRecords.h"
0010 #include "FWCore/Utilities/interface/InputTag.h"
0011 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0012 #include "FWCore/Utilities/interface/ESGetToken.h"
0013
0014 #include "CondFormats/RPCObjects/interface/RPCEMap.h"
0015 #include "CondFormats/DataRecord/interface/RPCEMapRcd.h"
0016 #include "FWCore/Framework/interface/ESWatcher.h"
0017
0018 #include <vector>
0019
0020 namespace edm {
0021 class ParameterSet;
0022 }
0023 namespace edm {
0024 class EventSetup;
0025 }
0026 namespace edm {
0027 class Event;
0028 }
0029
0030 class FEDRawData;
0031 class RPCRecordFormatter;
0032 class RPCReadOutMapping;
0033
0034 class RPCPackingModule : public edm::stream::EDProducer<> {
0035 public:
0036
0037 explicit RPCPackingModule(const edm::ParameterSet&);
0038
0039
0040 ~RPCPackingModule() override;
0041
0042
0043 void produce(edm::Event&, const edm::EventSetup&) override;
0044
0045 static std::vector<rpcrawtodigi::EventRecords> eventRecords(int fedId,
0046 int trigger_BX,
0047 const RPCDigiCollection*,
0048 const RPCRecordFormatter&);
0049
0050 private:
0051 FEDRawData* rawData(int fedId, unsigned int lvl1_ID, const RPCDigiCollection*, const RPCRecordFormatter&) const;
0052
0053 private:
0054 edm::EDGetTokenT<RPCDigiCollection> dataLabel_;
0055 edm::ESWatcher<RPCEMapRcd> recordWatcher_;
0056 const RPCReadOutMapping* theCabling;
0057 edm::ESGetToken<RPCEMap, RPCEMapRcd> readoutMappingToken_;
0058 };
0059 #endif