Geant4 10.7.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 33 of file G4VUserPrimaryGeneratorAction.cc.

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

◆ ~G4VUserPrimaryGeneratorAction()

G4VUserPrimaryGeneratorAction::~G4VUserPrimaryGeneratorAction ( )
virtual

Definition at line 54 of file G4VUserPrimaryGeneratorAction.cc.

54{ ; }

Member Function Documentation

◆ GeneratePrimaries()

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

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