Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:19

0001 #ifndef SimG4Core_SimRunInterface_h
0002 #define SimG4Core_SimRunInterface_h 1
0003 
0004 // This class is needed to provide an interface
0005 // between Geant4 user actions and CMS SIM
0006 // infrastructure both for sequentional and MT runs
0007 
0008 class RunManagerMT;
0009 class RunManagerMTWorker;
0010 class SimTrackManager;
0011 class RunAction;
0012 class EventAction;
0013 class TrackingAction;
0014 class SteppingAction;
0015 class G4SimEvent;
0016 
0017 class SimRunInterface {
0018 public:
0019   SimRunInterface(RunManagerMT* run, bool master);
0020 
0021   SimRunInterface(RunManagerMTWorker* run, bool master);
0022 
0023   ~SimRunInterface();
0024 
0025   // Needed because for workers SumRunInterface sits in TLS, while
0026   // RunManagerMTWorkers are members of edm::stream OscarMTProducer
0027   void setRunManagerMTWorker(RunManagerMTWorker* run);
0028 
0029   void Connect(RunAction*);
0030 
0031   void Connect(EventAction*);
0032 
0033   void Connect(TrackingAction*);
0034 
0035   void Connect(SteppingAction*);
0036 
0037   SimTrackManager* GetSimTrackManager();
0038 
0039   void abortEvent();
0040 
0041   void abortRun(bool softAbort);
0042 
0043   G4SimEvent* simEvent();
0044 
0045 private:
0046   RunManagerMT* m_runManagerMT;
0047   RunManagerMTWorker* m_runManagerMTWorker;
0048 
0049   SimTrackManager* m_SimTrackManager;
0050 
0051   bool m_isMaster;
0052 };
0053 
0054 #endif