23 static bool s_type_changed =
false;
32 return s_unit_type.tgeo_unit_type;
36 UnitType tmp = s_unit_type.tgeo_unit_type;
37 if ( !s_type_changed || new_type == s_unit_type.tgeo_unit_type ) {
38 s_unit_type.tgeo_unit_type = new_type;
39 s_type_changed =
true;
42 Fatal(
"TGeoUnit",
"The system of units may only be changed once at the beginning of the program!");
47 return s_unit_type.tgeant4_unit_type;
51 UnitType tmp = s_unit_type.tgeant4_unit_type;
52 if ( !s_type_changed || new_type == s_unit_type.tgeant4_unit_type ) {
53 s_unit_type.tgeant4_unit_type = new_type;
54 s_type_changed =
true;
57 Fatal(
"TGeoUnit",
"The system of units may only be changed once at the beginning of the program!");
void Fatal(const char *location, const char *msgfmt,...)
_unit_type(TGeoUnit::UnitType t)
TGeant4Unit::UnitType tgeant4_unit_type
TGeoUnit::UnitType tgeo_unit_type
UnitType unitType()
Access the currently set units type.
UnitType
System of units flavor. Must be kept in sync with TGeoUnits::UnitType.
UnitType setUnitType(UnitType new_type)
Set the currently used unit type (Only ONCE possible)
UnitType setUnitType(UnitType new_type)
Set the currently used unit type (Only ONCE possible)
UnitType unitType()
Access the currently set units type.