Bins2DBase.h
Go to the documentation of this file.
1 /* -*- mode: c++; -*- */
2 
14 #ifndef _Bins2DBase_H_
15 #define _Bins2DBase_H_
16 
17 #include "BinsBase.h"
18 
19 namespace hippodraw {
20 
31 {
32 
33 private:
34 
37 
40 
41 protected:
42 
48  std::vector<std::vector<double> > m_data;
49 
50 
52  Bins2DBase ( const char * name );
53 
58 
61  int binNumberX ( double x ) const;
62 
65  int binNumberY ( double y ) const;
66 
67  virtual double getLow ( hippodraw::Axes::Type axis ) const;
68 
69  virtual void setNumberOfBins ( hippodraw::Axes::Type axis, int number );
70 
74  void resize ();
75 
77  virtual void resize ( int nx, int ny );
78 
83  virtual NTuple * prepareNTuple ( unsigned int rows ) const;
84 
85 public:
86 
88  Bins2DBase ( const Bins2DBase & binner );
89 
91  ~Bins2DBase ();
92 
93  virtual int getNumberOfAxes () const;
94  virtual bool hasEqualWidths () const;
95 
97  double binWidthX ( int i ) const;
98 
100  double binWidthY ( int i ) const;
101 
102  virtual int numberOfBins ( hippodraw::Axes::Type axis ) const;
103 
104  virtual const BinnerAxis * getBinnerOn ( hippodraw::Axes::Type axis ) const;
105 
109  void setBinnerOn ( BinnerAxis *, hippodraw::Axes::Type axis );
110 
111  virtual double scaleFactor () const;
112 
114  int numberOfBins() const;
115 
116  virtual double binWidth ( hippodraw::Axes::Type axis ) const;
117 
118  virtual const Range &
119  setBinWidth ( hippodraw::Axes::Type axis, double value );
120 
123  double calcBinWidth ( hippodraw::Axes::Type axis,
124  int parm,
125  bool dragging ) const;
126 
128  virtual double calcOffset ( const std::string &,
129  int parm,
130  bool dragging ) const;
131 
133  virtual double getOffset ( hippodraw::Axes::Type axis ) const;
134 
137  virtual void setOffset ( hippodraw::Axes::Type axis, double value );
138 
139  virtual const Range & setRange ( hippodraw::Axes::Type axis,
140  const Range &,
141  bool hold_width = true );
142 
144  virtual const Range & getRange ( hippodraw::Axes::Type axis );
145 
146  virtual int getNumberOfEntries () const;
147 
148  virtual int getUnderflow () const;
149  virtual int getOverflow () const;
150 
151 
152 };
153 
154 } // namespace hippodraw
155 
156 #endif // _Bins2DBase_H_

Generated for HippoDraw Class Library by doxygen