St2DHistogram.cxx

Go to the documentation of this file.
00001 
00012 // for truncation warning in debug mode
00013 #ifdef _MSC_VER
00014 #include "msdevstudio/MSconfig.h"
00015 #endif
00016 
00017 #include "St2DHistogram.h"
00018 
00019 #include "projectors/StHist2DProjector.h"
00020 #include "reps/ColorBoxPointRep.h"
00021 
00022 #include <cassert>
00023 
00024 using namespace hippodraw;
00025 
00026 St2DHistogram::St2DHistogram ( )
00027 {
00028   m_name = "Static 2D Histogram";
00029 
00030   m_projector = new StHist2DProjector();
00031   m_rep = new ColorBoxPointRep ();
00032 }
00033 
00034 DataRep * St2DHistogram::clone ()
00035 {
00036   return new St2DHistogram ( *this );
00037 }
00038 
00039 bool St2DHistogram::acceptFunction ( int num )
00040 {
00041   return num == 2;
00042 }
00043 
00044 bool
00045 St2DHistogram::
00046 hasNTupleBindings ( ) const
00047 {
00048   return false;
00049 }
00050 
00051 using namespace hippodraw;
00052 
00053 bool
00054 St2DHistogram::
00055 hasAxis ( hippodraw::Axes::Type axis ) const
00056 {
00057   return axis == Axes::X || axis == Axes::Y || axis ==Axes::Z;
00058 }
00059 
00060 
00061 void
00062 St2DHistogram::
00063 setBinContents ( const DataSource * source )
00064 {
00065   BinningProjector * projector 
00066     = dynamic_cast < BinningProjector * > ( m_projector );
00067   assert ( projector != 0 );
00068 
00069   projector -> setBinContents ( source );
00070 }

Generated for HippoDraw Class Library by doxygen