Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4MARKER_H
00015 #define TGO4MARKER_H
00016
00017 #include "TMarker.h"
00018
00019 class TGo4MarkerPainter;
00020 class TH1;
00021 class TVirtualPad;
00022
00031 class
00032
00033 #ifndef __CINT__
00034 #ifdef WIN32
00035 #ifndef BUILDING_GO4BASE_DLL
00036 __declspec(dllimport)
00037 #endif
00038 #endif
00039 #endif
00040
00041 TGo4Marker : public TMarker {
00042
00043 public:
00044 TGo4Marker();
00045 TGo4Marker(Double_t x, Double_t y, Int_t style);
00046 virtual ~TGo4Marker();
00047
00050 virtual void Print(Option_t* opt="") const;
00052 void PrintMarker(Option_t* opt="");
00053
00055 virtual void Paint(Option_t* opt="");
00056
00058 virtual void Draw(Option_t* opt="");
00059
00061 virtual void UnDraw(Option_t* opt="");
00062
00064 virtual void Pop();
00065
00066
00068 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00069
00070
00071
00073 virtual TGo4MarkerPainter* CreatePainter();
00074
00075
00076 void SetVisible(Bool_t on){fbVisible=on;}
00077 Bool_t IsVisible(){return fbVisible;}
00078 virtual void SetName(const char* name){fxName=name;}
00079
00080
00082 void SetToBin(Int_t xbin, Int_t ybin=0);
00083 void SetLabelDraw(Bool_t on){fbHasLabel=on;}
00084 Bool_t HasLabel(){return fbHasLabel;}
00085 void SetLineDraw(Bool_t on){fbHasConnector=on;}
00086 Bool_t HasConnector(){return fbHasConnector;}
00087 void SetXDraw(Bool_t on){fbXDraw=on;}
00088 Bool_t IsXDraw(){return fbXDraw;}
00089 void SetYDraw(Bool_t on){fbYDraw=on;}
00090 Bool_t IsYDraw(){return fbYDraw;}
00091 void SetXbinDraw(Bool_t on){fbXbinDraw=on;}
00092 Bool_t IsXbinDraw(){return fbXbinDraw;}
00093 void SetYbinDraw(Bool_t on){fbYbinDraw=on;}
00094 Bool_t IsYbinDraw(){return fbYbinDraw;}
00095 void SetContDraw(Bool_t on){fbContDraw=on;}
00096 Bool_t IsContDraw(){return fbContDraw;}
00097
00098 const char* GetNumFormat(){return fxNumFormat.Data();}
00099 void SetNumFormat(const char* fmt="%.4E"){fxNumFormat=fmt;}
00100
00101
00102
00104 void SaveLabelStyle();
00105
00107 void ResetLabel();
00108
00110 void InitLabelStyle();
00111
00112 void SetHistogram(TH1* histo);
00113 TH1* GetHistogram() const { return fxHisto; }
00114
00116 virtual const char* GetName() const {return fxName.Data();}
00117
00119 Int_t GetXbin();
00121 Int_t GetYbin();
00123 Int_t GetCont();
00125 Double_t GetLabelX();
00127 Double_t GetLabelY();
00128
00129 static Int_t GetInstances(){return fguInstanceCounter;}
00130
00131 TVirtualPad* GetDrawPad(){return fxDrawPad;}
00132
00134 Bool_t CheckDrawPad();
00136 Bool_t CheckHistogram();
00137
00138 void DeletePainter();
00139
00141 static Bool_t fgbHASLABEL;
00142
00144 static Bool_t fgbHASCONNECTOR;
00145
00147 static Bool_t fgbXDRAW;
00148
00150 static Bool_t fgbYDRAW;
00151
00153 static Bool_t fgbXBINDRAW;
00154
00156 static Bool_t fgbYBINDRAW;
00157
00159 static Bool_t fgbCONTDRAW;
00160
00162 static TString fgxNUMFORMAT;
00163
00164 protected:
00165
00169 TGo4MarkerPainter* fxPainter;
00170
00171 void SetPainted(Bool_t on) { fbIsPainted=on; }
00172 Bool_t IsPainted() { return fbIsPainted; }
00173
00174 void SetDrawPad(TVirtualPad* pad);
00175
00176
00177 private:
00178
00180 TString fxName;
00181
00184 Bool_t fbIsPainted;
00185
00187 Bool_t fbVisible;
00188
00190 Bool_t fbHasLabel;
00191
00193 Bool_t fbHasConnector;
00194
00196 Bool_t fbXDraw;
00197
00199 Bool_t fbYDraw;
00200
00202 Bool_t fbXbinDraw;
00203
00205 Bool_t fbYbinDraw;
00206
00208 Bool_t fbContDraw;
00209
00211 TString fxNumFormat;
00212
00214 TH1* fxHisto;
00215
00218 TVirtualPad* fxDrawPad;
00219
00221 static UInt_t fguInstanceCounter;
00222
00223 ClassDef(TGo4Marker,1)
00224 };
00225
00226 #endif //TGO4MARKER_H
00227