ThePEG::IUnit< T, UT > Struct Template Reference

The IUnit class is used to facilitate input of unitful numbers from and to a persistent stream. More...

#include <UnitIO.h>

List of all members.

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.


Detailed Description

template<typename T, typename UT>
struct ThePEG::IUnit< T, UT >

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.

See also:
PersistentOStream

PersistentIStream

Definition at line 70 of file UnitIO.h.


Constructor & Destructor Documentation

template<typename T, typename UT>
ThePEG::IUnit< T, UT >::IUnit ( T &  t,
const UT &  u 
) [inline]

Constructor given an object to be read assuming the given unit.

Definition at line 74 of file UnitIO.h.


Member Data Documentation

template<typename T, typename UT>
T& ThePEG::IUnit< T, UT >::theX

Reference to the object to be read.

Definition at line 80 of file UnitIO.h.

Referenced by ThePEG::operator>>().

template<typename T, typename UT>
const UT& ThePEG::IUnit< T, UT >::theUnit

The unit assumed when reading the object.

Definition at line 83 of file UnitIO.h.

Referenced by ThePEG::operator>>().


The documentation for this struct was generated from the following file:

Generated on Thu Apr 29 12:43:25 2010 for ThePEG by  doxygen 1.5.5