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

Axis Class Reference

#include <Axis.h>

Inheritance diagram for Axis:

IAxis List of all members.

Public Methods

 Axis ( I_Histo* h, int axisNumber, int nBins, double low, double high )
 Constructors. More...

 Axis ( I_Histo* h, int axisNumber, const std::vector<double>& edges )
virtual ~Axis ()
virtual const std::vector<
double>& 
edges () const
 ========================================================================== Axis edges ========================================================================== All axis edge at once. More...

virtual double lowerEdge () const
 Lower axis edge. More...

virtual double upperEdge () const
 Upper axis edge. More...

virtual int bins () const
 ========================================================================== Bins ========================================================================== -------------------------------------------------------------------------- Number of bins Number of in-range bins in the axis. More...

virtual double binLowerEdge ( int index ) const
 -------------------------------------------------------------------------- Bin edges Lower edge of the in-range bin identified by index. More...

virtual double binUpperEdge ( int index ) const
 Upper edge of the in-range bin identified by index. More...

virtual double binWidth ( int index ) const
 -------------------------------------------------------------------------- Bin widths Width of the in-range bin identified by index. More...

virtual double binCentre ( int index ) const
 -------------------------------------------------------------------------- Bin centre Centre of the bin located by index. More...

virtual int coordToIndex ( double coord ) const
 ========================================================================== Conversions between coordinates and bin indices ========================================================================== Equivalent to coordToIndex( coord ); for 1D histogram or coordToIndexX( coordX ); or coordToIndexY( coordY ); for 2D histogram. 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 Methods

void setEdgesAndBins ( const std::vector<double>& value )
 ========================================================================== Set accessors to the internal data members ========================================================================== Set edges. More...

void setEdgesAndBins ( int nBins, double low, double high )
 Set edges. More...


Protected Attributes

int m_bins
 Number of bins. More...

std::vector<double> m_edges
 Edges. More...

I_Histo* m_histogram
 Histogram this axis is associated with. More...

int m_axisNumber
 Axis number (0 means X axis, 1 means Y axis). More...


Constructor & Destructor Documentation

Axis::Axis ( I_Histo * h,
int axisNumber,
int nBins,
double low,
double high ) [inline]
 

Constructors.

Definition at line 34 of file Axis.h.

Axis::Axis ( I_Histo * h,
int axisNumber,
const std::vector< double >& edges ) [inline]
 

Definition at line 40 of file Axis.h.

Axis::~Axis ( ) [inline, virtual]
 

Definition at line 46 of file Axis.h.


Member Function Documentation

double Axis::binCentre ( int index ) const [inline, virtual]
 

-------------------------------------------------------------------------- Bin centre Centre of the bin located by index.

Definition at line 123 of file Axis.h.

Referenced by GenHisto2D::write().

double Axis::binLowerEdge ( int index ) const [inline, virtual]
 

-------------------------------------------------------------------------- Bin edges Lower edge of the in-range bin identified by index.

Definition at line 83 of file Axis.h.

double Axis::binUpperEdge ( int index ) const [inline, virtual]
 

Upper edge of the in-range bin identified by index.

Definition at line 97 of file Axis.h.

Referenced by coordToIndex().

double Axis::binWidth ( int index ) const [inline, virtual]
 

-------------------------------------------------------------------------- Bin widths Width of the in-range bin identified by index.

Definition at line 114 of file Axis.h.

int Axis::bins ( ) const [inline, virtual]
 

========================================================================== Bins ========================================================================== -------------------------------------------------------------------------- Number of bins Number of in-range bins in the axis.

Definition at line 75 of file Axis.h.

Referenced by coordToIndex().

int Axis::checkIndex ( int index ) const [inline, virtual]
 

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

Definition at line 187 of file Axis.h.

Referenced by binCentre(), binLowerEdge(), binUpperEdge(), binWidth(), GenHisto1D::checkIndex(), GenHisto2D::checkIndexX(), and GenHisto2D::checkIndexY().

int Axis::coordToIndex ( double coord ) const [inline, virtual]
 

========================================================================== Conversions between coordinates and bin indices ========================================================================== Equivalent to coordToIndex( coord ); for 1D histogram or coordToIndexX( coordX ); or coordToIndexY( coordY ); for 2D histogram.

Definition at line 155 of file Axis.h.

const std::vector< double >& Axis::edges ( ) const [inline, virtual]
 

========================================================================== Axis edges ========================================================================== All axis edge at once.

Definition at line 53 of file Axis.h.

double Axis::lowerEdge ( ) const [inline, virtual]
 

Lower axis edge.

Definition at line 58 of file Axis.h.

Referenced by coordToIndex().

void Axis::setEdgesAndBins ( int nBins,
double low,
double high ) [inline, protected]
 

Set edges.

Definition at line 211 of file Axis.h.

void Axis::setEdgesAndBins ( const std::vector< double >& value ) [inline, protected]
 

========================================================================== Set accessors to the internal data members ========================================================================== Set edges.

Definition at line 206 of file Axis.h.

Referenced by Axis().

double Axis::upperEdge ( ) const [inline, virtual]
 

Upper axis edge.

Definition at line 62 of file Axis.h.

Referenced by coordToIndex().


Member Data Documentation

int Axis::m_axisNumber [protected]
 

Axis number (0 means X axis, 1 means Y axis).

Definition at line 234 of file Axis.h.

int Axis::m_bins [protected]
 

Number of bins.

Definition at line 225 of file Axis.h.

std::vector< double > Axis::m_edges [protected]
 

Edges.

Definition at line 228 of file Axis.h.

I_Histo * Axis::m_histogram [protected]
 

Histogram this axis is associated with.

Definition at line 231 of file Axis.h.


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