St1DHistogram.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 "St1DHistogram.h"
00018 
00019 #include "projectors/StHist1DProjector.h"
00020 #include "reps/ColumnPointRep.h"
00021 
00022 #include <cassert>
00023 
00024 using namespace hippodraw;
00025 
00026 St1DHistogram::St1DHistogram ( )
00027 {
00028   m_name = "Static Histogram";
00029 
00030   m_projector = new StHist1DProjector();
00031   m_rep = new ColumnPointRep();
00032 }
00033 
00034 DataRep * St1DHistogram::clone ()
00035 {
00036   return new St1DHistogram ( *this );
00037 }
00038 
00039 bool St1DHistogram::acceptFunction ( int num )
00040 {
00041   return num == 1;
00042 }
00043 
00044 bool
00045 St1DHistogram::
00046 hasErrorDisplay () const
00047 {
00048   return true;
00049 }
00050 
00051 bool
00052 St1DHistogram::
00053 hasNTupleBindings ( ) const
00054 {
00055   return false;
00056 }
00057 
00058 void
00059 St1DHistogram::
00060 setBinContents ( const DataSource * source )
00061 {
00062   BinningProjector * projector 
00063     = dynamic_cast < BinningProjector * > ( m_projector );
00064   assert ( projector != 0 );
00065 
00066   projector -> setBinContents ( source );
00067 }
00068 
00069 using namespace hippodraw;
00070 
00071 bool
00072 St1DHistogram::
00073 hasAxis ( hippodraw::Axes::Type axis ) const
00074 {
00075   return axis == Axes::X || axis == Axes::Y;
00076 }
00077 

Generated for HippoDraw Class Library by doxygen