Geant4 9.6.0
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 48 of file G4VUserPrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

◆ G4VUserPrimaryGeneratorAction()

G4VUserPrimaryGeneratorAction::G4VUserPrimaryGeneratorAction ( )

Definition at line 34 of file G4VUserPrimaryGeneratorAction.cc.

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

◆ ~G4VUserPrimaryGeneratorAction()

G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction ( )
virtual

Definition at line 50 of file G4VUserPrimaryGeneratorAction.cc.

51{;}

Member Function Documentation

◆ GeneratePrimaries()

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

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