Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

AIDAAxis.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #ifndef INCLUDED_AIDAAXIS_H
00004 #define INCLUDED_AIDAAXIS_H 1
00005 
00006 
00007 
00008 #include <vector>
00009 #include "Interfaces/IAxis.h"
00010 
00011 
00012 
00013 
00014 namespace Anaphe {
00015 
00016 class CHBookHistogram;
00017 class IHistogram;
00018 
00019 
00020 //-------------------------------------------------------------------------
00021 //
00022 // ClassName:    AIDAAxis
00023 //  
00024 // Description:  Definition of the class AIDAAxis
00025 //
00026 //               AIDAAxis represents a binned histogram AIDAAxis.
00027 //               A 1D histogram has one axis representing the X axis,
00028 //               a 2D histogram has two axes representing the X and Y Axis. 
00029 //
00030 // Authors:      Pavel Binko, Dino Ferrero Merlino, Andreas Pfeiffer
00031 // Date:         22/03/2000
00032 //
00033 //-------------------------------------------------------------------------
00034 
00035 
00036   namespace AIDA_HBook {
00037 
00038 class AIDAAxis : virtual public IAxis
00039 {
00040 public:
00041 
00043   AIDAAxis(const CHBookHistogram* h, const int& axisNumber,
00044            const int& nbins = 0, const double& lower_edge = 0.0, 
00045            const double& upper_edge = 0.0);
00046   AIDAAxis(const CHBookHistogram* h, const int& axisnumber,
00047            const std::vector<float>&);
00048   virtual ~AIDAAxis(void);
00049 
00053 
00055   virtual double lowerEdge() const;
00056 
00058   virtual double upperEdge() const;
00059 
00063 
00066 
00068   virtual int bins() const;
00069 
00072 
00074   virtual double binLowerEdge( int index ) const;
00075 
00077   virtual double binUpperEdge( int index ) const;
00078 
00081 
00083   virtual double binWidth( int index ) const;
00084 
00087 
00089   virtual double binCentre( int index ) const;
00090 
00094 
00097   virtual int coordToIndex( double coord ) const;
00098   
00102 
00105   virtual int checkIndex( int index ) const;
00106 
00107 private:
00108   double _bininfo(const int& choice, const int& index) const;
00109   void badConstructorMessage(void) const;
00110 
00111 private:
00112   const CHBookHistogram*   histo;      // Associated histogram
00113   const int                axisNumber; // Axis number (0=x, 1=y etc)
00114   const bool               varbins;
00115   double                   loedge; 
00116   double                   hiedge; 
00117   int                      nbins;
00118   std::vector<float>* binEdges;
00119 
00120   };
00121  }
00122 }
00123 
00124 
00125 #endif    // INCLUDED_AIDAAXIS_H


Anaphe documentation generated by Doxygen (www.doxygen.org)