Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FastSimulationMessenger Class Reference

#include <G4FastSimulationMessenger.hh>

+ Inheritance diagram for G4FastSimulationMessenger:

Public Member Functions

 G4FastSimulationMessenger (G4GlobalFastSimulationManager *theGFSM)
 
 ~G4FastSimulationMessenger () override
 
void SetNewValue (G4UIcommand *command, G4String newValues) override
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()=default
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String LtoS (G4long l)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (const G4String &s)
 
G4long StoL (const G4String &s)
 
G4double StoD (const G4String &s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Detailed Description

Definition at line 52 of file G4FastSimulationMessenger.hh.

Constructor & Destructor Documentation

◆ G4FastSimulationMessenger()

G4FastSimulationMessenger::G4FastSimulationMessenger ( G4GlobalFastSimulationManager * theGFSM)

Definition at line 36 of file G4FastSimulationMessenger.cc.

37 : fGlobalFastSimulationManager(theGFSM)
38{
39 fFSDirectory = new G4UIdirectory("/param/");
40 fFSDirectory->SetGuidance("Fast Simulation print/control commands.");
41
42 fShowSetupCmd = new G4UIcmdWithoutParameter("/param/showSetup", this);
43 fShowSetupCmd->SetGuidance("Show fast simulation setup:");
44 fShowSetupCmd->SetGuidance(" - for each world region:");
45 fShowSetupCmd->SetGuidance(" 1) fast simulation manager process attached;");
46 fShowSetupCmd->SetGuidance(" - and to which particles the process is attached to;");
47 fShowSetupCmd->SetGuidance(" 2) region hierarchy;");
48 fShowSetupCmd->SetGuidance(" - with for each the fast simulation models attached;");
50
51 fListEnvelopesCmd = new G4UIcmdWithAString("/param/listEnvelopes", this);
52 fListEnvelopesCmd->SetParameterName("ParticleName", true);
53 fListEnvelopesCmd->SetDefaultValue("all");
54 fListEnvelopesCmd->SetGuidance("List all the envelope names for a given Particle");
55 fListEnvelopesCmd->SetGuidance("(or for all particles if without parameters).");
57
58 fListModelsCmd = new G4UIcmdWithAString("/param/listModels", this);
59 fListModelsCmd->SetParameterName("EnvelopeName", true);
60 fListModelsCmd->SetDefaultValue("all");
61 fListModelsCmd->SetGuidance("List all the Model names for a given Envelope");
62 fListModelsCmd->SetGuidance("(or for all envelopes if without parameters).");
64
65 fListIsApplicableCmd = new G4UIcmdWithAString("/param/listIsApplicable", this);
66 fListIsApplicableCmd->SetParameterName("ModelName", true);
67 fListIsApplicableCmd->SetDefaultValue("all");
68 fListIsApplicableCmd->SetGuidance("List all the Particle names a given Model is applicable");
69 fListIsApplicableCmd->SetGuidance("(or for all Models if without parameters).");
70
71 fActivateModel = new G4UIcmdWithAString("/param/ActivateModel", this);
72 fActivateModel->SetParameterName("ModelName", false);
73 fActivateModel->SetGuidance("Activate a given Model.");
74
75 fInActivateModel = new G4UIcmdWithAString("/param/InActivateModel", this);
76 fInActivateModel->SetParameterName("ModelName", false);
77 fInActivateModel->SetGuidance("InActivate a given Model.");
78}
@ G4State_Idle
@ G4State_GeomClosed
@ G4State_PreInit
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetGuidance(const char *aGuidance)
void AvailableForStates(G4ApplicationState s1)

◆ ~G4FastSimulationMessenger()

G4FastSimulationMessenger::~G4FastSimulationMessenger ( )
override

Definition at line 80 of file G4FastSimulationMessenger.cc.

81{
82 delete fShowSetupCmd;
83 delete fListIsApplicableCmd;
84 delete fActivateModel;
85 delete fInActivateModel;
86 delete fListModelsCmd;
87 delete fListEnvelopesCmd;
88 delete fFSDirectory;
89}

Member Function Documentation

◆ SetNewValue()

void G4FastSimulationMessenger::SetNewValue ( G4UIcommand * command,
G4String newValues )
overridevirtual

Reimplemented from G4UImessenger.

Definition at line 91 of file G4FastSimulationMessenger.cc.

92{
93 if (command == fShowSetupCmd) fGlobalFastSimulationManager->ShowSetup();
94 if (command == fListEnvelopesCmd) {
95 if (newValue == "all")
96 fGlobalFastSimulationManager->ListEnvelopes();
97 else
98 fGlobalFastSimulationManager->ListEnvelopes(
99 G4ParticleTable::GetParticleTable()->FindParticle(newValue));
100 }
101 if (command == fListModelsCmd) fGlobalFastSimulationManager->ListEnvelopes(newValue, MODELS);
102 if (command == fListIsApplicableCmd)
103 fGlobalFastSimulationManager->ListEnvelopes(newValue, ISAPPLICABLE);
104 if (command == fActivateModel)
105 fGlobalFastSimulationManager->ActivateFastSimulationModel(newValue);
106 if (command == fInActivateModel)
107 fGlobalFastSimulationManager->InActivateFastSimulationModel(newValue);
108}
void ListEnvelopes(const G4String &aName="all", listType aListType=NAMES_ONLY)
static G4ParticleTable * GetParticleTable()

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