Download Geant4 User's Guide for Application Developers
Transcript
Communication and Control Constructor. Arguments are the (full-path) command name and the pointer to your messenger. • void SetParameterName(char* paramName, G4bool omittable) Define the name of the string parameter and set the omittable flag. If omittable is true, you should define the default value using the next method. • void SetDefaultValue(char* defVal) Define the default value of the string parameter. • void SetCandidates(char* candidateList) Define a candidate list which can be taken by the parameter. Each candidate listed in this list should be separated by a single space. If this candidate list is given, a string given by the user but which is not listed in this list will be rejected. G4UIcmdWith3Vector This is a G4UIcommand derived class which takes one three vector parameter. • G4UIcmdWith3Vector(char* commandpath, G4UImanager* theMessenger) Constructor. Arguments are the (full-path) command name and the pointer to your messenger. • void SetParameterName(char* paramNamX, char* paramNamY, char* paramNamZ, G4bool omittable) Define the names of each component of the three vector and set the omittable flag. If omittable is true, you should define the default value using the next method. • void SetDefaultValue(G4ThreeVector defVal) Define the default value of the three vector. • G4ThreeVector GetNew3VectorValue(G4String paramString) Convert the G4String parameter value given by the SetNewValue() method of your messenger into a G4ThreeVector. • G4String convertToString(G4ThreeVector currVal) Convert the current three vector to G4String, which should be returned by the GetCurrentValue() method of your messenger. G4UIcmdWithADoubleAndUnit This is a G4UIcommand derived class which takes one double type parameter and its unit. • G4UIcmdWithADoubleAndUnit(char* commandpath, G4UImanager* theMessenger) Constructor. Arguments are the (full-path) command name and the pointer to your messenger. • void SetParameterName(char* paramName, G4bool omittable) Define the name of the double parameter and set the omittable flag. If omittable is true, you should define the default value using the next method. • void SetDefaultValue(G4double defVal) Define the default value of the double parameter. • void SetUnitCategory(char* unitCategory) Define acceptable unit category. • void SetDefaultUnit(char* defUnit) Define the default unit. Please use this method and the SetUnitCategory() method alternatively. • G4double GetNewDoubleValue(G4String paramString) 218