#include <G4FastSimulationMessenger.hh>
Inheritance diagram for G4FastSimulationMessenger:
Public Member Functions | |
G4FastSimulationMessenger (G4GlobalFastSimulationManager *theGFSM) | |
virtual | ~G4FastSimulationMessenger () |
void | SetNewValue (G4UIcommand *command, G4String newValues) |
Definition at line 53 of file G4FastSimulationMessenger.hh.
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().
00039 : fGlobalFastSimulationManager(theGFSM) 00040 { 00041 fFSDirectory = new G4UIdirectory("/param/"); 00042 fFSDirectory->SetGuidance("Fast Simulation print/control commands."); 00043 00044 fShowSetupCmd = 00045 new G4UIcmdWithoutParameter("/param/showSetup", this); 00046 fShowSetupCmd->SetGuidance("Show fast simulation setup:"); 00047 fShowSetupCmd->SetGuidance(" - for each world region:"); 00048 fShowSetupCmd->SetGuidance(" 1) fast simulation manager process attached;"); 00049 fShowSetupCmd->SetGuidance(" - and to which particles the process is attached to;"); 00050 fShowSetupCmd->SetGuidance(" 2) region hierarchy;"); 00051 fShowSetupCmd->SetGuidance(" - with for each the fast simulation models attached;"); 00052 fShowSetupCmd->AvailableForStates(G4State_Idle, G4State_GeomClosed); 00053 00054 fListEnvelopesCmd = 00055 new G4UIcmdWithAString("/param/listEnvelopes", this); 00056 fListEnvelopesCmd->SetParameterName("ParticleName",true); 00057 fListEnvelopesCmd->SetDefaultValue("all"); 00058 fListEnvelopesCmd->SetGuidance("List all the envelope names for a given Particle"); 00059 fListEnvelopesCmd->SetGuidance("(or for all particles if without parameters)."); 00060 fListEnvelopesCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 00061 00062 fListModelsCmd = 00063 new G4UIcmdWithAString("/param/listModels", this); 00064 fListModelsCmd->SetParameterName("EnvelopeName",true); 00065 fListModelsCmd->SetDefaultValue("all"); 00066 fListModelsCmd->SetGuidance("List all the Model names for a given Envelope"); 00067 fListModelsCmd->SetGuidance("(or for all envelopes if without parameters)."); 00068 fListModelsCmd->AvailableForStates(G4State_PreInit,G4State_Idle); 00069 00070 fListIsApplicableCmd = 00071 new G4UIcmdWithAString("/param/listIsApplicable", this); 00072 fListIsApplicableCmd->SetParameterName("ModelName",true); 00073 fListIsApplicableCmd->SetDefaultValue("all"); 00074 fListIsApplicableCmd->SetGuidance("List all the Particle names a given Model is applicable"); 00075 fListIsApplicableCmd->SetGuidance("(or for all Models if without parameters)."); 00076 00077 fActivateModel = 00078 new G4UIcmdWithAString("/param/ActivateModel", this); 00079 fActivateModel->SetParameterName("ModelName",false); 00080 fActivateModel->SetGuidance("Activate a given Model."); 00081 00082 fInActivateModel = 00083 new G4UIcmdWithAString("/param/InActivateModel", this); 00084 fInActivateModel->SetParameterName("ModelName",false); 00085 fInActivateModel->SetGuidance("InActivate a given Model."); 00086 }
G4FastSimulationMessenger::~G4FastSimulationMessenger | ( | ) | [virtual] |
Definition at line 88 of file G4FastSimulationMessenger.cc.
00089 { 00090 delete fShowSetupCmd; 00091 fShowSetupCmd = 0; 00092 delete fListIsApplicableCmd; 00093 fListIsApplicableCmd = 0; 00094 delete fActivateModel; 00095 fActivateModel = 0; 00096 delete fInActivateModel; 00097 fInActivateModel = 0; 00098 delete fListModelsCmd; 00099 fListModelsCmd = 0; 00100 delete fListEnvelopesCmd; 00101 fListEnvelopesCmd = 0; 00102 delete fFSDirectory; 00103 fFSDirectory = 0; 00104 }
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().
00107 { 00108 if (command == fShowSetupCmd) 00109 fGlobalFastSimulationManager->ShowSetup(); 00110 if( command == fListEnvelopesCmd) 00111 { 00112 if(newValue == "all") 00113 fGlobalFastSimulationManager->ListEnvelopes(); 00114 else 00115 fGlobalFastSimulationManager-> 00116 ListEnvelopes(G4ParticleTable::GetParticleTable()-> 00117 FindParticle(newValue)); 00118 } 00119 if( command == fListModelsCmd) 00120 fGlobalFastSimulationManager->ListEnvelopes(newValue, MODELS); 00121 if( command == fListIsApplicableCmd) 00122 fGlobalFastSimulationManager->ListEnvelopes(newValue, ISAPPLICABLE); 00123 if( command == fActivateModel) 00124 fGlobalFastSimulationManager->ActivateFastSimulationModel(newValue); 00125 if( command == fInActivateModel) 00126 fGlobalFastSimulationManager->InActivateFastSimulationModel(newValue); 00127 }