CMS 3D CMS Logo

OscarMTProducer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_OscarMTProducer_H
2 #define SimG4Core_OscarMTProducer_H
3 
10 
12 
13 #include <memory>
14 
15 class SimProducer;
16 class RunManagerMTWorker;
17 
18 class OscarMTProducer : public edm::stream::EDProducer<edm::GlobalCache<OscarMTMasterThread>,
19  edm::RunCache<int> // for some reason void doesn't compile
20  > {
21 public:
22  typedef std::vector<std::shared_ptr<SimProducer> > Producers;
23 
24  explicit OscarMTProducer(edm::ParameterSet const& p, const OscarMTMasterThread*);
25  ~OscarMTProducer() override;
26 
27  static std::unique_ptr<OscarMTMasterThread> initializeGlobalCache(const edm::ParameterSet& iConfig);
28  static std::shared_ptr<int> globalBeginRun(const edm::Run& iRun,
29  const edm::EventSetup& iSetup,
30  const OscarMTMasterThread* masterThread);
31  static void globalEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup, const RunContext* iContext);
32  static void globalEndJob(OscarMTMasterThread* masterThread);
33 
34  void endRun(const edm::Run& r, const edm::EventSetup& c) override;
35  void produce(edm::Event& e, const edm::EventSetup& c) override;
36 
37 private:
38  std::unique_ptr<RunManagerMTWorker> m_runManagerWorker;
39 };
40 
41 #endif
static std::shared_ptr< int > globalBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup, const OscarMTMasterThread *masterThread)
std::unique_ptr< RunManagerMTWorker > m_runManagerWorker
OscarMTProducer(edm::ParameterSet const &p, const OscarMTMasterThread *)
~OscarMTProducer() override
std::vector< std::shared_ptr< SimProducer > > Producers
void produce(edm::Event &e, const edm::EventSetup &c) override
static void globalEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup, const RunContext *iContext)
static std::unique_ptr< OscarMTMasterThread > initializeGlobalCache(const edm::ParameterSet &iConfig)
void endRun(const edm::Run &r, const edm::EventSetup &c) override
static void globalEndJob(OscarMTMasterThread *masterThread)
Definition: Run.h:45