ATLAS Offline Software
Loading...
Searching...
No Matches
G4UA::Geant4SetupCheckerTool Class Reference

Tool which manages the Geant4SetupChecker. More...

#include <Geant4SetupCheckerTool.h>

Inheritance diagram for G4UA::Geant4SetupCheckerTool:
Collaboration diagram for G4UA::Geant4SetupCheckerTool:

Public Member Functions

 Geant4SetupCheckerTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
virtual StatusCode fillUserAction (G4AtlasUserActions &actionLists) override final
 Fill the user action lists.
StatusCode BeginOfAthenaEvent (HitCollectionMap &) override
 Calls BeginOfAthenaEvent.
StatusCode EndOfAthenaEvent (HitCollectionMap &) override
 Calls EndOfAthenaEvent.

Protected Member Functions

virtual std::unique_ptr< Geant4SetupCheckermakeAndFillAction (G4AtlasUserActions &) override final
 Create an action for this thread.

Protected Attributes

ThreadSpecificUserAction< Geant4SetupCheckerm_actions
 Thread-specific storage of the user action.

Private Attributes

std::string m_file_location
 File location for reference file.
bool m_test
 Test the setup or write a reference file?

Detailed Description

Tool which manages the Geant4SetupChecker.

Author
Zach Marshall

Definition at line 19 of file Geant4SetupCheckerTool.h.

Constructor & Destructor Documentation

◆ Geant4SetupCheckerTool()

G4UA::Geant4SetupCheckerTool::Geant4SetupCheckerTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Standard constructor.

Definition at line 10 of file Geant4SetupCheckerTool.cxx.

13 : UserActionToolBase<Geant4SetupChecker>(type, name, parent),
14 m_file_location("reference_file.txt"),
15 m_test(true)
16 {
17 declareProperty("ReferenceFile",m_file_location);
18 declareProperty("RunTest",m_test);
19 }
std::string m_file_location
File location for reference file.
bool m_test
Test the setup or write a reference file?
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ BeginOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< Geant4SetupChecker >::BeginOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls BeginOfAthenaEvent.

Definition at line 59 of file UserActionToolBase.h.

59{return StatusCode::SUCCESS;};
abstract template utility base-class for G4 user-action tools.

◆ EndOfAthenaEvent()

StatusCode G4UA::UserActionToolBase< Geant4SetupChecker >::EndOfAthenaEvent ( HitCollectionMap & )
inlineoverrideinherited

Calls EndOfAthenaEvent.

Definition at line 61 of file UserActionToolBase.h.

61{return StatusCode::SUCCESS;};

◆ fillUserAction()

virtual StatusCode G4UA::UserActionToolBase< Geant4SetupChecker >::fillUserAction ( G4AtlasUserActions & actionLists)
inlinefinaloverridevirtualinherited

Fill the user action lists.

Definition at line 47 of file UserActionToolBase.h.

48 {
50 if(myAction == nullptr) {
51 ATH_MSG_ERROR( "Failed to construct user action in " << name() );
53 }
56 }
#define ATH_MSG_ERROR(x)
virtual std::unique_ptr< Geant4SetupChecker > makeAndFillAction(G4AtlasUserActions &actionLists)=0

◆ makeAndFillAction()

std::unique_ptr< Geant4SetupChecker > G4UA::Geant4SetupCheckerTool::makeAndFillAction ( G4AtlasUserActions & actionList)
finaloverrideprotectedvirtual

Create an action for this thread.

Implements G4UA::UserActionToolBase< Geant4SetupChecker >.

Definition at line 22 of file Geant4SetupCheckerTool.cxx.

23 {
24 ATH_MSG_DEBUG("Constructing a Geant4SetupChecker");
25 auto action = std::make_unique<Geant4SetupChecker>(m_file_location,m_test);
26 actionList.runActions.push_back( action.get() );
27 return action;
28 }
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_actions

Thread-specific storage of the user action.

Definition at line 70 of file UserActionToolBase.h.

◆ m_file_location

std::string G4UA::Geant4SetupCheckerTool::m_file_location
private

File location for reference file.

Definition at line 31 of file Geant4SetupCheckerTool.h.

◆ m_test

bool G4UA::Geant4SetupCheckerTool::m_test
private

Test the setup or write a reference file?

Definition at line 33 of file Geant4SetupCheckerTool.h.


The documentation for this class was generated from the following files: