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

An IAxis represents a binned histogram axis. More...

#include <IAxis.h>

Inheritance diagram for AIDA::IAxis:
AIDA::IAxisROOT

Public Types

enum  { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 }
 Constants specifying the underflow and the overflow bin. More...
 

Public Member Functions

virtual ~IAxis ()
 Destructor.
 
virtual bool isFixedBinning () const =0
 Check if the IAxis has fixed binning, i.e. More...
 
virtual double lowerEdge () const =0
 Get the lower edge of the IAxis. More...
 
virtual double upperEdge () const =0
 Get the upper edge of the IAxis. More...
 
virtual int bins () const =0
 The number of bins (excluding underflow and overflow) on the IAxis. More...
 
virtual double binLowerEdge (int index) const =0
 Get the lower edge of the specified bin. More...
 
virtual double binUpperEdge (int index) const =0
 Get the upper edge of the specified bin. More...
 
virtual double binWidth (int index) const =0
 Get the width of the specified bin. More...
 
virtual int coordToIndex (double coord) const =0
 Convert a coordinate on the axis to a bin number. More...
 

Detailed Description

An IAxis represents a binned histogram axis.

A 1D Histogram would have one Axis representing the X axis, while a 2D Histogram would have two axes representing the X and Y Axis.

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

Member Enumeration Documentation

anonymous enum

Constants specifying the underflow and the overflow bin.

They can be passed to any method accepting a bin number.

Member Function Documentation

virtual double AIDA::IAxis::binLowerEdge ( int  index) const
pure virtual

Get the lower edge of the specified bin.

Parameters
indexThe bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW.
Returns
The lower edge of the corresponding bin; for the underflow bin this is Double.NEGATIVE_INFINITY.

Implemented in AIDA::IAxisROOT.

Referenced by AIDA::IHistogram1DROOT::printContents(), AIDA::IHistogram2DROOT::printContents(), and AIDA::IHistogram3DROOT::printContents().

virtual int AIDA::IAxis::bins ( ) const
pure virtual
virtual double AIDA::IAxis::binUpperEdge ( int  index) const
pure virtual

Get the upper edge of the specified bin.

Parameters
indexThe bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW.
Returns
The upper edge of the corresponding bin; for the overflow bin this is Double.POSITIVE_INFINITY.

Implemented in AIDA::IAxisROOT.

virtual double AIDA::IAxis::binWidth ( int  index) const
pure virtual

Get the width of the specified bin.

Parameters
indexThe bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW.
Returns
The width of the corresponding bin.

Implemented in AIDA::IAxisROOT.

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

Convert a coordinate on the axis to a bin number.

If the coordinate is less than the lowerEdge UNDERFLOW is returned; if the coordinate is greater or equal to the upperEdge OVERFLOW is returned.

Parameters
coordThe coordinate to be converted.
Returns
The corresponding bin number.

Implemented in AIDA::IAxisROOT.

virtual bool AIDA::IAxis::isFixedBinning ( ) const
pure virtual

Check if the IAxis has fixed binning, i.e.

if all the bins have the same width.

Returns
true if the binning is fixed, false otherwise.

Implemented in AIDA::IAxisROOT.

virtual double AIDA::IAxis::lowerEdge ( ) const
pure virtual
virtual double AIDA::IAxis::upperEdge ( ) const
pure virtual

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