RAIDA  1.9.0
IAxisROOT.h
1 // -*- C++ -*-
2 #ifndef AIDA_IAXISROOT_H
3 #define AIDA_IAXISROOT_H 1
4 
5 #include <AIDA/IAxis.h>
6 #include <TAxis.h>
7 
8 namespace AIDA {
9 
19 class IAxisROOT : public IAxis {
20 
21 public:
23  virtual ~IAxisROOT() { /* nop */; }
24 
26  IAxisROOT(TAxis* axis);
27  void setFixedBinning() ;
28  void setVariableBinning() ;
29 
35  virtual bool isFixedBinning() const ;
36 
42  virtual double lowerEdge() const ;
43 
49  virtual double upperEdge() const ;
50 
56  virtual int bins() const ;
57 
64  virtual double binLowerEdge(int index) const ;
65 
72  virtual double binUpperEdge(int index) const ;
73 
80  virtual double binWidth(int index) const ;
81 
90  virtual int coordToIndex(double coord) const ;
91 
97  enum { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 };
98 
99 protected:
100 
101  TAxis *_axis;
102  bool _fixedBinning;
103 
104 }; // class
105 } // namespace AIDA
106 #endif /* ifndef AIDA_IAXISROOT_H */
virtual double binWidth(int index) const
Get the width of the specified bin.
Definition: IAxisROOT.cc:66
An IAxis represents a binned histogram axis.
Definition: IAxisROOT.h:19
virtual double binUpperEdge(int index) const
Get the upper edge of the specified bin.
Definition: IAxisROOT.cc:56
virtual double binLowerEdge(int index) const
Get the lower edge of the specified bin.
Definition: IAxisROOT.cc:46
virtual ~IAxisROOT()
Destructor.
Definition: IAxisROOT.h:23
virtual int coordToIndex(double coord) const
Convert a coordinate on the axis to a bin number.
Definition: IAxisROOT.cc:74
An IAxis represents a binned histogram axis.
Definition: IAxis.h:26
IAxisROOT(TAxis *axis)
Constructor: you need to have a pointer to a ROOT TAxis object to construct!
Definition: IAxisROOT.cc:10
virtual bool isFixedBinning() const
Check if the IAxis has fixed binning, i.e.
Definition: IAxisROOT.cc:26
virtual double lowerEdge() const
Get the lower edge of the IAxis.
Definition: IAxisROOT.cc:31
virtual int bins() const
The number of bins (excluding underflow and overflow) on the IAxis.
Definition: IAxisROOT.cc:41
virtual double upperEdge() const
Get the upper edge of the IAxis.
Definition: IAxisROOT.cc:36