Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
datareps
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
19
#include "
projectors/StHist1DProjector.h
"
20
#include "
reps/ColumnPointRep.h
"
21
22
#include <cassert>
23
24
using namespace
hippodraw;
25
26
St1DHistogram::St1DHistogram
( )
27
{
28
m_name
=
"Static Histogram"
;
29
30
m_projector
=
new
StHist1DProjector
();
31
m_rep
=
new
ColumnPointRep
();
32
}
33
34
DataRep
*
St1DHistogram::clone
()
35
{
36
return
new
St1DHistogram
( *
this
);
37
}
38
39
bool
St1DHistogram::acceptFunction
(
int
num )
40
{
41
return
num == 1;
42
}
43
44
bool
45
St1DHistogram::
46
hasErrorDisplay
()
const
47
{
48
return
true
;
49
}
50
51
bool
52
St1DHistogram::
53
hasNTupleBindings
( )
const
54
{
55
return
false
;
56
}
57
58
void
59
St1DHistogram::
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
72
St1DHistogram::
73
hasAxis
(
hippodraw::Axes::Type
axis )
const
74
{
75
return
axis ==
Axes::X
|| axis ==
Axes::Y
;
76
}
77
Generated for HippoDraw Class Library by