Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
binners
BinnerAxis.h
Go to the documentation of this file.
1
/* -*- mode: c++; -*- */
13
#ifndef _BinnerAxis_H_
14
#define _BinnerAxis_H_
15
16
#include "
axes/Range.h
"
17
18
#include <string>
19
20
namespace
hippodraw {
21
35
class
MDL_HIPPOPLOT_API
BinnerAxis
36
{
37
38
private
:
39
41
const
std::string
m_name
;
42
44
mutable
bool
m_dragging
;
45
48
virtual
int
getNob (
double
width )
const
= 0;
49
51
virtual
int
getNob (
const
Range
& range )
const
= 0;
52
53
protected
:
54
57
static
int
s_num_bins
;
58
61
static
double
s_bin_factor
;
62
64
mutable
int
m_num_bins
;
65
68
Range
m_range
;
69
71
double
m_offset
;
72
75
double
m_width
;
76
80
std::vector< double >
m_bin_edges
;
81
83
mutable
Range
m_range_start
;
84
86
mutable
double
m_width_start
;
87
89
BinnerAxis
(
const
BinnerAxis
& binner );
90
92
BinnerAxis
(
const
char
* name );
93
96
virtual
double
calcWidthParm (
int
number )
const
= 0;
97
98
public
:
99
101
virtual
~
BinnerAxis
();
102
105
virtual
BinnerAxis
*
clone
() = 0;
106
108
const
std::string & name ()
const
;
109
116
virtual
bool
hasEqualWidths ()
const
;
117
119
double
axisGetLow()
const
;
120
122
double
axisGetHigh()
const
;
123
125
const
Range
& getRange()
const
;
126
128
int
axisNumberOfBins ()
const
;
129
131
virtual
double
getConstWid ( )
const
= 0;
132
136
virtual
double
getBinWidth ( )
const
= 0;
137
139
virtual
void
axisSetNumberOfBins(
int
nb ) = 0;
140
143
virtual
int
axisBinNumber (
double
x )
const
= 0;
144
149
virtual
double
getCoordinate (
int
i )
const
= 0;
150
152
virtual
double
axisBinWidth (
int
i )
const
= 0;
153
156
virtual
const
std::vector< double > & binEdges ();
157
160
virtual
const
Range
& setBinWidth (
double
width ) = 0;
161
167
virtual
double
calcOffset (
int
parm,
bool
dragging )
const
= 0;
168
170
virtual
double
getOffset ()
const
= 0;
171
173
virtual
const
void
setOffset (
double
offset ) = 0;
174
178
virtual
const
Range
& setRange (
const
Range
&,
179
bool
hold_width =
true
) = 0;
180
182
virtual
double
scaleFactorWid ( ) = 0;
183
185
void
setStartRange (
bool
dragging )
const
;
186
188
void
setStartWidth (
bool
dragging )
const
;
189
197
double
calcBinWidth (
int
parm,
bool
dragging )
const
;
198
199
};
200
201
}
// namespace hippodraw
202
203
#endif // _BinnerAxis_H_
Generated for HippoDraw Class Library by