Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UserRunAction Class Reference

#include <G4UserRunAction.hh>

+ Inheritance diagram for G4UserRunAction:

Public Member Functions

 G4UserRunAction ()
 
virtual ~G4UserRunAction ()
 
virtual G4RunGenerateRun ()
 
virtual void BeginOfRunAction (const G4Run *aRun)
 
virtual void EndOfRunAction (const G4Run *aRun)
 
virtual void SetMaster (G4bool val=true)
 
G4bool IsMaster () const
 

Protected Attributes

G4bool isMaster = true
 

Detailed Description

Definition at line 52 of file G4UserRunAction.hh.

Constructor & Destructor Documentation

◆ G4UserRunAction()

G4UserRunAction::G4UserRunAction ( )

Definition at line 36 of file G4UserRunAction.cc.

37{
38 if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
39 {
40 G4String msg;
41 msg = " You are instantiating G4UserRunAction BEFORE your "
42 "G4VUserPhysicsList is\n";
43 msg += "instantiated and assigned to G4RunManager.\n";
44 msg +=
45 " Such an instantiation is prohibited. To fix this problem,\n";
46 msg +=
47 "please make sure that your main() instantiates G4VUserPhysicsList AND\n";
48 msg +=
49 "set it to G4RunManager before instantiating other user action classes\n";
50 msg += "such as G4UserRunAction.";
51 G4Exception("G4UserRunAction::G4UserRunAction()", "Run0041",
52 FatalException, msg);
53 }
54}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
static G4ParticleTable * GetParticleTable()

◆ ~G4UserRunAction()

G4UserRunAction::~G4UserRunAction ( )
virtual

Definition at line 57 of file G4UserRunAction.cc.

58{
59}

Member Function Documentation

◆ BeginOfRunAction()

void G4UserRunAction::BeginOfRunAction ( const G4Run aRun)
virtual

◆ EndOfRunAction()

void G4UserRunAction::EndOfRunAction ( const G4Run aRun)
virtual

◆ GenerateRun()

G4Run * G4UserRunAction::GenerateRun ( )
virtual

◆ IsMaster()

G4bool G4UserRunAction::IsMaster ( ) const
inline

Definition at line 64 of file G4UserRunAction.hh.

64{ return isMaster; }

◆ SetMaster()

virtual void G4UserRunAction::SetMaster ( G4bool  val = true)
inlinevirtual

Member Data Documentation

◆ isMaster

G4bool G4UserRunAction::isMaster = true
protected

Definition at line 68 of file G4UserRunAction.hh.

Referenced by IsMaster(), and SetMaster().


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