ATLAS Offline Software
Loading...
Searching...
No Matches
G4AtlasActionInitialization.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6#if G4VERSION_NUMBER >= 1070
7#include "G4Exception.hh"
8#else
9#include "globals.hh"
10#endif
11
13 : G4VUserActionInitialization()
14 , m_userActionSvc(userActionSvc)
15{}
16
17
20
21
23{
24
25 // Here, can only add run actions
26 if (!m_userActionSvc) {
27 G4ExceptionDescription description;
28 description << "BuildForMaster: UserActionSvc is NULL.";
29 G4Exception("G4AtlasActionInitialization", "NoUserActionSvc", FatalException, description);
30 abort(); // to keep Coverity happy
31 }
32 if (m_userActionSvc->initializeActionsMaster().isFailure()) { //Consider renaming to buildActions()?
33 G4ExceptionDescription description;
34 description << "BuildForMaster: Failed to create UserActions on main thread.";
35 G4Exception("G4AtlasActionInitialization", "CouldNotBuildActions", FatalException, description);
36 abort(); // to keep Coverity happy
37 }
38 G4VUserActionInitialization::BuildForMaster();
39}
40
41
43{
44 if (!m_userActionSvc) {
45 G4ExceptionDescription description;
46 description << "Build: UserActionSvc is NULL.";
47 G4Exception("G4AtlasActionInitialization", "NoUserActionSvc", FatalException, description);
48 abort(); // to keep Coverity happy
49 }
50 if (m_userActionSvc->initializeActions().isFailure()) { //Consider renaming to buildActions()?
51 G4ExceptionDescription description;
52 description << "Build: Failed to create UserActions.";
53 G4Exception("G4AtlasActionInitialization", "CouldNotBuildActions", FatalException, description);
54 abort(); // to keep Coverity happy
55 }
56}
G4AtlasActionInitialization(G4UA::IUserActionSvc *userActionSvc)
Abstract interface for the UserActionSvc.
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91