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

OUnitErr is used to write out unitful numbers with an error estimate on a standard ostream. More...

#include <UnitIO.h>

List of all members.

Public Member Functions

 OUnitErr (const T &t, const T &dt, const UT &u)
 Constructor given an object to be written assuming the given unit.

Public Attributes

double x
 The number to be written.
double dx
 The estimated error of the number to be written.


Detailed Description

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

OUnitErr is used to write out unitful numbers with an error estimate on a standard ostream.

using the helper function ouniterr an energy e with an error estimate de can be written out as eg. cout << ouniterr(e, de, GeV);. The result will be presented in scientific format (with the exponent divisible by three) with the relevant number of significant digits with a single digit in parenthesis indicating the error in the least significant digit, eg. 1.23(2)e+03.

Definition at line 152 of file UnitIO.h.


Constructor & Destructor Documentation

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

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

Definition at line 156 of file UnitIO.h.


Member Data Documentation

template<typename T, typename UT>
double ThePEG::OUnitErr< T, UT >::x

The number to be written.

Definition at line 159 of file UnitIO.h.

template<typename T, typename UT>
double ThePEG::OUnitErr< T, UT >::dx

The estimated error of the number to be written.

Definition at line 162 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