190 #ifdef G4MULTITHREADED
193 ed<<
"G4GenericMessenger::Command::SetUnit() is thread-unsafe and should not be used\n"
194 <<
"in multi-threaded mode. For your command <"<<cmdpath<<
">, use\n"
195 <<
" DeclarePropertyWithUnit(const G4String& name, const G4String& defaultUnit,\n"
196 <<
" const G4AnyType& variable, const G4String& doc)\n"
198 <<
" DeclareMethodWithUnit(const G4String& name, const G4String& defaultUnit,\n"
199 <<
" const G4AnyType& variable, const G4String& doc)\n"
200 <<
"to define a command with a unit <"<<unit<<
">.";
201 if(spec!=
UnitDefault) { ed<<
"\nPlease use a default unit instead of unit category."; }
208 std::vector<G4String> guidance;
213 G4UIcommand tmp((cmdpath+
"_tmp").c_str(), messenger);
216 if (*
type ==
typeid(
float) || *
type ==
typeid(
double) ) {
230 G4cerr <<
"Only parameters of type <double> or <float> can be associated with units" <<
G4endl;
const G4String & GetRange() const
std::ostringstream G4ExceptionDescription
const std::type_info * type
G4String GetParameterName() const
void SetDefaultUnit(const char *defUnit)
void SetUnitCategory(const char *unitCategory)
void SetUnitCategory(const char *unitCategory)
const G4String & GetGuidanceLine(G4int i) const
G4bool IsOmittable() const
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
G4UIparameter * GetParameter(G4int i) const
const G4String & GetCommandPath() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetDefaultUnit(const char *defUnit)
G4UImessenger * GetMessenger() const
G4int GetGuidanceEntries() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4GLOB_DLL std::ostream G4cerr