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

The OUnit< class is used to facilitate output of unitful numbers to a persistent stream. More...

#include <UnitIO.h>

List of all members.

Public Member Functions

 OUnit (const T &t, const UT &u)
 Constructor given an object to be written assuming the given unit.
 OUnit (const OUnit< T, UT > &iu)
 Copy constructor.

Public Attributes

const T & theX
 Reference to the object to be written.
const UT & theUnit
 The unit assumed when writing the object.


Detailed Description

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

The OUnit< class is used to facilitate output of unitful numbers to a persistent stream.

An Energy can hence be written like this:
os << ounit(x, GeV);
Also containers of unitful numbers may be written like this, as well as LorentzVector and ThreeVector.

See also:
PersistentOStream

PersistentIStream

Definition at line 42 of file UnitIO.h.


Constructor & Destructor Documentation

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

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

Definition at line 46 of file UnitIO.h.


Member Data Documentation

template<typename T, typename UT>
const T& ThePEG::OUnit< T, UT >::theX

Reference to the object to be written.

Definition at line 52 of file UnitIO.h.

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

The unit assumed when writing the object.

Definition at line 55 of file UnitIO.h.


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