16 #include "G4GenericMessenger.hh"
18 #ifdef eAST_USE_HepMC3
20 #endif // eAST_USE_HepMC3
24 filler =
new G4TScoreHistFiller<G4AnalysisManager>;
26 generatorMsg =
new G4GenericMessenger(
this,
"/eAST/generator/",
27 "primary particle generator selection");
29 auto& useParticleGunCmd =
generatorMsg->DeclareProperty(
"useParticleGun",
31 useParticleGunCmd.SetStates(G4State_PreInit);
32 useParticleGunCmd.SetToBeBroadcasted(
false);
33 auto& useParticleSourceCmd =
generatorMsg->DeclareProperty(
"useParticleSource",
35 useParticleSourceCmd.SetStates(G4State_PreInit);
36 useParticleSourceCmd.SetToBeBroadcasted(
false);
38 #ifdef eAST_USE_HepMC3
39 auto& useHepMC3InterfaceCmd =
generatorMsg->DeclareProperty(
"useHepMC3",
41 useHepMC3InterfaceCmd.SetStates(G4State_PreInit);
42 useHepMC3InterfaceCmd.SetToBeBroadcasted(
false);
43 #endif // eAST_USE_HepMC3
55 #ifdef eAST_USE_HepMC3
59 G4cout <<
"eASTHepMC3Interface is instantiated ########### " <<
HepMC3 << G4endl;
61 #endif // eAST_USE_HepMC3
70 G4ExceptionDescription ed;
71 ed <<
"No way to generate primary particles!!!\n"
72 <<
"Use command(s) in /eAST/generator/ to define at least one primary generator.";
73 G4Exception(
"eASTActionInitialization::Build()",
"eAST0001",FatalException,ed);