![]() |
|
|
Generated: 18 Jul 2008 |
#include <Axis.h>
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.
Definition at line 29 of file Axis.h.
Public Types | |
| typedef Axis | self |
Public Member Functions | |
| int | rIndex (int index) const |
| Convert a AIDA bin number on the axis to the ROOT bin number. | |
| int | aIndex (int index) const |
| Convert a ROOT bin number on the axis to the AIDA bin number. | |
| Axis () | |
| Axis (TAxis *itaxi, bool isfixed=true) | |
| void | initialize (TAxis *itaxi, bool isfixed=true) |
| virtual | ~Axis () |
| Destructor. | |
| virtual bool | isFixedBinning () const |
| Check if the IAxis has fixed binning, i.e. | |
| virtual double | lowerEdge () const |
| Get the lower edge of the IAxis. | |
| virtual double | upperEdge () const |
| Get the upper edge of the IAxis. | |
| virtual int | bins () const |
| The number of bins (excluding underflow and overflow) on the IAxis. | |
| virtual double | binLowerEdge (int index) const |
| Get the lower edge of the specified bin. | |
| virtual double | binUpperEdge (int index) const |
| Get the upper edge of the specified bin. | |
| virtual double | binWidth (int index) const |
| Get the width of the specified bin. | |
| virtual int | coordToIndex (double coord) const |
| Convert a coordinate on the axis to a bin number. | |
| TAxis & | taxis () const |
Static Public Member Functions | |
| static int | toRootIndex (int index, int nbins) |
| static int | toAidaIndex (int index, int bins) |
Private Member Functions | |
| self & | me () const |
Private Attributes | |
| TAxis * | taxis_ |
| bool | fixed_ |
| typedef Axis Gaudi::Axis::self |
| Gaudi::Axis::Axis | ( | ) | [inline] |
| Gaudi::Axis::Axis | ( | TAxis * | itaxi, | |
| bool | isfixed = true | |||
| ) | [inline, explicit] |
| virtual Gaudi::Axis::~Axis | ( | ) | [inline, virtual] |
| static int Gaudi::Axis::toRootIndex | ( | int | index, | |
| int | nbins | |||
| ) | [inline, static] |
Definition at line 34 of file Axis.h.
References toRootIndex().
Referenced by rIndex(), and toRootIndex().
00034 { 00035 if (index==AIDA::IAxis::OVERFLOW_BIN) return nbins+1; 00036 if (index==AIDA::IAxis::UNDERFLOW_BIN) return 0; 00037 return index+1; 00038 }
| static int Gaudi::Axis::toAidaIndex | ( | int | index, | |
| int | bins | |||
| ) | [inline, static] |
Definition at line 40 of file Axis.h.
References toAidaIndex().
Referenced by aIndex(), and toAidaIndex().
00040 { 00041 if ( index == bins + 1 ) return AIDA::IAxis::OVERFLOW_BIN ; 00042 if ( index == 0 ) return AIDA::IAxis::UNDERFLOW_BIN ; 00043 return index - 1 ; 00044 }
| int Gaudi::Axis::rIndex | ( | int | index | ) | const [inline] |
Convert a AIDA bin number on the axis to the ROOT bin number.
| index | TheAIDA bin number |
Definition at line 52 of file Axis.h.
References bins(), rIndex(), and toRootIndex().
Referenced by binLowerEdge(), binUpperEdge(), binWidth(), Gaudi::Generic1D< AIDA::IHistogram1D, TH1D >::rIndex(), rIndex(), Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rIndexX(), Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::rIndexX(), Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rIndexY(), Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::rIndexY(), and Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::rIndexZ().
00052 { return toRootIndex(index, bins());}
| int Gaudi::Axis::aIndex | ( | int | index | ) | const [inline] |
Convert a ROOT bin number on the axis to the AIDA bin number.
| index | The ROOT bin number: 1 to bins() for the in-range bins or bins()+1 for OVERFLOW or 0 for UNDERFLOW. |
Definition at line 60 of file Axis.h.
References aIndex(), bins(), and toAidaIndex().
Referenced by aIndex(), and coordToIndex().
00060 { return toAidaIndex(index, bins()); }
| void Gaudi::Axis::initialize | ( | TAxis * | itaxi, | |
| bool | isfixed = true | |||
| ) | [inline] |
Definition at line 68 of file Axis.h.
References fixed_, initialize(), and taxis_.
Referenced by Gaudi::Generic2D< AIDA::IProfile2D, TProfile2D >::adoptRepresentation(), Gaudi::Generic1D< AIDA::IProfile1D, TProfile >::adoptRepresentation(), Gaudi::Generic3D< AIDA::IHistogram3D, TH3D >::adoptRepresentation(), Gaudi::Generic2D< INTERFACE, IMPLEMENTATION >::adoptRepresentation(), Gaudi::Histogram3D::copyFromAida(), Gaudi::Histogram2D::copyFromAida(), Gaudi::Histogram1D::copyFromAida(), Gaudi::Profile1D::init(), Gaudi::Histogram1D::init(), initialize(), and Gaudi::Histogram1D::serialize().
| virtual bool Gaudi::Axis::isFixedBinning | ( | ) | const [inline, virtual] |
Check if the IAxis has fixed binning, i.e.
if all the bins have the same width.
true if the binning is fixed, false otherwise. Definition at line 81 of file Axis.h.
References fixed_, and isFixedBinning().
Referenced by isFixedBinning(), and Gaudi::Histogram1D::serialize().
00081 { return fixed_;}
| virtual double Gaudi::Axis::lowerEdge | ( | ) | const [inline, virtual] |
Get the lower edge of the IAxis.
Definition at line 88 of file Axis.h.
References lowerEdge(), and taxis().
Referenced by lowerEdge(), and Gaudi::Histogram1D::serialize().
00088 { return taxis().GetXmin();}
| virtual double Gaudi::Axis::upperEdge | ( | ) | const [inline, virtual] |
Get the upper edge of the IAxis.
Definition at line 95 of file Axis.h.
References taxis(), and upperEdge().
Referenced by Gaudi::Histogram1D::serialize(), and upperEdge().
00095 { return taxis().GetXmax();}
| virtual int Gaudi::Axis::bins | ( | ) | const [inline, virtual] |
The number of bins (excluding underflow and overflow) on the IAxis.
Definition at line 102 of file Axis.h.
References bins(), and taxis().
Referenced by aIndex(), bins(), Gaudi::Histogram1D::copyFromAida(), rIndex(), Gaudi::Histogram1D::serialize(), and Gaudi::Generic1D< INTERFACE, IMPLEMENTATION >::write().
00102 { return taxis().GetNbins();}
| virtual double Gaudi::Axis::binLowerEdge | ( | int | index | ) | const [inline, virtual] |
Get the lower edge of the specified bin.
| index | The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. |
Double.NEGATIVE_INFINITY. Definition at line 110 of file Axis.h.
References binLowerEdge(), rIndex(), and taxis().
Referenced by binLowerEdge(), and Gaudi::Histogram1D::serialize().
| virtual double Gaudi::Axis::binUpperEdge | ( | int | index | ) | const [inline, virtual] |
Get the upper edge of the specified bin.
| index | The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW. |
Double.POSITIVE_INFINITY. Definition at line 117 of file Axis.h.
References binUpperEdge(), rIndex(), and taxis().
Referenced by binUpperEdge().
| virtual double Gaudi::Axis::binWidth | ( | int | index | ) | const [inline, virtual] |
Get the width of the specified bin.
| index | The bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW. |
Definition at line 125 of file Axis.h.
References binWidth(), rIndex(), and taxis().
Referenced by binWidth().
| virtual int Gaudi::Axis::coordToIndex | ( | double | coord | ) | const [inline, 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.
| coord | The coordinate to be converted. |
Definition at line 136 of file Axis.h.
References aIndex(), coordToIndex(), and taxis().
Referenced by Gaudi::Generic1D< AIDA::IHistogram1D, TH1D >::coordToIndex(), and coordToIndex().
| TAxis& Gaudi::Axis::taxis | ( | ) | const [inline] |
Definition at line 144 of file Axis.h.
References me(), taxis(), and taxis_.
Referenced by binLowerEdge(), bins(), binUpperEdge(), binWidth(), coordToIndex(), lowerEdge(), taxis(), and upperEdge().
00144 { return *me().taxis_;}
| self& Gaudi::Axis::me | ( | ) | const [inline, private] |
TAxis* Gaudi::Axis::taxis_ [private] |
bool Gaudi::Axis::fixed_ [private] |