20 #include "TVirtualPad.h"
44 : TMarker(x,y,style),fxPainter(0),
45 fbIsPainted(kFALSE), fbVisible(kTRUE), fbHasLabel(kTRUE), fbHasConnector(kTRUE),
46 fbXDraw(kTRUE), fbYDraw(kTRUE), fbXbinDraw(kTRUE), fbYbinDraw(kTRUE), fbContDraw(kTRUE),
47 fxHisto(0),fxDrawPad(0)
56 : TMarker(), fxPainter(0),
57 fbIsPainted(kFALSE), fbVisible(kTRUE), fbHasLabel(kTRUE), fbHasConnector(kTRUE),
58 fbXDraw(kTRUE), fbYDraw(kTRUE), fbXbinDraw(kTRUE), fbYbinDraw(kTRUE), fbContDraw(kTRUE),
59 fxHisto(0),fxDrawPad(0)
113 if(gPad && gPad->GetListOfPrimitives()->FindObject(
this)==0) {
128 gROOT->GetListOfCanvases()->RecursiveRemove(
this);
147 TMarker::ExecuteEvent(event, px, py);
148 if (event == kButton1Up) {
165 Int_t bin =
fxHisto->GetBin(xbin, ybin);
166 Stat_t content =
fxHisto->GetBinContent(bin);
167 Double_t x =
fxHisto->GetXaxis()->GetBinCenter(xbin);
169 if (
fxHisto->GetDimension() == 1) {
171 }
else if (
fxHisto->GetDimension() == 2) {
172 y =
fxHisto->GetYaxis()->GetBinCenter(ybin);
199 Stat_t content =
fxHisto->GetBinContent(bin);
200 return (Int_t)content;
208 Double_t xpos = GetX() + xoff;
221 ypos = GetY() + yoff;
238 TString option = opt;
240 TString textbuffer =
"Marker ";
242 textbuffer +=
" with";
245 textbuffer +=
" histogram: ";
246 textbuffer += hist->GetName();
248 textbuffer +=
"out histogram";
250 textbuffer += TString::Format(
"\n X: \t\tY: \t\tXbin:\t\tYbin:\t\tCounts:\n %.2f\t\t%.2f\t\t%d\t\t%d\t\t%d",
252 if (option.Contains(
"go4log"))
255 std::cout << textbuffer.Data() << std::endl;
283 Bool_t XBINDRAW, Bool_t YBINDRAW, Bool_t CONTDRAW,
const char *NUMFORMAT)
297 Bool_t &XBINDRAW, Bool_t &YBINDRAW, Bool_t &CONTDRAW, TString &NUMFORMAT)
void SetDrawPad(TVirtualPad *pad)
static Bool_t fgbHASCONNECTOR
virtual const char * GetName() const
static Bool_t fgbCONTDRAW
void SetToBin(Int_t xbin, Int_t ybin=0)
virtual void Paint(Option_t *opt="")
static Int_t GetInstances()
virtual void Print(Option_t *opt="") const
virtual void SetMarker(TGo4Marker *mark)
void SetHistogram(TH1 *histo)
static Bool_t fgbYBINDRAW
void SetPainted(Bool_t on)
TH1 * GetHistogram() const
virtual void DisplayToFront(Option_t *opt="")
virtual void PaintLabel(Option_t *opt="")
TVirtualPad * GetDrawPad()
static void SetGlobalStyle(Bool_t HASLABEL, Bool_t HASCONNECTOR, Bool_t XDRAW, Bool_t YDRAW, Bool_t XBINDRAW, Bool_t YBINDRAW, Bool_t CONTDRAW, const char *NUMFORMAT)
virtual TGo4MarkerPainter * CreatePainter()
TGo4MarkerPainter * fxPainter
virtual void Draw(Option_t *opt="")
virtual void UnDraw(Option_t *opt="")
void PrintMarker(Option_t *opt="")
static const char * Message(Int_t prio, const char *text,...)
static UInt_t fguInstanceCounter
static Bool_t fgbXBINDRAW
static TString fgxNUMFORMAT
static Bool_t fgbHASLABEL
static void GetGlobalStyle(Bool_t &HASLABEL, Bool_t &HASCONNECTOR, Bool_t &XDRAW, Bool_t &YDRAW, Bool_t &XBINDRAW, Bool_t &YBINDRAW, Bool_t &CONTDRAW, TString &NUMFORMAT)
virtual void UnPaintLabel(Option_t *opt="")
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)