EqualEntriesHist1DProjector.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _EqualEntriesHist1DProjector_H_
15 #define _EqualEntriesHist1DProjector_H_
16 
17 #include "NTupleProjector.h"
18 #include "axes/Range.h"
19 
20 namespace hippodraw {
21 
22 class Range;
23 
35 {
36 
37 private:
38 
41  std::string m_y_label;
42 
45  unsigned int m_bin_num;
46 
49  unsigned int m_start_num;
50 
54 
56  void adjustNumberOfBins();
57 
58 protected:
59 
62 
67  virtual void changedNTuple();
68 
70  virtual void addPointReps ();
71 
72 public:
73 
76 
79  ProjectorBase * clone();
80 
85  virtual Range dataRangeOn ( hippodraw::Axes::Type axis ) const;
86  virtual Range valueRange ( ) const;
87  Range dataRangeOnValue ( ) const;
88 
91  virtual double getPosOn ( hippodraw::Axes::Type axis ) const;
92 
95  virtual const std::string & getYLabel ( bool density = false ) const;
96 
98  virtual double getAverage ( hippodraw::Axes::Type axis ) const;
99 
100  virtual bool isAxisBinned ( const std::string & axis ) const;
101 
103  virtual int getUnderflow () const;
104 
106  virtual int getOverflow () const;
107 
108  virtual DataSource * createNTuple () const;
109 
110  virtual void prepareValues ();
111 
113  virtual const Range& setBinWidth ( Axes::Type axis, int parm, bool dragging );
115  virtual const Range& setBinWidth ( Axes::Type axis, double number );
116 
118  virtual double getBinWidth ( Axes::Type axis ) const;
119 
120 protected:
121 
122  virtual void fillProjectedValues ( DataSource * ntuple,
123  bool in_range = false ) const;
124 };
125 
126 } // namespace hippodraw
127 
128 #endif // _EqualEntriesHist1DProjector_H_
#define MDL_HIPPOPLOT_API
Definition: libhippo.h:36
unsigned int m_bin_num
The number of bins.
Range m_range
The range of the data source.
unsigned int m_start_num
The number of bins when dragging starts.
An NTupleProjector is a projector that projects data from an DataSource object.
numeric::array clone(numeric::array arr)
Definition: num_util.cpp:412
A derived class of NTupleProjector that projects a column of data into a one dimensional histogram...
The base class for the Projector hierarchy.
Definition: ProjectorBase.h:56
hippodraw::Range class interface
Expresses a range of values.
Definition: Range.h:33
std::string m_y_label
The label for the y axis.
hippodraw::NTupleProjector class interface
Type
Axes constants.
Definition: AxesType.h:31
Base class for DataSource.
Definition: DataSource.h:55

Generated for HippoDraw Class Library by doxygen