Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GenHisto1D Class Template Reference

#include <GenHisto1D.h>

Inheritance diagram for GenHisto1D:

IHistogram1D DataObject H1D H1DVar List of all members.

Public Methods

virtual std::string title () const
 ========================================================================== From the IHistogram interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Title of the histogram (temporary functions, as the title will be part od the annotation, and there will be general accessors for any pair stored there). More...

virtual void setTitle ( std::string value )
virtual int dimensions () const
 Number of dimensions (1 for 1D histogram, 2 for 2D histogram, etc.). More...

virtual void reset ()
 Reset contents. More...

virtual int entries () const
 -------------------------------------------------------------------------- Total number of entries in the whole histogram (number of fills) -------------------------------------------------------------------------- Number of in-range entries in the whole histogram. More...

virtual int allEntries () const
 Number of all entries in all (both in-range and extra) bins in the whole histogram. More...

virtual int extraEntries () const
 Number of extra entries in the whole histogram. More...

virtual double equivalentBinEntries () const
 Number of equivalent entries SUM[ weight ] ^ 2 / SUM[ weight^2 ]. More...

virtual double sumBinHeights () const
 -------------------------------------------------------------------------- Sums of bin heights (height respects weights of entries) -------------------------------------------------------------------------- Sum of in-range bin heights in the whole histogram. More...

virtual double sumAllBinHeights () const
 Sum of all (both in-range and extra) bin heights in the whole histogram. More...

virtual double sumExtraBinHeights () const
 Sum of extra bin heights in the whole histogram. More...

virtual void fill ( double x, double weight = 1 )
 ========================================================================== From the IHistogram1D interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Fill histogram. More...

virtual int binEntries ( int index ) const
 -------------------------------------------------------------------------- Entries The index accepts UNDERFLOW_BIN, values from 0 to N-1, or OVERFLOW_BIN -------------------------------------------------------------------------- Number of entries in a specific in-range bin (number of fills). More...

virtual double binHeight ( int index ) const
 Height of a specific in-range bin (height respects weights of entries). More...

virtual double binError ( int index ) const
 Bin contents error. More...

virtual double mean () const
 -------------------------------------------------------------------------- Statistics -------------------------------------------------------------------------- mean() returns the mean of the whole histogram as calculated on filling-time. More...

virtual double rms () const
 rms() returns the rms of the whole histogram as calculated on filling-time. More...

virtual double minBinHeight () const
 -------------------------------------------------------------------------- Minimum and maximum heights and bins -------------------------------------------------------------------------- Min height of in-range bins in the whole histogram. More...

virtual int minBin () const
 Index of the in-range bin containing the minBinHeight(). More...

virtual double maxBinHeight () const
 Max height of in-range bins in the whole histogram. More...

virtual int maxBin () const
 Index of the in-range bin containing the maxBinHeight(). More...

virtual IAxisxAxis () const
 -------------------------------------------------------------------------- Axis -------------------------------------------------------------------------- Get the X axis. More...

virtual int coordToIndex ( double coord ) const
 -------------------------------------------------------------------------- Conversions between coordinates and bin indices -------------------------------------------------------------------------- Equivalent to xAxis().coordToIndex( coord );. More...

virtual std::ostream& print ( std::ostream& s ) const
 Print (ASCII) the histogram into the output stream. More...

virtual std::ostream& write ( std::ostream& s ) const
 -------------------------------------------------------------------------- Print functions (ASCII table containing numbers e.g. bin height) Write (ASCII) the histogram table into the output stream. More...

virtual int write ( const char* file_name ) const
 Write (ASCII) the histogram table into a file. More...


Protected Methods

 GenHisto1D ( const std::string& title, const std::string& histoID, int nBinsX, double lowX, double highX, End_Point_Convention )
 -------------------------------------------------------------------------- Constructors for 1D histogram with fixed binning --------------------------------------------------------------------------. More...

 GenHisto1D ( const std::string& title, int histoID, int nBinsX, double lowX, double highX, End_Point_Convention )
 GenHisto1D ( const std::string& title, const std::string& histoID, std::vector<double> edges, End_Point_Convention )
 -------------------------------------------------------------------------- Constructors for 1D histogram with variable binning --------------------------------------------------------------------------. More...

 GenHisto1D ( const std::string& title, int histoID, std::vector<double> edges, End_Point_Convention )
 GenHisto1D ( const std::string& title, Histo1D& h, int nBinsX, double lowX, double highX, End_Point_Convention )
 -------------------------------------------------------------------------- Copy constructors for 1D histogram (const and non-const) --------------------------------------------------------------------------. More...

 GenHisto1D ( const std::string& title, Histo1DVar& h, std::vector<double>& edges, End_Point_Convention )
virtual ~GenHisto1D ()
 -------------------------------------------------------------------------- Destructor --------------------------------------------------------------------------. More...

virtual int checkIndex ( int index ) const
 -------------------------------------------------------------------------- Checks validity of the index -------------------------------------------------------------------------- Checks validity of the index, assuming bin indices from "0" to "number of bins - 1". More...


Protected Attributes

TYPE* m_histogram
 -------------------------------------------------------------------------- Data members -------------------------------------------------------------------------- Concrete histogram. More...

Axism_xAxis
 X axis. More...


Constructor & Destructor Documentation

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
const std::string & histoID,
int nBinsX,
double lowX,
double highX,
End_Point_Convention ) [inline, protected]
 

-------------------------------------------------------------------------- Constructors for 1D histogram with fixed binning --------------------------------------------------------------------------.

Definition at line 57 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
int histoID,
int nBinsX,
double lowX,
double highX,
End_Point_Convention ) [inline, protected]
 

Definition at line 74 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
const std::string & histoID,
std::vector< double > edges,
End_Point_Convention ) [inline, protected]
 

-------------------------------------------------------------------------- Constructors for 1D histogram with variable binning --------------------------------------------------------------------------.

Definition at line 98 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
int histoID,
std::vector< double > edges,
End_Point_Convention ) [inline, protected]
 

Definition at line 112 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
Histo1D & h,
int nBinsX,
double lowX,
double highX,
End_Point_Convention ) [inline, protected]
 

-------------------------------------------------------------------------- Copy constructors for 1D histogram (const and non-const) --------------------------------------------------------------------------.

Definition at line 133 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::GenHisto1D<TYPE> ( const std::string & title,
Histo1DVar & h,
std::vector< double >& edges,
End_Point_Convention ) [inline, protected]
 

Definition at line 148 of file GenHisto1D.h.

template<classTYPE>
GenHisto1D<TYPE>::~GenHisto1D<TYPE> ( ) [inline, protected, virtual]
 

-------------------------------------------------------------------------- Destructor --------------------------------------------------------------------------.

Definition at line 165 of file GenHisto1D.h.


Member Function Documentation

template<classTYPE>
int GenHisto1D<TYPE>::allEntries ( ) const [inline, virtual]
 

Number of all entries in all (both in-range and extra) bins in the whole histogram.

Definition at line 218 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::binEntries ( int index ) const [inline, virtual]
 

-------------------------------------------------------------------------- Entries The index accepts UNDERFLOW_BIN, values from 0 to N-1, or OVERFLOW_BIN -------------------------------------------------------------------------- Number of entries in a specific in-range bin (number of fills).

Definition at line 275 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::binError ( int index ) const [inline, virtual]
 

Bin contents error.

Definition at line 301 of file GenHisto1D.h.

Referenced by write().

template<classTYPE>
double GenHisto1D<TYPE>::binHeight ( int index ) const [inline, virtual]
 

Height of a specific in-range bin (height respects weights of entries).

Definition at line 288 of file GenHisto1D.h.

Referenced by sumExtraBinHeights(), and write().

template<classTYPE>
int GenHisto1D<TYPE>::checkIndex ( int index ) const [inline, protected, virtual]
 

-------------------------------------------------------------------------- Checks validity of the index -------------------------------------------------------------------------- Checks validity of the index, assuming bin indices from "0" to "number of bins - 1".

Definition at line 433 of file GenHisto1D.h.

Referenced by binEntries(), binError(), and binHeight().

template<classTYPE>
int GenHisto1D<TYPE>::coordToIndex ( double coord ) const [inline, virtual]
 

-------------------------------------------------------------------------- Conversions between coordinates and bin indices -------------------------------------------------------------------------- Equivalent to xAxis().coordToIndex( coord );.

Definition at line 383 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::dimensions ( ) const [inline, virtual]
 

Number of dimensions (1 for 1D histogram, 2 for 2D histogram, etc.).

Definition at line 197 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::entries ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Total number of entries in the whole histogram (number of fills) -------------------------------------------------------------------------- Number of in-range entries in the whole histogram.

Definition at line 212 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::equivalentBinEntries ( ) const [inline, virtual]
 

Number of equivalent entries SUM[ weight ] ^ 2 / SUM[ weight^2 ].

Definition at line 229 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::extraEntries ( ) const [inline, virtual]
 

Number of extra entries in the whole histogram.

Definition at line 223 of file GenHisto1D.h.

template<classTYPE>
void GenHisto1D<TYPE>::fill ( double x,
double weight = 1 ) [inline, virtual]
 

========================================================================== From the IHistogram1D interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Fill histogram.

Definition at line 264 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::maxBin ( ) const [inline, virtual]
 

Index of the in-range bin containing the maxBinHeight().

Definition at line 356 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::maxBinHeight ( ) const [inline, virtual]
 

Max height of in-range bins in the whole histogram.

Definition at line 352 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::mean ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Statistics -------------------------------------------------------------------------- mean() returns the mean of the whole histogram as calculated on filling-time.

Definition at line 320 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::minBin ( ) const [inline, virtual]
 

Index of the in-range bin containing the minBinHeight().

Definition at line 340 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::minBinHeight ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Minimum and maximum heights and bins -------------------------------------------------------------------------- Min height of in-range bins in the whole histogram.

Definition at line 336 of file GenHisto1D.h.

template<classTYPE>
std::ostream & GenHisto1D<TYPE>::print ( std::ostream & s ) const [inline, virtual]
 

Print (ASCII) the histogram into the output stream.

Definition at line 396 of file GenHisto1D.h.

Referenced by HistogramSvc::print().

template<classTYPE>
void GenHisto1D<TYPE>::reset ( ) [inline, virtual]
 

Reset contents.

Definition at line 202 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::rms ( ) const [inline, virtual]
 

rms() returns the rms of the whole histogram as calculated on filling-time.

Definition at line 326 of file GenHisto1D.h.

template<classTYPE>
void GenHisto1D<TYPE>::setTitle ( std::string value ) [inline, virtual]
 

Definition at line 189 of file GenHisto1D.h.

Referenced by GenHisto1D().

template<classTYPE>
double GenHisto1D<TYPE>::sumAllBinHeights ( ) const [inline, virtual]
 

Sum of all (both in-range and extra) bin heights in the whole histogram.

Definition at line 244 of file GenHisto1D.h.

template<classTYPE>
double GenHisto1D<TYPE>::sumBinHeights ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Sums of bin heights (height respects weights of entries) -------------------------------------------------------------------------- Sum of in-range bin heights in the whole histogram.

Definition at line 239 of file GenHisto1D.h.

Referenced by sumAllBinHeights().

template<classTYPE>
double GenHisto1D<TYPE>::sumExtraBinHeights ( ) const [inline, virtual]
 

Sum of extra bin heights in the whole histogram.

Definition at line 249 of file GenHisto1D.h.

Referenced by sumAllBinHeights().

template<classTYPE>
std::string GenHisto1D<TYPE>::title ( ) const [inline, virtual]
 

========================================================================== From the IHistogram interface ========================================================================== -------------------------------------------------------------------------- Histogram characteristics -------------------------------------------------------------------------- Title of the histogram (temporary functions, as the title will be part od the annotation, and there will be general accessors for any pair stored there).

Definition at line 186 of file GenHisto1D.h.

template<classTYPE>
int GenHisto1D<TYPE>::write ( const char * file_name ) const [inline, virtual]
 

Write (ASCII) the histogram table into a file.

Definition at line 418 of file GenHisto1D.h.

template<classTYPE>
std::ostream & GenHisto1D<TYPE>::write ( std::ostream & s ) const [inline, virtual]
 

-------------------------------------------------------------------------- Print functions (ASCII table containing numbers e.g. bin height) Write (ASCII) the histogram table into the output stream.

Definition at line 406 of file GenHisto1D.h.

Referenced by HistogramSvc::write().

template<classTYPE>
IAxis * GenHisto1D<TYPE>::xAxis ( ) const [inline, virtual]
 

-------------------------------------------------------------------------- Axis -------------------------------------------------------------------------- Get the X axis.

Definition at line 373 of file GenHisto1D.h.

Referenced by coordToIndex().


Member Data Documentation

template<classTYPE>
TYPE * GenHisto1D<TYPE>::m_histogram [protected]
 

-------------------------------------------------------------------------- Data members -------------------------------------------------------------------------- Concrete histogram.

Definition at line 443 of file GenHisto1D.h.

template<classTYPE>
Axis * GenHisto1D<TYPE>::m_xAxis [protected]
 

X axis.

Definition at line 446 of file GenHisto1D.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 12:22:33 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000