ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
G4UA::TestAction Class Reference

#include <TestActionTool.h>

Inheritance diagram for G4UA::TestAction:
Collaboration diagram for G4UA::TestAction:

Classes

struct  Report
 Results to be accumulated across threads at end of job. More...
 

Public Member Functions

 TestAction ()
 Constructor. More...
 
virtual void BeginOfRunAction (const G4Run *) override final
 Executes before the run. More...
 
virtual void EndOfRunAction (const G4Run *) override final
 Exeuctes after the run. More...
 
virtual void BeginOfEventAction (const G4Event *) override final
 Executes at beginning of G4 event. More...
 
virtual void EndOfEventAction (const G4Event *) override final
 Executes at end of G4 event. More...
 
virtual void UserSteppingAction (const G4Step *step) override final
 Stepping action method. More...
 
const ReportgetReport () const
 Get the results report. More...
 

Private Attributes

Report m_report
 Results report. More...
 

Detailed Description

Author
Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 27 of file TestActionTool.h.

Constructor & Destructor Documentation

◆ TestAction()

G4UA::TestAction::TestAction ( )

Constructor.

Definition at line 17 of file TestActionTool.cxx.

18  {}

Member Function Documentation

◆ BeginOfEventAction()

void G4UA::TestAction::BeginOfEventAction ( const G4Event *  )
finaloverridevirtual

Executes at beginning of G4 event.

Definition at line 42 of file TestActionTool.cxx.

43  {
44  G4cout << "TestAction::BeginOfEventAction" << G4endl;
46  }

◆ BeginOfRunAction()

void G4UA::TestAction::BeginOfRunAction ( const G4Run *  )
finaloverridevirtual

Executes before the run.

Definition at line 23 of file TestActionTool.cxx.

24  {
25  G4cout << "TestAction::BeginOfRunAction" << G4endl;
26  }

◆ EndOfEventAction()

void G4UA::TestAction::EndOfEventAction ( const G4Event *  )
finaloverridevirtual

Executes at end of G4 event.

Definition at line 51 of file TestActionTool.cxx.

52  {
53  G4cout << "TestAction::EndOfEventAction" << G4endl;
54  }

◆ EndOfRunAction()

void G4UA::TestAction::EndOfRunAction ( const G4Run *  )
finaloverridevirtual

Exeuctes after the run.

Definition at line 31 of file TestActionTool.cxx.

32  {
33  G4cout << "TestAction::EndOfRunAction - "
34  << m_report.numEvent << " events processed, "
35  << m_report.numStep << " steps processed"
36  << G4endl;
37  }

◆ getReport()

const Report& G4UA::TestAction::getReport ( ) const
inline

Get the results report.

Definition at line 64 of file TestActionTool.h.

65  { return m_report; }

◆ UserSteppingAction()

void G4UA::TestAction::UserSteppingAction ( const G4Step *  step)
finaloverridevirtual

Stepping action method.

Definition at line 59 of file TestActionTool.cxx.

60  {
61  m_report.numStep++;
62  }

Member Data Documentation

◆ m_report

Report G4UA::TestAction::m_report
private

Results report.

Definition at line 70 of file TestActionTool.h.


The documentation for this class was generated from the following files:
G4UA::TestAction::m_report
Report m_report
Results report.
Definition: TestActionTool.h:70
G4UA::TestAction::Report::numEvent
int numEvent
Definition: TestActionTool.h:37
G4UA::TestAction::Report::numStep
int numStep
Definition: TestActionTool.h:38