PT-Cooling-Log 1.0
PTCoolingLogViewer
|
00001 #ifndef _PtView_hh_ 00002 #define _PtView_hh_ 00003 00004 #include "PtViewEntry.hh" 00005 #include <vector> 00006 #include <string> 00007 00008 class TVirtualPad; 00009 class LogViewer; 00010 class TH1; 00011 00026 class PtView : public std::vector< PtViewEntry > { 00027 public: 00028 00029 PtView(); 00030 PtView( const std::string& name ); 00031 PtView( const PtView& view ); 00032 virtual ~PtView(); 00033 00035 PtView& operator=( const PtView& view ); 00036 00038 bool operator==( const PtView& view ) { 00039 return ( name_ == view.name() && title_ == view.title_ ); 00040 } 00041 00054 virtual void setRange(); 00055 00056 virtual void drawFrame(); 00057 virtual void drawLegend(); 00058 virtual void drawGraph(); 00059 virtual void analysis(); 00060 00075 virtual void query( LogViewer *lv ); 00076 00077 virtual void draw(); 00078 00079 00080 00087 void add( const std::string& field, const std::string& title, const int& color ); 00088 00089 std::string& name() { return name_; } 00090 std::string& title() { return title_; } 00091 00092 std::string name() const { return name_; } 00093 std::string title() const { return title_; } 00094 00095 void pad( TVirtualPad* pad ) { pad_ = pad; } 00096 TVirtualPad* pad() { return pad_; } 00097 00098 00099 double& ymin() { return ymin_; } 00100 double& ymax() { return ymax_; } 00101 00102 double ymin() const { return ymin_; } 00103 double ymax() const { return ymax_; } 00104 00105 00106 protected: 00107 00108 std::string name_; 00109 std::string title_; 00110 LogViewer *lv_; 00111 TVirtualPad *pad_; 00112 TH1 *frame_; 00113 00114 double ymin_; 00115 double ymax_; 00116 double xmin_; 00117 double xmax_; 00118 00119 int startIndex_; 00120 00121 void addTimeEntries(); 00122 00123 }; 00124 00125 #endif // _PtView_hh_