|
HighLAND
|
#include <UnitsParser.hxx>
Public Member Functions | |
| UnitsParser () | |
| std::string | Convert2DoubleWithUnit (std::string line) |
| void | PrintListOfUnits () |
| Prints all the defined units. | |
This class provides a method for converting a string like "1.5 cm" into a double with the appropriate unit. To do so it defines a set of units, using the same base units as in oaEvent/src/HEPUnits.hxx: ie mm, ns, MeV... Only a fairly limited set of units is defined.
Definition at line 15 of file UnitsParser.hxx.
| UnitsParser::UnitsParser | ( | ) |
Constructor that creates the list of units. Try not to call this too often.
Definition at line 8 of file UnitsParser.cxx.
| std::string UnitsParser::Convert2DoubleWithUnit | ( | std::string | line | ) |
Converts a string like "1.5 cm" into a double with the appropriate units.
Definition at line 159 of file UnitsParser.cxx.
1.8.13