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

#include <G4VUserPrimaryGeneratorAction.hh>

+ Inheritance diagram for G4VUserPrimaryGeneratorAction:

Public Member Functions

 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 
virtual void GeneratePrimaries (G4Event *anEvent)=0
 

Detailed Description

Definition at line 47 of file G4VUserPrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

◆ G4VUserPrimaryGeneratorAction()

G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction ( )

Definition at line 36 of file G4VUserPrimaryGeneratorAction.cc.

37{
38 if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
39 {
40 G4String msg;
41 msg = " You are instantiating G4VUserPrimaryGeneratorAction BEFORE your\n";
42 msg += "G4VUserPhysicsList is instantiated and assigned to G4RunManager.\n";
43 msg +=
44 " Such an instantiation is prohibited. To fix this 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 G4VUserPrimaryParticleGeneratorAction.";
51 "G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction()",
52 "Run0061", 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()

◆ ~G4VUserPrimaryGeneratorAction()

G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction ( )
virtual

Definition at line 57 of file G4VUserPrimaryGeneratorAction.cc.

58{
59}

Member Function Documentation

◆ GeneratePrimaries()

virtual void G4VUserPrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
pure virtual

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