MCPcopy Create free account
hub / github.com/Geant4/geant4 / DefineUserActions

Method DefineUserActions

source/run/src/G4AdjointSimManager.cc:267–282  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

265// --------------------------------------------------------------------
266//
267void G4AdjointSimManager::DefineUserActions()
268{
269 G4RunManager* theRunManager = G4RunManager::GetRunManager();
270 fUserRunAction =
271 const_cast<G4UserRunAction*>(theRunManager->GetUserRunAction());
272 if (G4Threading::G4GetThreadId() != -1) {
273 fUserTrackingAction = const_cast<G4UserTrackingAction*>(theRunManager->GetUserTrackingAction());
274 fUserEventAction = const_cast<G4UserEventAction*>(theRunManager->GetUserEventAction());
275 fUserSteppingAction = const_cast<G4UserSteppingAction*>(theRunManager->GetUserSteppingAction());
276 theAdjointSteppingAction->SetUserForwardSteppingAction(fUserSteppingAction);
277 fUserPrimaryGeneratorAction =
278 const_cast<G4VUserPrimaryGeneratorAction*>(theRunManager->GetUserPrimaryGeneratorAction());
279 fUserStackingAction = const_cast<G4UserStackingAction*>(theRunManager->GetUserStackingAction());
280 user_action_already_defined = true;
281 }
282}
283
284// --------------------------------------------------------------------
285//

Callers

nothing calls this directly

Calls 7

GetUserRunActionMethod · 0.80
GetUserTrackingActionMethod · 0.45
GetUserEventActionMethod · 0.45
GetUserSteppingActionMethod · 0.45
GetUserStackingActionMethod · 0.45

Tested by

no test coverage detected