00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _ErrorBarRep_H_ 00015 #define _ErrorBarRep_H_ 00016 00017 #include "RepBase.h" 00018 00019 #include "axes/Range.h" 00020 00021 namespace hippodraw { 00022 00028 class MDL_HIPPOPLOT_API ErrorBarRep : public RepBase 00029 { 00030 00031 private: 00032 00034 std::vector< double > m_x_err; 00035 00037 std::vector< double > m_y_err; 00038 00041 bool m_x_flag; 00042 00045 bool m_y_flag; 00046 00048 Range m_x_range; 00049 00051 Range m_y_range; 00052 00053 00056 void drawXError ( double x, double y, double error, 00057 const TransformBase & t ); 00058 00061 void drawYError ( double x, double y, double error, 00062 const TransformBase & t ); 00063 00064 public: 00065 00070 ErrorBarRep ( ); 00071 00072 // Take the default copy constructor 00073 // ErrorBarRep ( const ErrorBarRep & point_rep ); 00074 00076 ~ErrorBarRep(); 00077 00080 RepBase * clone (); 00081 00083 void setXError ( bool ); 00084 00086 void setYError ( bool ); 00087 00088 virtual void drawProjectedValues ( const DataSource * ntuple, 00089 TransformBase * transform, 00090 ViewBase * view ); 00091 00092 private: 00093 00096 void getRanges ( const ViewBase * view ); 00097 00098 }; 00099 00100 } // namespace hippodraw 00101 00102 #endif // _ErrorBarRep_H_