Geant4-11
Public Member Functions | Protected Attributes
G4UserEventAction Class Reference

#include <G4UserEventAction.hh>

Inheritance diagram for G4UserEventAction:
CB_G4UserEventAction G4MultiEventAction QEventAction demo.MyEventAction root_test.MyEventAction run.MyEventAction test.MyEventAction test.MyEventAction

Public Member Functions

virtual void BeginOfEventAction (const G4Event *anEvent)
 
virtual void EndOfEventAction (const G4Event *anEvent)
 
 G4UserEventAction ()
 
virtual void SetEventManager (G4EventManager *value)
 
virtual ~G4UserEventAction ()
 

Protected Attributes

G4EventManagerfpEventManager = nullptr
 

Detailed Description

Definition at line 48 of file G4UserEventAction.hh.

Constructor & Destructor Documentation

◆ G4UserEventAction()

G4UserEventAction::G4UserEventAction ( )

Definition at line 37 of file G4UserEventAction.cc.

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

References FatalException, G4Exception(), and G4ParticleTable::GetParticleTable().

◆ ~G4UserEventAction()

G4UserEventAction::~G4UserEventAction ( )
virtual

Definition at line 53 of file G4UserEventAction.cc.

54{;}

Member Function Documentation

◆ BeginOfEventAction()

void G4UserEventAction::BeginOfEventAction ( const G4Event anEvent)
virtual

◆ EndOfEventAction()

void G4UserEventAction::EndOfEventAction ( const G4Event anEvent)
virtual

◆ SetEventManager()

void G4UserEventAction::SetEventManager ( G4EventManager value)
virtual

Reimplemented in G4MultiEventAction.

Definition at line 56 of file G4UserEventAction.cc.

57{
58 fpEventManager = value;
59}
G4EventManager * fpEventManager

References fpEventManager.

Referenced by G4EventManager::SetUserAction().

Field Documentation

◆ fpEventManager

G4EventManager* G4UserEventAction::fpEventManager = nullptr
protected

Definition at line 62 of file G4UserEventAction.hh.

Referenced by SetEventManager().


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