CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunManagerMTWorker.h
Go to the documentation of this file.
1 #ifndef SimG4Core_Application_RunManagerMTWorker_H
2 #define SimG4Core_Application_RunManagerMTWorker_H
3 
6 
9 
10 #include <memory>
11 
12 namespace edm {
13  class ParameterSet;
14  class Event;
15  class EventSetup;
16  class ConsumesCollector;
17  class HepMCProduct;
18 }
19 class Generator;
20 class RunManagerMT;
21 
22 class G4Event;
23 class G4SimEvent;
24 class G4Run;
25 class SimTrackManager;
26 
27 class RunAction;
28 class EventAction;
29 class TrackingAction;
30 class SteppingAction;
31 class CMSSteppingVerbose;
32 
35 
36 class SimWatcher;
37 class SimProducer;
38 
40 public:
43 
44  void endRun();
45 
46  void produce(const edm::Event& inpevt, const edm::EventSetup& es, RunManagerMT& runManagerMaster);
47 
48  void abortEvent();
49  void abortRun(bool softAbort=false);
50 
51  inline G4SimEvent * simEvent() { return m_simEvent.get(); }
52 
53  void Connect(RunAction*);
54  void Connect(EventAction*);
55  void Connect(TrackingAction*);
56  void Connect(SteppingAction*);
57 
58  SimTrackManager* GetSimTrackManager();
59  std::vector<SensitiveTkDetector*>& sensTkDetectors();
60  std::vector<SensitiveCaloDetector*>& sensCaloDetectors();
61  std::vector<std::shared_ptr<SimProducer> > producers();
62 
63 private:
64 
65  void initializeTLS();
66  void initializeThread(RunManagerMT& runManagerMaster, const edm::EventSetup& es);
67  void initializeUserActions();
68 
69  void initializeRun();
70  void terminateRun();
71 
72  G4Event *generateEvent(const edm::Event& inpevt);
73  void resetGenParticleId(const edm::Event& inpevt);
74 
78 
79  bool m_nonBeam;
83 
92 
93  struct TLSData;
94  static thread_local TLSData *m_tls;
95 
96  std::unique_ptr<G4SimEvent> m_simEvent;
97  std::unique_ptr<CMSSteppingVerbose> m_sVerbose;
98 };
99 
100 #endif
edm::ParameterSet m_pSteppingAction
std::unique_ptr< CMSSteppingVerbose > m_sVerbose
edm::EDGetTokenT< edm::HepMCProduct > m_InToken
G4SimEvent * simEvent()
edm::ParameterSet m_pEventAction
std::unique_ptr< G4SimEvent > m_simEvent
static thread_local TLSData * m_tls
edm::ParameterSet m_pRunAction
edm::ParameterSet m_pTrackingAction
edm::ParameterSet m_pField
edm::EDGetTokenT< edm::LHCTransportLinkContainer > m_theLHCTlinkToken
HLT enums.
edm::ParameterSet m_pCustomUIsession
edm::ParameterSet m_p
edm::ParameterSet m_pStackingAction