Geant4 11.1.1
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)
 
virtual ~G4FastSimulationMessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
- 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)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
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.

38 : fGlobalFastSimulationManager(theGFSM)
39{
40 fFSDirectory = new G4UIdirectory("/param/");
41 fFSDirectory->SetGuidance("Fast Simulation print/control commands.");
42
43 fShowSetupCmd =
44 new G4UIcmdWithoutParameter("/param/showSetup", this);
45 fShowSetupCmd->SetGuidance("Show fast simulation setup:");
46 fShowSetupCmd->SetGuidance(" - for each world region:");
47 fShowSetupCmd->SetGuidance(" 1) fast simulation manager process attached;");
48 fShowSetupCmd->SetGuidance(" - and to which particles the process is attached to;");
49 fShowSetupCmd->SetGuidance(" 2) region hierarchy;");
50 fShowSetupCmd->SetGuidance(" - with for each the fast simulation models attached;");
52
53 fListEnvelopesCmd =
54 new G4UIcmdWithAString("/param/listEnvelopes", this);
55 fListEnvelopesCmd->SetParameterName("ParticleName",true);
56 fListEnvelopesCmd->SetDefaultValue("all");
57 fListEnvelopesCmd->SetGuidance("List all the envelope names for a given Particle");
58 fListEnvelopesCmd->SetGuidance("(or for all particles if without parameters).");
60
61 fListModelsCmd =
62 new G4UIcmdWithAString("/param/listModels", this);
63 fListModelsCmd->SetParameterName("EnvelopeName",true);
64 fListModelsCmd->SetDefaultValue("all");
65 fListModelsCmd->SetGuidance("List all the Model names for a given Envelope");
66 fListModelsCmd->SetGuidance("(or for all envelopes if without parameters).");
68
69 fListIsApplicableCmd =
70 new G4UIcmdWithAString("/param/listIsApplicable", this);
71 fListIsApplicableCmd->SetParameterName("ModelName",true);
72 fListIsApplicableCmd->SetDefaultValue("all");
73 fListIsApplicableCmd->SetGuidance("List all the Particle names a given Model is applicable");
74 fListIsApplicableCmd->SetGuidance("(or for all Models if without parameters).");
75
76 fActivateModel =
77 new G4UIcmdWithAString("/param/ActivateModel", this);
78 fActivateModel->SetParameterName("ModelName",false);
79 fActivateModel->SetGuidance("Activate a given Model.");
80
81 fInActivateModel =
82 new G4UIcmdWithAString("/param/InActivateModel", this);
83 fInActivateModel->SetParameterName("ModelName",false);
84 fInActivateModel->SetGuidance("InActivate a given Model.");
85}
@ 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)
Definition: G4UIcommand.hh:157
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:287

◆ ~G4FastSimulationMessenger()

G4FastSimulationMessenger::~G4FastSimulationMessenger ( )
virtual

Definition at line 87 of file G4FastSimulationMessenger.cc.

88{
89 delete fShowSetupCmd;
90 fShowSetupCmd = 0;
91 delete fListIsApplicableCmd;
92 fListIsApplicableCmd = 0;
93 delete fActivateModel;
94 fActivateModel = 0;
95 delete fInActivateModel;
96 fInActivateModel = 0;
97 delete fListModelsCmd;
98 fListModelsCmd = 0;
99 delete fListEnvelopesCmd;
100 fListEnvelopesCmd = 0;
101 delete fFSDirectory;
102 fFSDirectory = 0;
103}

Member Function Documentation

◆ SetNewValue()

void G4FastSimulationMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 105 of file G4FastSimulationMessenger.cc.

106{
107 if (command == fShowSetupCmd)
108 fGlobalFastSimulationManager->ShowSetup();
109 if( command == fListEnvelopesCmd)
110 {
111 if(newValue == "all")
112 fGlobalFastSimulationManager->ListEnvelopes();
113 else
114 fGlobalFastSimulationManager->
115 ListEnvelopes(G4ParticleTable::GetParticleTable()->
116 FindParticle(newValue));
117 }
118 if( command == fListModelsCmd)
119 fGlobalFastSimulationManager->ListEnvelopes(newValue, MODELS);
120 if( command == fListIsApplicableCmd)
121 fGlobalFastSimulationManager->ListEnvelopes(newValue, ISAPPLICABLE);
122 if( command == fActivateModel)
123 fGlobalFastSimulationManager->ActivateFastSimulationModel(newValue);
124 if( command == fInActivateModel)
125 fGlobalFastSimulationManager->InActivateFastSimulationModel(newValue);
126}
void ListEnvelopes(const G4String &aName="all", listType aListType=NAMES_ONLY)
void InActivateFastSimulationModel(const G4String &)
static G4ParticleTable * GetParticleTable()

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