16 #include "Riostream.h"
19 #include "TVirtualPad.h"
38 : TMarker(x,y,style),fxPainter(0),
39 fbIsPainted(kFALSE), fbVisible(kTRUE), fbHasLabel(kTRUE), fbHasConnector(kTRUE),
40 fbXDraw(kTRUE), fbYDraw(kTRUE), fbXbinDraw(kTRUE), fbYbinDraw(kTRUE), fbContDraw(kTRUE),
41 fxHisto(0),fxDrawPad(0)
50 : TMarker(), fxPainter(0),
51 fbIsPainted(kFALSE), fbVisible(kTRUE), fbHasLabel(kTRUE), fbHasConnector(kTRUE),
52 fbXDraw(kTRUE), fbYDraw(kTRUE), fbXbinDraw(kTRUE), fbYbinDraw(kTRUE), fbContDraw(kTRUE),
53 fxHisto(0),fxDrawPad(0)
107 if(gPad && gPad->GetListOfPrimitives()->FindObject(
this)==0) {
122 gROOT->GetListOfCanvases()->RecursiveRemove(
this);
137 TMarker::ExecuteEvent(event,px,py);
138 if(event==kButton1Up)
155 Int_t bin =
fxHisto->GetBin(xbin,ybin);
156 Stat_t content =
fxHisto->GetBinContent(bin);
157 Double_t x=
fxHisto->GetXaxis()->GetBinCenter(xbin);
163 else if (
fxHisto->GetDimension()==2)
165 y=
fxHisto->GetYaxis()->GetBinCenter(ybin);
191 Stat_t content =
fxHisto->GetBinContent(bin);
192 return (Int_t) content;
199 Double_t xpos=GetX()+xoff;
230 TString textbuffer=
"Marker ";
235 textbuffer+=
" histogram: ";
236 textbuffer+=hist->GetName();
238 textbuffer+=
"out histogram";
240 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",
242 if(option.Contains(
"go4log"))
245 std::cout << textbuffer.Data() << std::endl;
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="")
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()
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
virtual void UnPaintLabel(Option_t *opt="")
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)