Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EventFilter_RPCRawToDigi_RPCTwinMuxDigiToRaw_h
0002 #define EventFilter_RPCRawToDigi_RPCTwinMuxDigiToRaw_h
0003 
0004 #include <map>
0005 #include <vector>
0006 
0007 #include "FWCore/Framework/interface/ESHandle.h"
0008 #include "FWCore/Framework/interface/ESWatcher.h"
0009 #include "FWCore/Framework/interface/stream/EDProducer.h"
0010 #include "FWCore/Utilities/interface/ESGetToken.h"
0011 
0012 #include "CondFormats/RPCObjects/interface/RPCAMCLinkMap.h"
0013 #include "CondFormats/RPCObjects/interface/RPCInverseAMCLinkMap.h"
0014 #include "CondFormats/RPCObjects/interface/RPCInverseLBLinkMap.h"
0015 #include "CondFormats/DataRecord/interface/RPCInverseLBLinkMapRcd.h"
0016 #include "CondFormats/DataRecord/interface/RPCInverseTwinMuxLinkMapRcd.h"
0017 #include "CondFormats/DataRecord/interface/RPCTwinMuxLinkMapRcd.h"
0018 #include "CondFormats/RPCObjects/interface/RPCAMCLink.h"
0019 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0020 
0021 namespace edm {
0022   class ConfigurationDescriptions;
0023   class Event;
0024   class EventSetup;
0025   class ParameterSet;
0026   class Run;
0027 }  // namespace edm
0028 
0029 class RPCTwinMuxDigiToRaw : public edm::stream::EDProducer<> {
0030 public:
0031   RPCTwinMuxDigiToRaw(edm::ParameterSet const& config);
0032   ~RPCTwinMuxDigiToRaw() override;
0033 
0034   static void fillDescriptions(edm::ConfigurationDescriptions& descs);
0035 
0036   void beginRun(edm::Run const& run, edm::EventSetup const& setup) override;
0037   void produce(edm::Event& event, edm::EventSetup const& setup) override;
0038 
0039 protected:
0040   edm::EDGetTokenT<RPCDigiCollection> digi_token_;
0041   edm::ESGetToken<RPCAMCLinkMap, RPCTwinMuxLinkMapRcd> es_tm_link_map_br_token_;
0042   edm::ESGetToken<RPCInverseAMCLinkMap, RPCInverseTwinMuxLinkMapRcd> es_tm_link_map_token_;
0043   edm::ESGetToken<RPCInverseLBLinkMap, RPCInverseLBLinkMapRcd> es_lb_link_map_token_;
0044   int bx_min_, bx_max_;
0045   bool ignore_eod_;
0046   int event_type_;
0047   unsigned int ufov_;
0048 
0049   edm::ESWatcher<RPCTwinMuxLinkMapRcd> es_tm_link_map_watcher_;
0050   std::map<int, std::vector<RPCAMCLink> > fed_amcs_;
0051 };
0052 
0053 #endif  // EventFilter_RPCRawToDigi_RPCTwinMuxDigiToRaw_h