RAIDA  1.9.0
Public Member Functions | List of all members
AIDA::IHistogram1D Class Referenceabstract

User level interface to 1D Histogram. More...

#include <IHistogram1D.h>

Inheritance diagram for AIDA::IHistogram1D:
AIDA::IHistogram AIDA::IBaseHistogram AIDA::IHistogram1DROOT

Public Member Functions

virtual ~IHistogram1D ()
 Destructor.
 
virtual bool fill (double x, double weight=1.)=0
 Fill the IHistogram1D with a value and the corresponding weight. More...
 
virtual double binMean (int index) const =0
 The weighted mean of a bin. More...
 
virtual int binEntries (int index) const =0
 Number of entries in the corresponding bin (ie the number of times fill was called for this bin). More...
 
virtual double binHeight (int index) const =0
 Total height of the corresponding bin (ie the sum of the weights in this bin). More...
 
virtual double binError (int index) const =0
 The error of a given bin. More...
 
virtual double mean () const =0
 The mean of the whole IHistogram1D. More...
 
virtual double rms () const =0
 The RMS of the whole IHistogram1D. More...
 
virtual const IAxisaxis () const =0
 Get the x axis of the IHistogram1D. More...
 
virtual int coordToIndex (double coord) const =0
 Get the bin number corresponding to a given coordinate along the x axis. More...
 
virtual bool add (const IHistogram1D &hist)=0
 Add to this IHistogram1D the contents of another IHistogram1D. More...
 
- Public Member Functions inherited from AIDA::IHistogram
virtual ~IHistogram ()
 Destructor.
 
virtual int allEntries () const =0
 Sum of the entries in all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More...
 
virtual int extraEntries () const =0
 Number of entries in the UNDERFLOW and OVERFLOW bins. More...
 
virtual double sumBinHeights () const =0
 Number of equivalent entries, i.e. More...
 
virtual double sumAllBinHeights () const =0
 Sum of the heights of all the IHistogram's bins, i.e in-range bins, UNDERFLOW and OVERFLOW. More...
 
virtual double sumExtraBinHeights () const =0
 Sum of heights in the UNDERFLOW and OVERFLOW bins. More...
 
virtual double minBinHeight () const =0
 Minimum height of the in-range bins, i.e. More...
 
virtual double maxBinHeight () const =0
 Maximum height of the in-range bins, i.e. More...
 
virtual bool scale (double scaleFactor)=0
 Scale the weights and the errors of all the IHistogram's bins (in-range and out-of-range ones) by a given scale factor. More...
 
- Public Member Functions inherited from AIDA::IBaseHistogram
virtual ~IBaseHistogram ()
 Destructor.
 
virtual std::string title () const =0
 Get the Histogram's title. More...
 
virtual bool setTitle (const std::string &title)=0
 Set the histogram title. More...
 
virtual int dimension () const =0
 Get the IAnnotation associated with the Histogram. More...
 
virtual bool reset ()=0
 Reset the Histogram; as if just created. More...
 
virtual int entries () const =0
 Get the number of in-range entries in the Histogram. More...
 

Detailed Description

User level interface to 1D Histogram.

Author
The AIDA team (http://aida.freehep.org/)

Member Function Documentation

virtual bool AIDA::IHistogram1D::add ( const IHistogram1D hist)
pure virtual

Add to this IHistogram1D the contents of another IHistogram1D.

Parameters
histThe IHistogram1D to be added to this IHistogram1D.
Returns
false If the IHistogram1Ds binnings are incompatible.

Implemented in AIDA::IHistogram1DROOT.

Referenced by AIDA::IHistogramFactoryROOT::add().

virtual const IAxis& AIDA::IHistogram1D::axis ( ) const
pure virtual
virtual int AIDA::IHistogram1D::binEntries ( int  index) const
pure virtual

Number of entries in the corresponding bin (ie the number of times fill was called for this bin).

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The number of entries in the corresponding bin.

Implemented in AIDA::IHistogram1DROOT.

virtual double AIDA::IHistogram1D::binError ( int  index) const
pure virtual

The error of a given bin.

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The error on the corresponding bin.

Implemented in AIDA::IHistogram1DROOT.

virtual double AIDA::IHistogram1D::binHeight ( int  index) const
pure virtual

Total height of the corresponding bin (ie the sum of the weights in this bin).

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The height of the corresponding bin.

Implemented in AIDA::IHistogram1DROOT.

virtual double AIDA::IHistogram1D::binMean ( int  index) const
pure virtual

The weighted mean of a bin.

Parameters
indexThe bin number (0...N-1) or OVERFLOW or UNDERFLOW.
Returns
The mean of the corresponding bin.

Implemented in AIDA::IHistogram1DROOT.

virtual int AIDA::IHistogram1D::coordToIndex ( double  coord) const
pure virtual

Get the bin number corresponding to a given coordinate along the x axis.

This is a convenience method, equivalent to axis().coordToIndex(coord).

See Also
IAxis::coordToIndex(double)
Parameters
coordThe coordinalte along the x axis.
Returns
The corresponding bin number.

Implemented in AIDA::IHistogram1DROOT.

virtual bool AIDA::IHistogram1D::fill ( double  x,
double  weight = 1. 
)
pure virtual

Fill the IHistogram1D with a value and the corresponding weight.

Parameters
xThe value to be filled in.
weightThe corresponding weight (by default 1).
Returns
false If the weight is <0 or >1 (?).

Implemented in AIDA::IHistogram1DROOT.

Referenced by AIDA::ICloud1DROOT::fill(), AIDA::ICloud1DROOT::fillHistogram(), and AIDA::ICloud1DROOT::myConvert().

virtual double AIDA::IHistogram1D::mean ( ) const
pure virtual

The mean of the whole IHistogram1D.

Returns
The mean of the IHistogram1D.

Implemented in AIDA::IHistogram1DROOT.

Referenced by AIDA::ICloud1DROOT::mean().

virtual double AIDA::IHistogram1D::rms ( ) const
pure virtual

The RMS of the whole IHistogram1D.

Returns
The RMS if the IHistogram1D.

Implemented in AIDA::IHistogram1DROOT.

Referenced by AIDA::ICloud1DROOT::rms().


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