RAIDA  1.9.0
Public Types | Public Member Functions | Protected Attributes | List of all members
AIDA::IAxisROOT Class Reference

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

#include <IAxisROOT.h>

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

Public Types

enum  { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 }
 Constants specifying the underflow and the overflow bin. More...
 
- Public Types inherited from AIDA::IAxis
enum  { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 }
 Constants specifying the underflow and the overflow bin. More...
 

Public Member Functions

virtual ~IAxisROOT ()
 Destructor.
 
 IAxisROOT (TAxis *axis)
 Constructor: you need to have a pointer to a ROOT TAxis object to construct!
 
void setFixedBinning ()
 
void setVariableBinning ()
 
virtual bool isFixedBinning () const
 Check if the IAxis has fixed binning, i.e. More...
 
virtual double lowerEdge () const
 Get the lower edge of the IAxis. More...
 
virtual double upperEdge () const
 Get the upper edge of the IAxis. More...
 
virtual int bins () const
 The number of bins (excluding underflow and overflow) on the IAxis. More...
 
virtual double binLowerEdge (int index) const
 Get the lower edge of the specified bin. More...
 
virtual double binUpperEdge (int index) const
 Get the upper edge of the specified bin. More...
 
virtual double binWidth (int index) const
 Get the width of the specified bin. More...
 
virtual int coordToIndex (double coord) const
 Convert a coordinate on the axis to a bin number. More...
 
- Public Member Functions inherited from AIDA::IAxis
virtual ~IAxis ()
 Destructor.
 

Protected Attributes

TAxis * _axis
 
bool _fixedBinning
 

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
T. Kraemer, DESY
Version
Id:
IAxisROOT.h,v 1.3 2006-12-04 17:24:06 tkraemer Exp

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

double IAxisROOT::binLowerEdge ( int  index) const
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.

Implements AIDA::IAxis.

References bins().

int IAxisROOT::bins ( ) const
virtual

The number of bins (excluding underflow and overflow) on the IAxis.

Returns
The IAxis's number of bins.

Implements AIDA::IAxis.

Referenced by binLowerEdge(), and binUpperEdge().

double IAxisROOT::binUpperEdge ( int  index) const
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.

Implements AIDA::IAxis.

References bins().

double IAxisROOT::binWidth ( int  index) const
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.

Implements AIDA::IAxis.

int IAxisROOT::coordToIndex ( double  coord) const
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.

Implements AIDA::IAxis.

bool IAxisROOT::isFixedBinning ( ) const
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.

Implements AIDA::IAxis.

double IAxisROOT::lowerEdge ( ) const
virtual

Get the lower edge of the IAxis.

Returns
The IAxis's lower edge.

Implements AIDA::IAxis.

double IAxisROOT::upperEdge ( ) const
virtual

Get the upper edge of the IAxis.

Returns
The IAxis's upper edge.

Implements AIDA::IAxis.


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