BinningProjector.h
Go to the documentation of this file.
1 /* -*- mode: c++; -*- */
2 
14 #ifndef _BinningProjector_H_
15 #define _BinningProjector_H_
16 
17 #include "ProjectorBase.h"
18 
19 namespace hippodraw {
20 
21 class BinnerAxis;
22 class BinsBase;
23 
35 {
36 
37 private:
38 
42  unsigned int m_binner_dim;
43 
44 protected:
45 
52 
55  BinningProjector ( unsigned int axes );
56 
58  BinningProjector ( const BinningProjector & projector );
59 
61  virtual void execute ();
62 
66  virtual void checkScaling ();
67 
68 public:
69 
71  virtual ~BinningProjector();
72 
73  /* overrides base class. */
74  virtual void setAxisModel ( hippodraw::Axes::Type, AxisModelBase * );
75 
76  virtual const Range & setBinWidth ( hippodraw::Axes::Type axis,
77  double width );
78 
79  virtual const Range & setBinWidth ( hippodraw::Axes::Type axis,
80  int parm,
81  bool dragging );
82 
83  double getBinWidth ( hippodraw::Axes::Type axis ) const;
84 
85  virtual void setOffset ( const std::string & axis,
86  int parm,
87  bool dragging );
88  virtual void setOffset ( hippodraw::Axes::Type axis, double offset );
89 
90  virtual void reset ();
91 
92  double getOffset ( hippodraw::Axes::Type axis ) const;
93 
95  const BinsBase * getBinner ( ) const;
96 
98  void setBinner ( BinsBase * bins );
99 
101  virtual void setBinnerOn ( BinnerAxis * binner,
102  hippodraw::Axes::Type axis );
103 
107  virtual int getNumberOfBins ( hippodraw::Axes::Type axis ) const;
108 
110  virtual double getZValue ( double x, double y ) const;
111 
114  virtual DataSource * createNTuple () const;
115 
118  virtual void prepareValues();
119 
123  virtual void setBinnerRange ( hippodraw::Axes::Type axis,
124  const Range & range,
125  bool const_width ) = 0;
126 
132  virtual void normalizeTo ( double number );
133 
137  virtual void setNormalizing ( bool on );
138 
142  virtual void normalizeTo ( const ProjectorBase * target );
143 
146  virtual void normalize ();
147 
152  virtual void update ( const Observable * object );
153 
157  virtual void willDelete ( const Observable * object );
158 
166  void setBinContents ( const DataSource * source );
167 
170  virtual void setMinEntries( int entries );
171 
174  virtual int getMinEntries ( );
175 
183  virtual bool isImageConvertable () const;
184 
185 protected:
186 
187  virtual void fillDataSource ( DataSource * ntuple,
188  bool in_range = false ) const;
189 
190 };
191 
192 } // namespace hippodraw
193 
194 #endif // _BinningProjector_H_

Generated for HippoDraw Class Library by doxygen