00001
00002
00014 #ifndef _CutPlotter_H_
00015 #define _CutPlotter_H_
00016
00017 #include "XyPlotter.h"
00018
00019 class Color;
00020 class DataSource;
00021 class TupleCut;
00022 class PointRepBase;
00023
00047 class MDL_HIPPOPLOT_API CutPlotter: public XyPlotter
00048 {
00049
00050 protected:
00051
00054 CutPlotter ( const std::string & name );
00055
00058 typedef std::list < DataRep * > TargetList_t;
00059
00062 TargetList_t m_targets;
00063
00066 DataRep * m_datarep;
00067
00068
00069
00070
00071
00074 void updateTargets ();
00075
00077 void removeFromTargets ( );
00078
00079 public:
00080
00082 CutPlotter ( );
00083
00085 CutPlotter ( const CutPlotter & plotter );
00086
00088 virtual ~CutPlotter ();
00089
00091 void addCutTarget ( DataRep * );
00092
00094 bool isTarget ( DataRep * ) const;
00095
00097 const std::list < DataRep * > & getCutTargets () const;
00098
00100 void removeFromTarget ( DataRep * rep );
00101
00107 virtual void willDelete ( const Observable * observable );
00108
00111 const std::vector < TupleCut > & getCuts () const;
00112
00115 void setCuts ( const std::vector < const TupleCut * > & cuts );
00116
00118 virtual bool hasNTupleBindings () const;
00119
00121 void clearCutTargets ();
00122
00124 virtual void setAxisBinding ( const std::string & axis,
00125 const std::string & label );
00126
00128 void setCutColor ( const Color & );
00129
00138 void setCutRepresentation ( RepBase * rep );
00139
00141 const Color & getCutColor () const;
00142
00144 virtual void setCutRangeAt ( const Range & range, unsigned int index );
00145
00151 virtual void setCutRange ( double low, double high );
00152
00157 virtual void setCutRangeFull () = 0;
00158
00163 void setActive ( bool yes );
00164
00166 void setNTuple ( const DataSource * ntuple );
00167
00169 virtual void toggleInverted ( ) = 0;
00170
00173 void setEnabled ( bool yes = true );
00174
00179 virtual void update ( const Observable * object );
00180
00181 };
00182
00183 #endif // _CutPlotter_H_