CMS 3D CMS Logo

OscarMTProducer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_OscarMTProducer_H
2 #define SimG4Core_OscarMTProducer_H
3 
9 
11 
12 #include <memory>
13 
14 class SimProducer;
15 class RunManagerMTWorker;
16 
17 class OscarMTProducer : public edm::stream::EDProducer<edm::GlobalCache<OscarMTMasterThread>,
18  edm::RunCache<int> // for some reason void doesn't compile
19  > {
20 public:
21  typedef std::vector<std::shared_ptr<SimProducer> > Producers;
22 
23  explicit OscarMTProducer(edm::ParameterSet const& p, const OscarMTMasterThread*);
24  ~OscarMTProducer() override;
25 
26  static std::unique_ptr<OscarMTMasterThread> initializeGlobalCache(const edm::ParameterSet& iConfig);
27  static std::shared_ptr<int> globalBeginRun(const edm::Run& iRun,
28  const edm::EventSetup& iSetup,
29  const OscarMTMasterThread* masterThread);
30  static void globalEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup, const RunContext* iContext);
31  static void globalEndJob(OscarMTMasterThread* masterThread);
32 
33  void beginRun(const edm::Run& r, const edm::EventSetup& c) override;
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;
40 };
41 
42 #endif
edm::Run
Definition: Run.h:45
OscarMTProducer::globalEndRun
static void globalEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup, const RunContext *iContext)
Definition: OscarMTProducer.cc:157
EDProducer.h
OscarMTProducer::OscarMTProducer
OscarMTProducer(edm::ParameterSet const &p, const OscarMTMasterThread *)
Definition: OscarMTProducer.cc:64
OscarMTMasterThread.h
OscarMTProducer
Definition: OscarMTProducer.h:17
OscarMTProducer::Producers
std::vector< std::shared_ptr< SimProducer > > Producers
Definition: OscarMTProducer.h:21
OscarMTProducer::initializeGlobalCache
static std::unique_ptr< OscarMTMasterThread > initializeGlobalCache(const edm::ParameterSet &iConfig)
Definition: OscarMTProducer.cc:138
OscarMTProducer::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:182
edm::stream::RunContextT
Definition: Contexts.h:31
MakerMacros.h
OscarMTProducer::globalBeginRun
static std::shared_ptr< int > globalBeginRun(const edm::Run &iRun, const edm::EventSetup &iSetup, const OscarMTMasterThread *masterThread)
Definition: OscarMTProducer.cc:146
Run.h
OscarMTProducer::m_runManagerWorker
std::unique_ptr< RunManagerMTWorker > m_runManagerWorker
Definition: OscarMTProducer.h:38
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
Event.h
SimProducer
Definition: SimProducer.h:64
edm::stream::EDProducer
Definition: EDProducer.h:36
OscarMTProducer::~OscarMTProducer
~OscarMTProducer() override
Definition: OscarMTProducer.cc:136
edm::EventSetup
Definition: EventSetup.h:58
OscarMTMasterThread
Definition: OscarMTMasterThread.h:37
OscarMTProducer::globalEndJob
static void globalEndJob(OscarMTMasterThread *masterThread)
Definition: OscarMTProducer.cc:162
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RunManagerMTWorker
Definition: RunManagerMTWorker.h:48
EventSetup.h
OscarMTProducer::beginRun
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:167
OscarMTProducer::m_masterThread
const OscarMTMasterThread * m_masterThread
Definition: OscarMTProducer.h:39
OscarMTProducer::endRun
void endRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:174
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37