Geant4 10.7.0
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
 

Detailed Description

Definition at line 51 of file G4UserRunAction.hh.

Constructor & Destructor Documentation

◆ G4UserRunAction()

G4UserRunAction::G4UserRunAction ( )

Definition at line 33 of file G4UserRunAction.cc.

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

◆ ~G4UserRunAction()

G4UserRunAction::~G4UserRunAction ( )
virtual

Definition at line 55 of file G4UserRunAction.cc.

55{ ; }

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 67 of file G4UserRunAction.hh.

67{ return isMaster; }

◆ SetMaster()

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

Member Data Documentation

◆ isMaster

G4bool G4UserRunAction::isMaster
protected

Definition at line 63 of file G4UserRunAction.hh.

Referenced by IsMaster(), and SetMaster().


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