00001 // Emacs -*- C++ -*- 00002 #ifndef ANAPHE_EVENBINAXIS 00003 #define ANAPHE_EVENBINAXIS 1 00004 00005 // includes 00006 00007 #include "AIDA/IAxis.h" 00008 00009 namespace Anaphe { 00010 namespace AIDA_Histogram_native { 00011 00013 00014 class EvenBinAxis : virtual public AIDA::IAxis 00015 { 00016 public: 00018 EvenBinAxis( int nBins, 00019 double lowEdge, 00020 double highEdge ); 00022 ~EvenBinAxis() {/*nop*/;} 00023 00025 bool isFixedBinning() const; 00026 double lowerEdge() const; 00027 double upperEdge() const; 00028 int bins() const; 00029 double binLowerEdge( int index ) const; 00030 double binUpperEdge( int index ) const; 00031 double binWidth( int index ) const; 00032 int coordToIndex( double coord ) const; 00033 00034 private: 00035 int m_bins; 00036 double m_lowEdge; 00037 double m_highEdge; 00038 double m_binSize; 00039 }; 00040 00041 } 00042 } 00043 00044 #include "EvenBinAxis.inl" 00045 00046 #endif /* ifndef ANAPHE_EVENBINAXIS */