Warning, file /include/Geant4/G4EventManager.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef G4EventManager_hh
0036 #define G4EventManager_hh 1
0037
0038 #include "G4StackManager.hh"
0039 #include "G4TrajectoryContainer.hh"
0040 #include "G4PrimaryTransformer.hh"
0041 #include "G4Event.hh"
0042 class G4UserEventAction;
0043 class G4UserStackingAction;
0044 class G4UserTrackingAction;
0045 class G4UserSteppingAction;
0046 class G4EvManMessenger;
0047 #include "G4TrackingManager.hh"
0048 #include "G4Track.hh"
0049 #include "G4VTrajectory.hh"
0050 #include "G4TrackStatus.hh"
0051 class G4SDManager;
0052 class G4StateManager;
0053 #include "globals.hh"
0054 class G4VUserEventInformation;
0055
0056 class G4EventManager
0057 {
0058 public:
0059 static G4EventManager* GetEventManager();
0060
0061
0062 G4EventManager();
0063 ~G4EventManager();
0064
0065 G4EventManager(const G4EventManager &right) = delete;
0066 G4EventManager& operator=(const G4EventManager& right) = delete;
0067
0068 void ProcessOneEvent(G4Event* anEvent);
0069
0070
0071 void ProcessOneEvent(G4TrackVector* trackVector, G4Event* anEvent= nullptr);
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 void StackTracks(G4TrackVector* trackVector, G4bool IDhasAlreadySet= false);
0089
0090
0091
0092 inline const G4Event* GetConstCurrentEvent()
0093 { return currentEvent; }
0094 inline G4Event* GetNonconstCurrentEvent()
0095 { return currentEvent; }
0096
0097
0098
0099
0100 void AbortCurrentEvent();
0101
0102
0103
0104
0105
0106 void SetUserAction(G4UserEventAction* userAction);
0107 void SetUserAction(G4UserStackingAction* userAction);
0108 void SetUserAction(G4UserTrackingAction* userAction);
0109 void SetUserAction(G4UserSteppingAction* userAction);
0110 inline G4UserEventAction* GetUserEventAction()
0111 { return userEventAction; }
0112 inline G4UserStackingAction* GetUserStackingAction()
0113 { return userStackingAction; }
0114 inline G4UserTrackingAction* GetUserTrackingAction()
0115 { return userTrackingAction; }
0116 inline G4UserSteppingAction* GetUserSteppingAction()
0117 { return userSteppingAction; }
0118
0119
0120
0121
0122 void KeepTheCurrentEvent();
0123
0124
0125
0126 inline G4StackManager* GetStackManager() const
0127 { return trackContainer; }
0128 inline G4TrackingManager* GetTrackingManager() const
0129 { return trackManager; }
0130
0131 inline G4int GetVerboseLevel()
0132 { return verboseLevel; }
0133 inline void SetVerboseLevel( G4int value )
0134 {
0135 verboseLevel = value;
0136 trackContainer->SetVerboseLevel( value );
0137 transformer->SetVerboseLevel( value );
0138 }
0139
0140
0141 void SetUserInformation(G4VUserEventInformation* anInfo);
0142 G4VUserEventInformation* GetUserInformation();
0143
0144
0145
0146
0147 inline G4PrimaryTransformer* GetPrimaryTransformer() const
0148 { return transformer; }
0149 inline void SetPrimaryTransformer(G4PrimaryTransformer* tf)
0150 { transformer = tf; }
0151 inline void StoreRandomNumberStatusToG4Event(G4int vl)
0152 { storetRandomNumberStatusToG4Event = vl; }
0153
0154 inline void UseSubEventParallelism(G4bool worker = false)
0155 {
0156 subEventPara = true;
0157 subEventParaWorker = worker;
0158 }
0159
0160 G4SubEvent* PopSubEvent(G4int ty);
0161
0162
0163
0164
0165 void TerminateSubEvent(const G4SubEvent* se,const G4Event* evt);
0166
0167
0168
0169
0170
0171 G4int StoreSubEvent(G4Event*, G4int&, G4SubEvent*);
0172
0173
0174
0175
0176 private:
0177
0178 void DoProcessing(G4Event* anEvent,
0179 G4TrackVector* trackVector = nullptr, G4bool IDhasAlreadySet= false);
0180
0181 private:
0182
0183 static G4ThreadLocal G4EventManager* fpEventManager;
0184
0185 G4Event* currentEvent = nullptr;
0186
0187 G4StackManager* trackContainer = nullptr;
0188 G4TrackingManager* trackManager = nullptr;
0189 G4TrajectoryContainer* trajectoryContainer = nullptr;
0190 G4int trackIDCounter = 0;
0191 G4int verboseLevel = 0;
0192 G4SDManager* sdManager = nullptr;
0193 G4PrimaryTransformer* transformer = nullptr;
0194 G4bool tracking = false;
0195 G4bool abortRequested = false;
0196 G4bool subEventPara = false;
0197 G4bool subEventParaWorker = false;
0198 G4int evID_inSubEv = -1;
0199
0200 G4EvManMessenger* theMessenger = nullptr;
0201
0202 G4UserEventAction* userEventAction = nullptr;
0203 G4UserStackingAction* userStackingAction = nullptr;
0204 G4UserTrackingAction* userTrackingAction = nullptr;
0205 G4UserSteppingAction* userSteppingAction = nullptr;
0206
0207 G4int storetRandomNumberStatusToG4Event = 0;
0208 G4String randomNumberStatusToG4Event;
0209
0210 G4StateManager* stateManager = nullptr;
0211 };
0212
0213 #endif