00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _LineProjector_H_ 00015 #define _LineProjector_H_ 00016 00017 #include "ProjectorBase.h" 00018 00019 #include "datasrcs/DataPointTuple.h" 00020 00021 namespace hippodraw { 00022 00027 class MDL_HIPPOPLOT_API LineProjector : public ProjectorBase 00028 { 00029 00030 private: 00031 00034 double m_value; 00035 00038 hippodraw::Axes::Type m_axis; 00039 00042 std::string m_title; 00043 00045 LineProjector( const LineProjector & ); 00046 00047 public: 00048 00051 LineProjector ( hippodraw::Axes::Type, double value ); 00052 00055 virtual ~LineProjector(); 00056 00057 virtual ProjectorBase * clone(); 00058 00059 /* The required virtual functions. */ 00060 virtual void addPointReps (); 00061 virtual bool isEmpty () const; 00062 virtual Range dataRangeOn ( hippodraw::Axes::Type ) const; 00063 virtual const std::string & getTitle() const; 00064 virtual Range valueRange () const; 00065 virtual double getPosOn ( hippodraw::Axes::Type ) const; 00066 virtual const std::string & getXLabel() const; 00067 virtual const std::string & getYLabel ( bool flag = false ) const; 00068 virtual int getNumberOfEntries () const; 00069 00071 int getUnderflow () const; 00072 00074 int getOverflow () const; 00075 00076 virtual DataSource * createNTuple () const; 00077 00078 virtual void prepareValues (); 00079 00082 void setValue ( double value ); 00083 00084 protected: 00085 00086 virtual void fillProjectedValues ( DataSource * ntuple, 00087 bool in_range = false ) const; 00088 00089 }; 00090 00091 } // namespace hippodraw 00092 00093 #endif // _LineProjector_H_