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 beginRun(const edm::Run& r, const edm::EventSetup& c) override;
35  void endRun(const edm::Run& r, const edm::EventSetup& c) override;
36  void produce(edm::Event& e, const edm::EventSetup& c) override;
37 
38 private:
39  std::unique_ptr<RunManagerMTWorker> m_runManagerWorker;
41 };
42 
43 #endif
Handle.h
edm::Run
Definition: Run.h:45
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
OscarMTProducer::globalEndRun
static void globalEndRun(const edm::Run &iRun, const edm::EventSetup &iSetup, const RunContext *iContext)
Definition: OscarMTProducer.cc:159
EDProducer.h
OscarMTProducer::OscarMTProducer
OscarMTProducer(edm::ParameterSet const &p, const OscarMTMasterThread *)
Definition: OscarMTProducer.cc:66
OscarMTMasterThread.h
OscarMTProducer
Definition: OscarMTProducer.h:18
OscarMTProducer::Producers
std::vector< std::shared_ptr< SimProducer > > Producers
Definition: OscarMTProducer.h:22
OscarMTProducer::initializeGlobalCache
static std::unique_ptr< OscarMTMasterThread > initializeGlobalCache(const edm::ParameterSet &iConfig)
Definition: OscarMTProducer.cc:139
OscarMTProducer::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:183
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:147
Run.h
OscarMTProducer::m_runManagerWorker
std::unique_ptr< RunManagerMTWorker > m_runManagerWorker
Definition: OscarMTProducer.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SimProducer
Definition: SimProducer.h:64
edm::stream::EDProducer
Definition: EDProducer.h:38
OscarMTProducer::~OscarMTProducer
~OscarMTProducer() override
Definition: OscarMTProducer.cc:137
edm::EventSetup
Definition: EventSetup.h:58
OscarMTMasterThread
Definition: OscarMTMasterThread.h:32
OscarMTProducer::globalEndJob
static void globalEndJob(OscarMTMasterThread *masterThread)
Definition: OscarMTProducer.cc:164
alignCSCRings.r
r
Definition: alignCSCRings.py:93
RunManagerMTWorker
Definition: RunManagerMTWorker.h:41
EventSetup.h
OscarMTProducer::beginRun
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:169
OscarMTProducer::m_masterThread
const OscarMTMasterThread * m_masterThread
Definition: OscarMTProducer.h:40
OscarMTProducer::endRun
void endRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: OscarMTProducer.cc:175
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37