ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
G4AtlasActionInitialization Class Reference

Action initialization class. More...

#include <G4AtlasActionInitialization.h>

Inheritance diagram for G4AtlasActionInitialization:
Collaboration diagram for G4AtlasActionInitialization:

Public Member Functions

 G4AtlasActionInitialization (G4UA::IUserActionSvc *userActionSvc)
 
virtual ~G4AtlasActionInitialization ()
 
virtual void BuildForMaster () const
 
virtual void Build () const
 

Private Attributes

G4UA::IUserActionSvcm_userActionSvc {}
 

Detailed Description

Action initialization class.

Definition at line 14 of file G4AtlasActionInitialization.h.

Constructor & Destructor Documentation

◆ G4AtlasActionInitialization()

G4AtlasActionInitialization::G4AtlasActionInitialization ( G4UA::IUserActionSvc userActionSvc)

Definition at line 12 of file G4AtlasActionInitialization.cxx.

13  : G4VUserActionInitialization()
14  , m_userActionSvc(userActionSvc)
15 {}

◆ ~G4AtlasActionInitialization()

G4AtlasActionInitialization::~G4AtlasActionInitialization ( )
virtual

Definition at line 18 of file G4AtlasActionInitialization.cxx.

19 {}

Member Function Documentation

◆ Build()

void G4AtlasActionInitialization::Build ( ) const
virtual

Definition at line 31 of file G4AtlasActionInitialization.cxx.

32 {
33  if (!m_userActionSvc) {
34  G4ExceptionDescription description;
35  description << "Build: UserActionSvc is NULL.";
36  G4Exception("G4AtlasActionInitialization", "NoUserActionSvc", FatalException, description);
37  abort(); // to keep Coverity happy
38  }
39  if (m_userActionSvc->initializeActions().isFailure()) { //Consider renaming to buildActions()?
40  G4ExceptionDescription description;
41  description << "Build: Failed to create UserActions.";
42  G4Exception("G4AtlasActionInitialization", "CouldNotBuildActions", FatalException, description);
43  abort(); // to keep Coverity happy
44  }
45 }

◆ BuildForMaster()

void G4AtlasActionInitialization::BuildForMaster ( ) const
virtual

Definition at line 22 of file G4AtlasActionInitialization.cxx.

23 {
24  G4VUserActionInitialization::BuildForMaster();
25  // TODO Ideally separate "master" versions of the G4RunActions would
26  // be created, but this will require a larger redesign. See
27  // https://gitlab.cern.ch/geant4/geant4/-/blob/master/examples/basic/B4/B4a/src/B4aActionInitialization.cc#L52
28 }

Member Data Documentation

◆ m_userActionSvc

G4UA::IUserActionSvc* G4AtlasActionInitialization::m_userActionSvc {}
private

Definition at line 24 of file G4AtlasActionInitialization.h.


The documentation for this class was generated from the following files:
G4UA::IUserActionSvc::initializeActions
virtual StatusCode initializeActions()=0
Initialize all the user actions for the current thread.
G4AtlasActionInitialization::m_userActionSvc
G4UA::IUserActionSvc * m_userActionSvc
Definition: G4AtlasActionInitialization.h:24
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88