Bins2DBase.h

Go to the documentation of this file.
00001 /* -*- mode: c++; -*- */
00002 
00014 #ifndef _Bins2DBase_H_
00015 #define _Bins2DBase_H_
00016 
00017 #include "BinsBase.h"
00018 
00019 namespace hippodraw {
00020 
00030 class MDL_HIPPOPLOT_API Bins2DBase : public BinsBase
00031 {
00032 
00033 private:
00034 
00036   BinnerAxis * binner_axisX;
00037 
00039   BinnerAxis * binner_axisY;
00040 
00041 protected:
00042 
00048   std::vector<std::vector<double> > m_data;
00049 
00050 
00052   Bins2DBase ( const char * name );
00053 
00057   int m_num_bins;
00058 
00061   int binNumberX ( double x ) const;
00062 
00065   int binNumberY ( double y ) const;
00066 
00067   virtual double getLow ( hippodraw::Axes::Type  axis ) const;
00068 
00069   virtual void setNumberOfBins ( hippodraw::Axes::Type axis, int number );
00070 
00074   void resize ();
00075 
00077   virtual void resize ( int nx, int ny );
00078 
00083   virtual NTuple * prepareNTuple ( unsigned int rows ) const;
00084 
00085 public:
00086 
00088   Bins2DBase ( const Bins2DBase & binner );
00089 
00091   ~Bins2DBase ();
00092 
00093   virtual int getNumberOfAxes () const;
00094   virtual bool hasEqualWidths () const;
00095 
00097   double binWidthX ( int i ) const;
00098 
00100   double binWidthY ( int i ) const;
00101 
00102   virtual int numberOfBins ( hippodraw::Axes::Type axis ) const;
00103 
00104   virtual const BinnerAxis * getBinnerOn ( hippodraw::Axes::Type axis ) const;
00105 
00109   void setBinnerOn ( BinnerAxis *, hippodraw::Axes::Type axis );
00110 
00111   virtual double scaleFactor () const;
00112 
00114   int numberOfBins() const;
00115 
00116   virtual double binWidth ( hippodraw::Axes::Type axis ) const;
00117 
00118   virtual const Range & 
00119   setBinWidth ( hippodraw::Axes::Type axis, double value );
00120   
00123   double calcBinWidth ( hippodraw::Axes::Type axis, 
00124                         int parm, 
00125                         bool dragging ) const;
00126 
00128   virtual double calcOffset ( const std::string &,
00129                              int parm,
00130                              bool dragging ) const;
00131 
00133   virtual double getOffset ( hippodraw::Axes::Type axis ) const;
00134 
00137   virtual void setOffset ( hippodraw::Axes::Type axis, double value );
00138 
00139   virtual const Range & setRange ( hippodraw::Axes::Type axis, 
00140                                    const Range &, 
00141                                    bool hold_width = true );
00142 
00144   virtual const Range & getRange ( hippodraw::Axes::Type axis );
00145 
00146   virtual int getNumberOfEntries () const;
00147 
00148   virtual int getUnderflow () const;
00149   virtual int getOverflow () const;
00150 
00151 
00152 };
00153 
00154 } // namespace hippodraw
00155 
00156 #endif // _Bins2DBase_H_

Generated for HippoDraw Class Library by doxygen