Bins1DBase.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _Bins1DBase_H_
15 #define _Bins1DBase_H_
16 
17 #include "BinsBase.h"
18 
19 #include "BinnerAxis.h"
20 
21 namespace hippodraw {
22 
31 {
32 private:
33 
35  void resize ();
36 
37 protected:
38 
41 
43  Bins1DBase ( const char * name );
44 
46  Bins1DBase ( const Bins1DBase & binner );
47 
48  virtual double getLow ( hippodraw::Axes::Type axis ) const;
49 
51  virtual void resize ( int number ) = 0;
52 
57  virtual NTuple * prepareNTuple ( unsigned int rows ) const;
58 
59 public:
60 
62  virtual ~Bins1DBase ();
63 
64  virtual int getNumberOfAxes () const;
65 
66  virtual int numberOfBins ( hippodraw::Axes::Type axis ) const;
67 
68  virtual bool hasEqualWidths () const;
69 
74  double binWidth ( int i ) const;
75 
76  virtual const BinnerAxis * getBinnerOn ( hippodraw::Axes::Type axis ) const;
77 
80  virtual void setBinnerOn ( BinnerAxis *, hippodraw::Axes::Type axis );
81 
83  double getHigh() const;
84 
85  virtual void setNumberOfBins ( hippodraw::Axes::Type axis, int num_bins );
86 
89  inline int binNumber(double x);
90 
91  virtual const Range & setBinWidth ( hippodraw::Axes::Type axis,
92  double value );
93 
96  double calcBinWidth ( hippodraw::Axes::Type axis,
97  int parm,
98  bool dragging ) const;
99 
101  virtual double calcOffset ( const std::string &,
102  int parm,
103  bool dragging ) const;
104 
106  virtual double getOffset ( hippodraw::Axes::Type axis ) const;
107 
110  virtual void setOffset ( hippodraw::Axes::Type axis, double value );
111 
112  virtual const Range & setRange ( hippodraw::Axes::Type axis,
113  const Range &,
114  bool hold_width = true );
115 
117  virtual const Range & getRange ( hippodraw::Axes::Type axis );
118 
122  virtual double scaleFactor () const;
123 
124 
125  virtual double binWidth ( hippodraw::Axes::Type axis ) const;
126 
131  virtual int getNumberOfEntries ( int i ) const = 0;
132 
133 };
134 
135 inline
136 int
138 {
139  return binner_axis->axisBinNumber(x);
140 }
141 
142 
143 } // namespace hippodraw
144 
145 #endif // _Bins1DBase_H_

Generated for HippoDraw Class Library by doxygen