48 untParam->SetParameterName(
"Unit");
56 std::vector<G4String> token_vector;
59 while (!(str = tkn()).empty()) {
60 token_vector.push_back(str);
66 if (!default_unit.empty() && token_vector.size() >= 2) {
75 converted_parameter +=
" ";
76 converted_parameter += default_unit;
77 for (std::size_t i = 2; i < token_vector.size(); ++i) {
78 converted_parameter +=
" ";
79 converted_parameter += token_vector[i];
83 converted_parameter = parameterList;
101 std::istringstream is(paramString);
113 std::istringstream is(paramString);
126 G4String aToken = candidateTokenizer();
127 std::ostringstream os;
@ fParameterOutOfCandidates
void SetDefaultValue(G4double defVal)
void SetUnitCandidates(const char *candidateList)
G4String ConvertToStringWithDefaultUnit(G4double val)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewUnitValue(const char *paramString)
void SetDefaultUnit(const char *defUnit)
static G4double GetNewDoubleValue(const char *paramString)
G4UIcmdWithADoubleAndUnit(const char *theCommandPath, G4UImessenger *theMessenger)
static G4double GetNewDoubleRawValue(const char *paramString)
G4int DoIt(G4String parameterList) override
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4String ConvertToStringWithBestUnit(G4double val)
G4UIparameter * GetParameter(G4int i) const
static G4String CategoryOf(const char *unitName)
static G4double ValueOf(const char *unitName)
void SetCommandType(CommandType)
virtual G4int DoIt(G4String parameterList)
static G4String ConvertToString(G4bool boolVal)
void SetParameter(G4UIparameter *const newParameter)
static G4String UnitsList(const char *unitCategory)
static G4double ConvertToDouble(const char *st)
static G4double ConvertToDimensionedDouble(const char *st)
const G4String & GetParameterCandidates() const
void SetDefaultValue(const char *theDefaultValue)
void SetParameterName(const char *pName)
G4bool IsOmittable() const
void SetOmittable(G4bool om)
void SetParameterCandidates(const char *theString)
void SetCurrentAsDefault(G4bool val)
const G4String & GetDefaultValue() const