Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UIhelpers Namespace Reference

Functions

template<class T >
void buildCommands (T *proc, const char *dir, const char *guidance)
 
void buildCommands (G4OpWLS *op)
 
void buildCommands (G4Scintillation *ScintillationProcess)
 
void buildCommands (G4Cerenkov *CerenkovProcess)
 

Function Documentation

template<class T >
void UIhelpers::buildCommands ( T *  proc,
const char *  dir,
const char *  guidance 
)

Definition at line 157 of file G4OpticalPhysics.cc.

158  {
159  //Generic function to add a "verbose" command for a process
160  G4GenericMessenger* mess = new G4GenericMessenger(proc,dir,guidance);
162  G4GenericMessenger::Command& wlscmd4 = mess->DeclareMethod("verbose",&T::SetVerboseLevel,
163  "Set the verbose level");
164  wlscmd4.SetParameterName("ver",true);
165  wlscmd4.SetDefaultValue("1");
166  wlscmd4.SetStates(G4State_Idle);
167  }
This class is generic messenger.
Command & DeclareMethod(const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
Command & SetDefaultValue(const G4String &)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
Command & SetStates(G4ApplicationState s0)
Command & SetParameterName(const G4String &, G4bool, G4bool=false)

Here is the call graph for this function:

Here is the caller graph for this function:

void UIhelpers::buildCommands ( G4OpWLS op)

Definition at line 169 of file G4OpticalPhysics.cc.

170  {
171  //Build UI commands for WLS
172  G4GenericMessenger* mess = new G4GenericMessenger(op,DIR_CMDS"/wls/",GUIDANCE" for WLS process.");
174  //Here, more correctly DeclareProperty should be used, but to do that, I would need public/friend
175  //access of G4GenericMessenger to private members of G4Scintillation. Thus I use the approach
176  //of DeclareMethod, that has a draw back: range checking does not work
177  G4GenericMessenger::Command& wlscmd1 = mess->DeclareMethod("setTimeProfile",&G4OpWLS::UseTimeProfile,
178  "Set the WLS time profile (delta or exponential)");
179  wlscmd1.SetParameterName("profile",false);
180  wlscmd1.SetCandidates("delta exponential");
181  wlscmd1.SetStates(G4State_Idle);
182  buildCommands(op,DIR_CMDS"/wls/",GUIDANCE" for WLS process.");
183  }
This class is generic messenger.
Command & DeclareMethod(const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
#define DIR_CMDS
void UseTimeProfile(const G4String name)
Definition: G4OpWLS.cc:417
void Register(T *inst)
Definition: G4AutoDelete.hh:65
Command & SetStates(G4ApplicationState s0)
Command & SetCandidates(const G4String &)
void buildCommands(T *proc, const char *dir, const char *guidance)
Command & SetParameterName(const G4String &, G4bool, G4bool=false)
#define GUIDANCE

Here is the call graph for this function:

void UIhelpers::buildCommands ( G4Scintillation ScintillationProcess)

Definition at line 185 of file G4OpticalPhysics.cc.

186  {
187  //Build UI commands for scintillation
188  G4GenericMessenger* mess = new G4GenericMessenger(ScintillationProcess,DIR_CMDS"/scintillation/",GUIDANCE" for scintillation process.");
190  G4GenericMessenger::Command& sccmd1 = mess->DeclareMethod("setFiniteRiseTime",
192  "Set option of a finite rise-time for G4Scintillation - If set, the G4Scintillation process expects the user to have set the constant material property FAST/SLOWSCINTILLATIONRISETIME");
193  sccmd1.SetParameterName("time",false);
194  sccmd1.SetStates(G4State_Idle);
195 
196  G4GenericMessenger::Command& sccmd2 = mess->DeclareMethod("setYieldFactor",
198  "Set scintillation yield factor");
199  sccmd2.SetParameterName("factor",false);
200  //sccmd2.SetRange("factor>=0."); //LIMITATION: w/ DeclareMethod range checking does not work
201  sccmd2.SetStates(G4State_Idle);
202 
203  G4GenericMessenger::Command& sccmd3 = mess->DeclareMethod("setExcitationRatio",
205  "Set scintillation excitation ratio");
206  sccmd3.SetParameterName("ratio",false);
207  //sccmd3.SetRange("ratio>=0.&&ratio<=1.");//LIMITATION: w/ DeclareMethod range checking does not work
208  sccmd3.SetStates(G4State_Idle);
209 
210  G4GenericMessenger::Command& sccmd4 = mess->DeclareMethod("setByParticleType",
212  "Activate/Inactivate scintillation process by particle type");
213  sccmd4.SetParameterName("flag", false);
214  sccmd4.SetStates(G4State_Idle);
215 
216  G4GenericMessenger::Command& sccmd5 = mess->DeclareMethod("setTrackInfo",
218  "Activate/Inactivate scintillation track info");
219  sccmd5.SetParameterName("flag", false);
220  sccmd5.SetStates(G4State_Idle);
221 
222  G4GenericMessenger::Command& sccmd6 = mess->DeclareMethod("setTrackSecondariesFirst",
224  "Set option to track secondaries before finishing their parent track");
225  sccmd6.SetParameterName("flag",false);
226  sccmd6.SetStates(G4State_Idle);
227 
228  buildCommands(ScintillationProcess,DIR_CMDS"/scintillation/",GUIDANCE" for scintillation process.");
229  }
void SetScintillationByParticleType(const G4bool)
void SetScintillationTrackInfo(const G4bool trackType)
void SetFiniteRiseTime(const G4bool state)
This class is generic messenger.
Command & DeclareMethod(const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
#define DIR_CMDS
void SetScintillationYieldFactor(const G4double yieldfactor)
void Register(T *inst)
Definition: G4AutoDelete.hh:65
Command & SetStates(G4ApplicationState s0)
void SetScintillationExcitationRatio(const G4double ratio)
void SetTrackSecondariesFirst(const G4bool state)
void buildCommands(T *proc, const char *dir, const char *guidance)
Command & SetParameterName(const G4String &, G4bool, G4bool=false)
#define GUIDANCE

Here is the call graph for this function:

void UIhelpers::buildCommands ( G4Cerenkov CerenkovProcess)

Definition at line 231 of file G4OpticalPhysics.cc.

232  {
233  //BUild UI commands for cerenkov
234  G4GenericMessenger* mess = new G4GenericMessenger(CerenkovProcess,DIR_CMDS"/cerenkov/",GUIDANCE" for Cerenkov process.");
236  G4GenericMessenger::Command& cecmd1 = mess->DeclareMethod("setMaxPhotons",
238  "Set maximum number of photons per step");
239  cecmd1.SetParameterName("max",false);
240  //cecmd1.SetRange("max>=0");//LIMITATION: w/ DeclareMethod range checking does not work
241  cecmd1.SetStates(G4State_Idle);
242 
243  G4GenericMessenger::Command& cecmd2 = mess->DeclareMethod("setMaxBetaChange",
245  "Set maximum change of beta of parent particle per step");
246  cecmd2.SetParameterName("max",false);
247  //cecmd2.SetRange("max>=0.");//LIMITATION: w/ DeclareMethod range checking does not work
248  cecmd2.SetStates(G4State_Idle);
249 
250  G4GenericMessenger::Command& cecmd3 = mess->DeclareMethod("setTrackSecondariesFirst",
252  "Set option to track secondaries before finishing their parent track");
253  cecmd3.SetParameterName("flag",false);
254  cecmd3.SetStates(G4State_Idle);
255 
256  buildCommands(CerenkovProcess,DIR_CMDS"/cerenkov/",GUIDANCE" for Cerenkov process.");
257  }
void SetMaxBetaChangePerStep(const G4double d)
Definition: G4Cerenkov.cc:150
void SetTrackSecondariesFirst(const G4bool state)
Definition: G4Cerenkov.cc:145
This class is generic messenger.
Command & DeclareMethod(const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
#define DIR_CMDS
void Register(T *inst)
Definition: G4AutoDelete.hh:65
void SetMaxNumPhotonsPerStep(const G4int NumPhotons)
Definition: G4Cerenkov.cc:155
Command & SetStates(G4ApplicationState s0)
void buildCommands(T *proc, const char *dir, const char *guidance)
Command & SetParameterName(const G4String &, G4bool, G4bool=false)
#define GUIDANCE

Here is the call graph for this function: