Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4FastSimulationMessenger Class Reference

#include <G4FastSimulationMessenger.hh>

Inheritance diagram for G4FastSimulationMessenger:
G4UImessenger

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (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
 
G4String baseDirName
 

Detailed Description

Definition at line 53 of file G4FastSimulationMessenger.hh.

Constructor & Destructor Documentation

G4FastSimulationMessenger::G4FastSimulationMessenger ( G4GlobalFastSimulationManager theGFSM)

Definition at line 38 of file G4FastSimulationMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_GeomClosed, G4State_Idle, G4State_PreInit, G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), and G4UIcmdWithAString::SetParameterName().

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

Definition at line 88 of file G4FastSimulationMessenger.cc.

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

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 106 of file G4FastSimulationMessenger.cc.

References G4GlobalFastSimulationManager::ActivateFastSimulationModel(), G4ParticleTable::GetParticleTable(), G4GlobalFastSimulationManager::InActivateFastSimulationModel(), ISAPPLICABLE, G4GlobalFastSimulationManager::ListEnvelopes(), MODELS, and G4GlobalFastSimulationManager::ShowSetup().

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

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