Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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 
00028 class MDL_HIPPOPLOT_API Bins2DBase : public BinsBase
00029 {
00030 
00031 private:
00032 
00034   BinnerAxis * binner_axisX;
00035 
00037   BinnerAxis * binner_axisY;
00038 
00039 protected:
00040 
00046   std::vector<std::vector<double> > m_data;
00047 
00048 
00050   Bins2DBase ( const char * name );
00051 
00055   int m_num_bins;
00056 
00059   int binNumberX ( double x ) const;
00060 
00063   int binNumberY ( double y ) const;
00064 
00065   virtual double getLow ( hippodraw::Axes::Type  axis ) const;
00066 
00067   virtual void setNumberOfBins ( hippodraw::Axes::Type axis, int number );
00068 
00072   void resize ();
00073 
00075   virtual void resize ( int nx, int ny );
00076 
00081   virtual NTuple * prepareNTuple ( unsigned int rows ) const;
00082 
00083 public:
00084 
00086   Bins2DBase ( const Bins2DBase & binner );
00087 
00089   ~Bins2DBase ();
00090 
00091   virtual int getNumberOfAxes () const;
00092   virtual bool hasEqualWidths () const;
00093 
00095   double binWidthX ( int i ) const;
00096 
00098   double binWidthY ( int i ) const;
00099 
00100   virtual int numberOfBins ( hippodraw::Axes::Type axis ) const;
00101 
00102   virtual const BinnerAxis * getBinnerOn ( hippodraw::Axes::Type axis ) const;
00103 
00107   void setBinnerOn ( BinnerAxis *, hippodraw::Axes::Type axis );
00108 
00109   virtual double scaleFactor () const;
00110 
00112   int numberOfBins() const;
00113 
00114   virtual double binWidth ( hippodraw::Axes::Type axis ) const;
00115 
00116   virtual const Range & 
00117   setBinWidth ( hippodraw::Axes::Type axis, double value );
00118   
00120   double calcBinWidth ( const std::string & axis, 
00121                         int parm, 
00122                         bool dragging ) const;
00123 
00125   virtual double calcOffset ( const std::string &,
00126                              int parm,
00127                              bool dragging ) const;
00128 
00130   virtual double getOffset ( hippodraw::Axes::Type axis ) const;
00131 
00134   virtual void setOffset ( hippodraw::Axes::Type axis, double value );
00135 
00136   virtual const Range & setRange ( hippodraw::Axes::Type axis, 
00137                                    const Range &, 
00138                                    bool hold_width = true );
00139 
00141   virtual const Range & getRange ( hippodraw::Axes::Type axis );
00142 
00143   virtual int getNumberOfEntries () const;
00144 
00145 };
00146 
00147 #endif // _Bins2DBase_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3