CLHEP/HepPDT/Measurement.hh

00001 // $Id: Measurement.hh,v 1.2 2002/04/12 15:02:43 evc Exp $
00002 // ----------------------------------------------------------------------
00003 //
00004 // Measurement.hh
00005 // author:  Mark Fischler
00006 // ----------------------------------------------------------------------
00007 #ifndef MEASUREMENT_HH
00008 #define MEASUREMENT_HH
00009 
00010 #include "CLHEP/config/CLHEP.h"
00011 
00012 namespace HepPDT {
00013 
00018 class Measurement {
00019 public:
00020   inline Measurement ();  
00021   inline Measurement ( double value, double sigma );
00022 
00023   inline Measurement ( const Measurement &m );
00024   inline void swap( Measurement & other );
00025   inline Measurement& operator = ( Measurement const & rhs );
00026 
00027   inline bool  operator <  ( Measurement const & other ) const;
00028   inline bool  operator == ( Measurement const & other ) const;
00029 
00030   inline double   value()  const;
00031   inline double   sigma()  const;
00032   inline operator double() const;
00033 
00034 private:  
00035   double val;
00036   double sig;
00037 
00038 };      // Measurement
00039 
00040 inline
00041 void swap( Measurement & first, Measurement & second ) { first.swap( second ); }
00042 
00043 }      // end of namespace HepPDT
00044 
00045 #include "CLHEP/HepPDT/Measurement.icc"
00046 
00047 #endif // end of codeguard MEASUREMENT_HH

Class Library for High Energy Physics (version 1.8)