The IUnit class is used to facilitate input of unitful numbers from and to a persistent stream. More...
#include <UnitIO.h>
Public Member Functions | |
IUnit (T &t, const UT &u) | |
Constructor given an object to be read assuming the given unit. | |
IUnit (const IUnit< T, UT > &iu) | |
Copy constructor. | |
Public Attributes | |
T & | theX |
Reference to the object to be read. | |
const UT & | theUnit |
The unit assumed when reading the object. | |
The IUnit class is used to facilitate input of unitful numbers from and to a persistent stream.
An Energy can hence be read like this:
is >> iunit(x, GeV);
Also containers of unitful numbers may be read like this, as well as LorentzVector and ThreeVector.
|
inline |
|
inline |
const UT& ThePEG::IUnit< T, UT >::theUnit |
T& ThePEG::IUnit< T, UT >::theX |