BinsBase.cxx
Go to the documentation of this file.
1 
12 #ifdef _MSC_VER
13 #include "msdevstudio/MSconfig.h"
14 #endif
15 
16 #include "BinsBase.h"
17 
18 #include <cassert>
19 
20 #ifdef ITERATOR_MEMBER_DEFECT
21 using namespace std;
22 #else
23 using std::list;
24 using std::string;
25 using std::vector;
26 #endif
27 
28 namespace hippodraw {
29 
30 BinsBase::BinsBase ( const char * name )
31  : m_name ( name ),
32  m_scale_factor ( 1.0 ),
33  m_is_scaling ( false ),
34  m_values_dirty ( true ),
35  m_empty ( true )
36 {
37 }
38 
39 BinsBase::BinsBase ( const BinsBase & binner )
40  : m_name ( binner.m_name ),
41  m_scale_factor ( binner.m_scale_factor ),
42  m_is_scaling ( binner.m_is_scaling ),
43  m_values_dirty ( binner.m_values_dirty ),
44  m_empty ( binner.m_empty )
45 {
46 }
47 
49 {
50 }
51 
52 const string &
54 name () const
55 {
56  return m_name;
57 }
58 
60 {
61  return m_values_dirty;
62 }
63 
65 {
66  m_values_dirty = true;
67 }
68 
69 double BinsBase::scaleFactor () const
70 {
71  return 1.0;
72 }
73 
74 double BinsBase::getZValue ( double, double ) const
75 {
76  return 0;
77 }
78 
79 bool
81 isEmpty ( ) const
82 {
83  return m_empty;
84 }
85 
86 void
88 scaleNumberOfEntries ( double number )
89 {
90  m_scale_factor = number;
91 }
92 
93 void
95 setEntriesScaling ( bool on )
96 {
97  m_is_scaling = on;
98 }
99 
100 
101 void
103 setMinEntries ( int entries )
104 {
105 }
106 
107 int
110 {
111  return -1;
112 }
113 
114 }// namespace hippodraw
115 
const std::string & name() const
Returns the name of the Bins container object.
Definition: BinsBase.cxx:54
virtual int getMinEntries()
Get the minimum entries/bin.
Definition: BinsBase.cxx:109
virtual void setEntriesScaling(bool on)
Sets the scaling number of entries on if on is true, otherwise turns if off.
Definition: BinsBase.cxx:95
BinsBase(const char *name)
The constructor taking the bins container name as argument.
Definition: BinsBase.cxx:30
hippodraw::BinsBase class interface
bool m_values_dirty
A flag to indicate that the objects in m_values are not correct.
Definition: BinsBase.h:53
virtual void scaleNumberOfEntries(double number)
Sets a scale factor on the output so that the number of entries appears to be number.
Definition: BinsBase.cxx:88
virtual double getZValue(double x, double y) const
Get the z value at the specified point (x,y).
Definition: BinsBase.cxx:74
virtual ~BinsBase()
The virtual destructor.
Definition: BinsBase.cxx:48
void setDirty()
Sets a flag to indicate that re-binning needs to be done.
Definition: BinsBase.cxx:64
virtual double scaleFactor() const
Returns the scale factor.
Definition: BinsBase.cxx:69
double m_scale_factor
The scale factor.
Definition: BinsBase.h:46
bool isEmpty() const
Returns true if no accumulation has yet occurred, otherwise returns false.
Definition: BinsBase.cxx:81
bool m_is_scaling
A flag which is set true to enable scaling the output.
Definition: BinsBase.h:50
const std::string m_name
The name of the object in the Factory.
Definition: BinsBase.h:39
bool m_empty
A flag set to true, when no accumulation has yet occurred, otherwise is set false.
Definition: BinsBase.h:58
bool isDirty()
Returns true if the re-accumulation is needed.
Definition: BinsBase.cxx:59
The base class for the binner hierarchy.
Definition: BinsBase.h:33
virtual void setMinEntries(int entries)
Set the minimum entries/bin.
Definition: BinsBase.cxx:103

Generated for HippoDraw Class Library by doxygen