BinningProjector.h

Go to the documentation of this file.
00001 /* -*- mode: c++; -*- */
00002 
00014 #ifndef _BinningProjector_H_
00015 #define _BinningProjector_H_
00016 
00017 #include "ProjectorBase.h"
00018 
00019 namespace hippodraw {
00020 
00021 class BinnerAxis;
00022 class BinsBase;
00023 
00034 class MDL_HIPPOPLOT_API BinningProjector : virtual public ProjectorBase
00035 {
00036 
00037 private:
00038 
00042   unsigned int m_binner_dim;
00043 
00044 protected:
00045 
00051   BinsBase * m_binner;
00052 
00055   BinningProjector ( unsigned int axes );
00056 
00058   BinningProjector ( const BinningProjector & projector );
00059 
00061   virtual void execute ();
00062 
00066   virtual void checkScaling ();
00067 
00068 public:
00069 
00071   virtual ~BinningProjector();
00072 
00073   /* overrides base class. */
00074   virtual void setAxisModel ( hippodraw::Axes::Type, AxisModelBase * );
00075 
00076   virtual const Range & setBinWidth ( hippodraw::Axes::Type axis, 
00077                                       double width );
00078 
00079   virtual const Range & setBinWidth ( hippodraw::Axes::Type axis,
00080                                       int parm, 
00081                                       bool dragging );
00082 
00083   double getBinWidth ( hippodraw::Axes::Type axis ) const;
00084 
00085   virtual void setOffset ( const std::string & axis,
00086                            int parm,
00087                            bool dragging );
00088   virtual void setOffset ( hippodraw::Axes::Type axis, double offset );
00089 
00090   virtual void reset ();
00091 
00092   double getOffset ( hippodraw::Axes::Type axis ) const;
00093 
00095   const BinsBase * getBinner ( ) const;
00096 
00098   void setBinner ( BinsBase * bins );
00099 
00101   virtual void setBinnerOn ( BinnerAxis * binner, 
00102                              hippodraw::Axes::Type axis );
00103 
00107   virtual int getNumberOfBins ( hippodraw::Axes::Type axis ) const;
00108 
00110   virtual double getZValue ( double x, double y ) const;
00111 
00114   virtual DataSource * createNTuple () const;
00115 
00118   virtual void prepareValues();
00119 
00123   virtual void setBinnerRange ( hippodraw::Axes::Type axis,
00124                                 const Range & range,
00125                                 bool const_width ) = 0;
00126 
00132   virtual void normalizeTo ( double number );
00133 
00137   virtual void setNormalizing ( bool on );
00138 
00142   virtual void normalizeTo ( const ProjectorBase * target );
00143 
00146   virtual void normalize ();
00147 
00152   virtual void update ( const Observable * object );
00153 
00157   virtual void willDelete ( const Observable * object );
00158 
00166   void setBinContents ( const DataSource * source );
00167 
00170   virtual void setMinEntries( int entries );
00171 
00174   virtual int getMinEntries ( );
00175   
00183   virtual bool isImageConvertable () const;
00184 
00185 protected:
00186 
00187   virtual void fillDataSource ( DataSource * ntuple, 
00188                                 bool in_range = false ) const;
00189 
00190 };
00191 
00192 } // namespace hippodraw
00193 
00194 #endif // _BinningProjector_H_

Generated for HippoDraw Class Library by doxygen