St1DHistogram.cxx
Go to the documentation of this file.
1 
12 // for truncation warning in debug mode
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "St1DHistogram.h"
18 
20 #include "reps/ColumnPointRep.h"
21 
22 #include <cassert>
23 
24 using namespace hippodraw;
25 
27 {
28  m_name = "Static Histogram";
29 
31  m_rep = new ColumnPointRep();
32 }
33 
35 {
36  return new St1DHistogram ( *this );
37 }
38 
40 {
41  return num == 1;
42 }
43 
44 bool
47 {
48  return true;
49 }
50 
51 bool
54 {
55  return false;
56 }
57 
58 void
60 setBinContents ( const DataSource * source )
61 {
62  BinningProjector * projector
63  = dynamic_cast < BinningProjector * > ( m_projector );
64  assert ( projector != 0 );
65 
66  projector -> setBinContents ( source );
67 }
68 
69 using namespace hippodraw;
70 
71 bool
74 {
75  return axis == Axes::X || axis == Axes::Y;
76 }
77 
std::string m_name
The name of the display as it might be displayed in a GUI.
Definition: DataRep.h:76
The BinningProjector is an abstract class provides most of the functionality for a projector that doe...
A derived class of ProjectorBase that projects data accumulated by calls to its fill function into a ...
virtual bool acceptFunction(int num)
Returns true if the DataRep accepts functions on number variables.
St1DHistogram()
The default constructor.
RepBase * m_rep
The representation used for drawing each data point in the view.
Definition: DataRep.h:94
The base class for data representations.
Definition: DataRep.h:68
StHist1DProjector class interface.
virtual bool hasAxis(hippodraw::Axes::Type) const
Returns true if the data representation has specified axis type axis.
virtual bool hasErrorDisplay() const
Returns true.
virtual bool hasNTupleBindings() const
Returns false.
ProjectorBase * m_projector
A projector used to transform data to projected values that will be plotted.
Definition: DataRep.h:90
void setBinContents(const DataSource *source)
Sets the contents of the binner from the data source.
hippodraw::ColumnPointRep class interface
A PointRep class that draws a column to represent the value.
virtual DataRep * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
Type
Axes constants.
Definition: AxesType.h:31
St1DHistogram class interface.
Base class for DataSource.
Definition: DataSource.h:55

Generated for HippoDraw Class Library by doxygen