Geant4 11.2.2
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 ()=default
 
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 37 of file G4VUserPrimaryGeneratorAction.cc.

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

◆ ~G4VUserPrimaryGeneratorAction()

virtual G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction ( )
virtualdefault

Member Function Documentation

◆ GeneratePrimaries()

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

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