32 #ifndef G4CONVERSIONUTILS_HH
33 #define G4CONVERSIONUTILS_HH
40 namespace G4ConversionUtils
45 template <
typename Value>
49 input = input.
strip();
51 std::istringstream is(input);
54 return ((is >> output) && !is.get(tester));
62 input = input.
strip();
67 std::istringstream is(input);
70 if (!(is >> value >> unit) || is.get(tester))
return false;
81 input = input.
strip();
86 std::istringstream is(input);
89 if (!(is >> value1 >> value2 >> value3 >>unit) || is.get(tester))
return false;
99 input = input.
strip();
103 std::istringstream is(input);
106 if (!(is >> value1 >> value2 >> value3) || is.get(tester))
return false;
119 input = input.
strip();
121 std::istringstream is(input);
124 return ((is >> value1 >> value2) && (!is.get(tester)));
132 input = input.
strip();
137 std::istringstream is(input);
140 if (!(is >> valueMin >> unitsMin >> valueMax >> unitsMax) || is.get(tester))
return false;;
152 input = input.
strip();
154 G4double valueMinX, valueMinY, valueMinZ;
155 G4double valueMaxX, valueMaxY, valueMaxZ;
158 std::istringstream is(input);
161 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> unitMin >> valueMaxX >> valueMaxY >> valueMaxZ >> unitMax)
162 || is.get(tester))
return false;
174 input = input.
strip();
176 G4double valueMinX, valueMinY, valueMinZ;
177 G4double valueMaxX, valueMaxY, valueMaxZ;
179 std::istringstream is(input);
182 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> valueMaxX >> valueMaxY >> valueMaxZ)
183 || is.get(tester))
return false;
G4DimensionedType< G4double > G4DimensionedDouble
CLHEP::Hep3Vector G4ThreeVector
G4String strip(G4int strip_Type=trailing, char c=' ')
G4DimensionedType< G4ThreeVector > G4DimensionedThreeVector
const XML_Char int const XML_Char * value
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4bool Convert(const G4String &myInput, Value &output)