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 
19  edm::GlobalCache<OscarMTMasterThread>,
20  edm::RunCache<int> // for some reason void doesn't compile
21 >
22 {
23 public:
24  typedef std::vector<std::shared_ptr<SimProducer> > Producers;
25 
26  explicit OscarMTProducer(edm::ParameterSet const & p, const OscarMTMasterThread *);
27  ~OscarMTProducer() override;
28 
29  static std::unique_ptr<OscarMTMasterThread> initializeGlobalCache(const edm::ParameterSet& iConfig);
30  static std::shared_ptr<int> globalBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup, 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  Producers m_producers;
39  std::unique_ptr<RunManagerMTWorker> m_runManagerWorker;
40 };
41 
42 #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
Producers m_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:43