31#ifndef G4CONVERSIONUTILS_HH
32#define G4CONVERSIONUTILS_HH
44 template <
typename Value>
49 std::istringstream is(input);
52 return ((is >> output) && !is.get(tester));
64 std::istringstream is(input);
67 if (!(is >> value >> unit) || is.get(tester))
return false;
82 std::istringstream is(input);
85 if (!(is >> value1 >> value2 >> value3 >>unit) || is.get(tester))
return false;
98 std::istringstream is(input);
101 if (!(is >> value1 >> value2 >> value3) || is.get(tester))
return false;
115 std::istringstream is(input);
118 return ((is >> value1 >> value2) && (!is.get(tester)));
130 std::istringstream is(input);
133 if (!(is >> valueMin >> unitsMin >> valueMax >> unitsMax) || is.get(tester))
return false;;
146 G4double valueMinX, valueMinY, valueMinZ;
147 G4double valueMaxX, valueMaxY, valueMaxZ;
150 std::istringstream is(input);
153 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> unitMin >> valueMaxX >> valueMaxY >> valueMaxZ >> unitMax)
154 || is.get(tester))
return false;
167 G4double valueMinX, valueMinY, valueMinZ;
168 G4double valueMaxX, valueMaxY, valueMaxZ;
170 std::istringstream is(input);
173 if (!(is >> valueMinX >> valueMinY >> valueMinZ >> valueMaxX >> valueMaxY >> valueMaxZ)
174 || is.get(tester))
return false;
G4DimensionedType< G4double > G4DimensionedDouble
G4DimensionedType< G4ThreeVector > G4DimensionedThreeVector
CLHEP::Hep3Vector G4ThreeVector
G4bool Convert(const G4String &myInput, Value &output)
G4String strip_copy(G4String str, char ch=' ')
Return copy of string with leading and trailing characters removed.