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

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 class BinnerAxis;
00020 class BinsBase;
00021 
00032 class MDL_HIPPOPLOT_API BinningProjector : virtual public ProjectorBase
00033 {
00034 
00035 private:
00036 
00040   unsigned int m_binner_dim;
00041 
00042 protected:
00043 
00049   BinsBase * m_binner;
00050 
00053   BinningProjector ( unsigned int axes );
00054 
00056   BinningProjector ( const BinningProjector & projector );
00057 
00059   virtual void execute ();
00060 
00064   virtual void checkScaling ();
00065 
00066 public:
00067 
00069   ~BinningProjector();
00070 
00071   /* overrides base class. */
00072   virtual void setAxisModel ( hippodraw::Axes::Type, AxisModelBase * );
00073 
00075   virtual void setRange ( hippodraw::Axes::Type, const Range & range, bool );
00076 
00077   virtual void setBinWidth ( hippodraw::Axes::Type axis, double width );
00078   virtual void setBinWidth ( const std::string & axis, 
00079                              int parm, 
00080                              bool dragging );
00081   double getBinWidth ( hippodraw::Axes::Type axis ) const;
00082   virtual void setOffset ( const std::string & axis,
00083                            int parm,
00084                            bool dragging );
00085   virtual void setOffset ( hippodraw::Axes::Type axis, double offset );
00086 
00087   virtual void reset ();
00088 
00089   double getOffset ( hippodraw::Axes::Type axis ) const;
00090 
00092   const BinsBase * getBinner ( ) const;
00093 
00095   void setBinner ( BinsBase * bins );
00096 
00098   virtual void setBinnerOn ( BinnerAxis * binner, 
00099                              hippodraw::Axes::Type axis );
00100 
00104   virtual int getNumberOfBins ( hippodraw::Axes::Type axis ) const;
00105 
00107   virtual double getZValue ( double x, double y ) const;
00108 
00111   virtual DataSource * createNTuple () const;
00112 
00115   virtual void prepareValues();
00116 
00123   virtual const DataSource * createOldStyleNTuple () const;
00124 
00128   virtual void setBinnerRange ( hippodraw::Axes::Type axis,
00129                                 const Range & range,
00130                                 bool const_width ) = 0;
00131 
00137   virtual void normalizeTo ( double number );
00138 
00142   virtual void setNormalizing ( bool on );
00143 
00147   virtual void normalizeTo ( const ProjectorBase * target );
00148 
00151   virtual void normalize ();
00152 
00157   virtual void update ( const Observable * object );
00158 
00162   virtual void willDelete ( const Observable * object );
00163 
00171   void setBinContents ( const DataSource * source );
00172   
00173 protected:
00174 
00175   virtual void fillProjectedValues ( DataSource * ntuple, 
00176                                      bool in_range = false ) const;
00177 
00178   virtual void fillDataSource ( DataSource * ntuple, 
00179                                 bool in_range = false ) const;
00180 
00181 };
00182 
00183 #endif // _BinningProjector_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3