Geant4 11.2.2
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 ()=default
 
virtual G4RunGenerateRun ()
 
virtual void BeginOfRunAction (const G4Run *)
 
virtual void EndOfRunAction (const G4Run *)
 
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 37 of file G4UserRunAction.cc.

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

◆ ~G4UserRunAction()

virtual G4UserRunAction::~G4UserRunAction ( )
virtualdefault

Member Function Documentation

◆ BeginOfRunAction()

virtual void G4UserRunAction::BeginOfRunAction ( const G4Run * )
inlinevirtual

◆ EndOfRunAction()

virtual void G4UserRunAction::EndOfRunAction ( const G4Run * )
inlinevirtual

◆ GenerateRun()

virtual G4Run * G4UserRunAction::GenerateRun ( )
inlinevirtual

◆ IsMaster()

G4bool G4UserRunAction::IsMaster ( ) const
inline

Definition at line 63 of file G4UserRunAction.hh.

63{ return isMaster; }

◆ SetMaster()

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

Member Data Documentation

◆ isMaster

G4bool G4UserRunAction::isMaster = true
protected

Definition at line 66 of file G4UserRunAction.hh.

Referenced by IsMaster(), and SetMaster().


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