00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4MARKER_H 00017 #define TGO4MARKER_H 00018 00019 #include "TMarker.h" 00020 00021 class TGo4MarkerPainter; 00022 class TH1; 00023 class TVirtualPad; 00024 00033 class TGo4Marker : public TMarker { 00034 00035 public: 00036 TGo4Marker(); 00037 TGo4Marker(Double_t x, Double_t y, Int_t style); 00038 virtual ~TGo4Marker(); 00039 00042 virtual void Print(Option_t* opt="") const; 00044 void PrintMarker(Option_t* opt=""); 00045 00047 virtual void Paint(Option_t* opt=""); 00048 00050 virtual void Draw(Option_t* opt=""); 00051 00053 virtual void UnDraw(Option_t* opt=""); 00054 00056 virtual void Pop(); 00057 00058 00060 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); 00061 00062 00063 00065 virtual TGo4MarkerPainter* CreatePainter(); 00066 00067 00068 void SetVisible(Bool_t on){fbVisible=on;} 00069 Bool_t IsVisible(){return fbVisible;} 00070 virtual void SetName(const char* name){fxName=name;} // *MENU* 00071 //void DeleteMarker(); // *MENU* 00072 00074 void SetToBin(Int_t xbin, Int_t ybin=0); // *MENU* 00075 void SetLabelDraw(Bool_t on){fbHasLabel=on;} // *MENU* 00076 Bool_t HasLabel(){return fbHasLabel;} 00077 void SetLineDraw(Bool_t on){fbHasConnector=on;} // *MENU* 00078 Bool_t HasConnector(){return fbHasConnector;} 00079 void SetXDraw(Bool_t on){fbXDraw=on;}// *MENU* 00080 Bool_t IsXDraw(){return fbXDraw;} 00081 void SetYDraw(Bool_t on){fbYDraw=on;}// *MENU* 00082 Bool_t IsYDraw(){return fbYDraw;} 00083 void SetXbinDraw(Bool_t on){fbXbinDraw=on;}// *MENU* 00084 Bool_t IsXbinDraw(){return fbXbinDraw;} 00085 void SetYbinDraw(Bool_t on){fbYbinDraw=on;}// *MENU* 00086 Bool_t IsYbinDraw(){return fbYbinDraw;} 00087 void SetContDraw(Bool_t on){fbContDraw=on;}// *MENU* 00088 Bool_t IsContDraw(){return fbContDraw;} 00089 00091 void SaveLabelStyle();// *MENU* 00092 00094 void ResetLabel();// *MENU* 00095 00097 void InitLabelStyle(); 00098 00099 void SetHistogram(TH1* histo); 00100 TH1* GetHistogram() const { return fxHisto; } 00101 00103 virtual const char* GetName() const {return fxName.Data();} 00104 00106 Int_t GetXbin(); 00108 Int_t GetYbin(); 00110 Int_t GetCont(); 00112 Double_t GetLabelX(); 00114 Double_t GetLabelY(); 00115 00116 static Int_t GetInstances(){return fguInstanceCounter;} 00117 00118 TVirtualPad* GetDrawPad(){return fxDrawPad;} 00119 00121 Bool_t CheckDrawPad(); 00123 Bool_t CheckHistogram(); 00124 00125 void DeletePainter(); 00126 00128 static Bool_t fgbHASLABEL; 00129 00131 static Bool_t fgbHASCONNECTOR; 00132 00134 static Bool_t fgbXDRAW; 00135 00137 static Bool_t fgbYDRAW; 00138 00140 static Bool_t fgbXBINDRAW; 00141 00143 static Bool_t fgbYBINDRAW; 00144 00146 static Bool_t fgbCONTDRAW; 00147 00148 protected: 00149 00153 TGo4MarkerPainter* fxPainter; 00154 00155 void SetPainted(Bool_t on) { fbIsPainted=on; } 00156 Bool_t IsPainted() { return fbIsPainted; } 00157 00158 void SetDrawPad(TVirtualPad* pad); 00159 00160 00161 private: 00162 00164 TString fxName; 00165 00168 Bool_t fbIsPainted; 00169 00171 Bool_t fbVisible; 00172 00174 Bool_t fbHasLabel; 00175 00177 Bool_t fbHasConnector; 00178 00180 Bool_t fbXDraw; 00181 00183 Bool_t fbYDraw; 00184 00186 Bool_t fbXbinDraw; 00187 00189 Bool_t fbYbinDraw; 00190 00192 Bool_t fbContDraw; 00193 00195 TH1* fxHisto; 00196 00199 TVirtualPad* fxDrawPad; 00200 00202 static UInt_t fguInstanceCounter; 00203 00204 ClassDef(TGo4Marker,1) 00205 }; 00206 00207 #endif //TGO4MARKER_H 00208 00209 00210 //----------------------------END OF GO4 SOURCE FILE ---------------------