12.07.2015 Views

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

Geant4 User's Guide for Application Developers - Geant4 - CERN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Communication and Control• G4UIcmdWithAString(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 string parameter and set the omittable flag. If omittable is true, you should define thedefault 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 separatedby a single space. If this candidate list is given, a string given by the user but which is not listed in this listwill be rejected.G4UIcmdWith3VectorThis 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, youshould 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 aG4ThreeVector.• G4String convertToString(G4ThreeVector currVal)Convert the current three vector to G4String, which should be returned by the GetCurrentValue() methodof your messenger.G4UIcmdWithADoubleAndUnitThis 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 thedefault 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.208

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!