Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
datareps
St2DHistogram.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 "
St2DHistogram.h
"
18
19
#include "
projectors/StHist2DProjector.h
"
20
#include "
reps/ColorBoxPointRep.h
"
21
22
#include <cassert>
23
24
using namespace
hippodraw;
25
26
St2DHistogram::St2DHistogram
( )
27
{
28
m_name
=
"Static 2D Histogram"
;
29
30
m_projector
=
new
StHist2DProjector
();
31
m_rep
=
new
ColorBoxPointRep
();
32
}
33
34
DataRep
*
St2DHistogram::clone
()
35
{
36
return
new
St2DHistogram
( *
this
);
37
}
38
39
bool
St2DHistogram::acceptFunction
(
int
num )
40
{
41
return
num == 2;
42
}
43
44
bool
45
St2DHistogram::
46
hasNTupleBindings
( )
const
47
{
48
return
false
;
49
}
50
51
using namespace
hippodraw;
52
53
bool
54
St2DHistogram::
55
hasAxis
(
hippodraw::Axes::Type
axis )
const
56
{
57
return
axis ==
Axes::X
|| axis ==
Axes::Y
|| axis ==
Axes::Z
;
58
}
59
60
61
void
62
St2DHistogram::
63
setBinContents
(
const
DataSource
* source )
64
{
65
BinningProjector
* projector
66
= dynamic_cast <
BinningProjector
* > (
m_projector
);
67
assert ( projector != 0 );
68
69
projector ->
setBinContents
( source );
70
}
Generated for HippoDraw Class Library by