v2.10-0 (21000JUN2005)

Go4ConditionsBase
Class TGo4Marker


class TGo4Marker
derived from TMarker

Extended graphical marker class for go4 condition editor and
viewpanel. Offers coordinate label updated from pad. Scans
work histogram for bin numbers and contents.

Author:
Joern Adamczewski
Since: 06/2004

Field Summary
 private Bool_tfbContDraw
          If true, draw corresponding value as label on working pad
 private Bool_tfbHasConnector
          Switch connectionline between marker and label on or off.
 private Bool_tfbHasLabel
          Switch marker label on or off.
 private Bool_tfbIsPainted
          Flag to prevent Paint() method to redraw marker views after UnDraw.
 private Bool_tfbVisible
          Visibility of this marker on pad.
 private Bool_tfbXbinDraw
          If true, draw corresponding value as label on working pad
 private Bool_tfbXDraw
          If true, draw corresponding value as label on working pad
 private Bool_tfbYbinDraw
          If true, draw corresponding value as label on working pad
 private Bool_tfbYDraw
          If true, draw corresponding value as label on working pad
 static Bool_tfgbCONTDRAW
          default setting for all markers of bin content flag.
 static Bool_tfgbHASCONNECTOR
          default setting for all markers of connector line flag.
 static Bool_tfgbHASLABEL
          default setting for all markers of label on/off flag.
 static Bool_tfgbXBINDRAW
          default setting for all markers of xbindraw flag.
 static Bool_tfgbXDRAW
          default setting for all markers of xdraw flag.
 static Bool_tfgbYBINDRAW
          default setting for all markers of ybindraw flag.
 static Bool_tfgbYDRAW
          default setting for all markers of ydraw flag.
 private static UInt_tfguInstanceCounter
          use this counter for automatic naming and coloring
 private TVirtualPad*fxDrawPad
          Remember last pad used for Draw.
 private TH1*fxHisto
          Reference to currently used histogram (for bin contents).
 private TStringfxName
          since TMarker is not TNamed, we provide identifier string here:
 protected TGo4MarkerPainter*fxPainter
          Painter instance to display the condition in root pad.

Fields inherited from class TMarker
fX, fY

Fields inherited from class TAttMarker
fMarkerColor, fMarkerStyle, fMarkerSize

Constructor Summary
TGo4Marker()
           
TGo4Marker(Double_t x, Double_t y, Int_t style)
           

Destructor Summary
 virtual synchronized ~TGo4Marker()
           

Method Summary
 Bool_tCheckDrawPad()
          True if current draw pad is still exisiting
 Bool_tCheckHistogram()
          True if current histogram is still exisiting
 virtual TGo4MarkerPainter*CreatePainter()
          Factory method to generate (optional subclass) implementation for painter
 voidDeleteMarker()
           
 virtual voidDraw(Option_t* opt)
          Draw this marker on current pad
 Int_tGetCont()
          Deliver bin content of work histogram at marker position
 TVirtualPad*GetDrawPad()
           
 TH1*GetHistogram()
           
 static Int_tGetInstances()
           
 Double_tGetLabelX()
          Calculate initial label coordinate from marker position
 Double_tGetLabelY()
          Calculate initial label coordinate from marker position
 virtual const const char *GetName()
          TMarker is not TNamed, so we implement name ourself
 Int_tGetXbin()
          Deliver x axis bin number of work histogram at marker position
 Int_tGetYbin()
          Deliver y axis bin number of work histogram at marker position
 Bool_tHasConnector()
           
 Bool_tHasLabel()
           
 voidInitLabelStyle()
          Initialize label setup from static default variables
 Bool_tIsContDraw()
           
 protected Bool_tIsPainted()
           
 Bool_tIsVisible()
           
 Bool_tIsXbinDraw()
           
 Bool_tIsXDraw()
           
 Bool_tIsYbinDraw()
           
 Bool_tIsYDraw()
           
 virtual voidPaint(Option_t* opt)
          Display marker with plain root canvas and in go4 viewpanel
 virtual const voidPrint(Option_t* opt)
          Implement standard root print.
 voidPrintMarker(Option_t* opt)
          If option is "go4log", print to TGo4Log::Message.
 voidResetLabel()
          Will reset label position to defaults
 voidSaveLabelStyle()
          This will save draw flags into static default setup
 voidSetContDraw(Bool_t on)
           
 protected voidSetDrawPad(TVirtualPad* pad)
           
 voidSetHistogram(TH1* histo)
           
 voidSetLabelDraw(Bool_t on)
           
 voidSetLineDraw(Bool_t on)
           
 virtual voidSetName(const char * name)
           
 voidSetPadHistogram(TVirtualPad* pad)
          Set first histogram found in pad as working histogram.
 protected voidSetPainted(Bool_t on)
           
 voidSetToBin(Int_t xbin, Int_t ybin)
          Set marker to position according to work histogram axis.
 voidSetVisible(Bool_t on)
           
 voidSetXbinDraw(Bool_t on)
           
 voidSetXDraw(Bool_t on)
           
 voidSetYbinDraw(Bool_t on)
           
 voidSetYDraw(Bool_t on)
           
 virtual voidUnDraw(Option_t* opt)
          Erase view of this marker from the pad

Methods inherited from class TMarker
Copy, DistancetoPrimitive, DrawMarker, ExecuteEvent, GetX, GetY, ls, PaintMarker, PaintMarkerNDC, SavePrimitive, SetX, SetY, DisplayMarkerTypes, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Methods inherited from class TAttMarker
Copy, GetMarkerColor, GetMarkerStyle, GetMarkerSize, Modify, ResetAttMarker, SaveMarkerAttributes, SetMarkerAttributes, SetMarkerColor, SetMarkerStyle, SetMarkerSize

Field Detail

fbContDraw

private Bool_t fbContDraw
If true, draw corresponding value as label on working pad

fbHasConnector

private Bool_t fbHasConnector
Switch connectionline between marker and label on or off.

fbHasLabel

private Bool_t fbHasLabel
Switch marker label on or off.

fbIsPainted

private Bool_t fbIsPainted
Flag to prevent Paint() method to redraw marker views after UnDraw.
Problem with Paint() called from ROOT event loop.

fbVisible

private Bool_t fbVisible
Visibility of this marker on pad. For marker array in editor

fbXbinDraw

private Bool_t fbXbinDraw
If true, draw corresponding value as label on working pad

fbXDraw

private Bool_t fbXDraw
If true, draw corresponding value as label on working pad

fbYbinDraw

private Bool_t fbYbinDraw
If true, draw corresponding value as label on working pad

fbYDraw

private Bool_t fbYDraw
If true, draw corresponding value as label on working pad

fgbCONTDRAW

public static Bool_t fgbCONTDRAW
default setting for all markers of bin content flag.

fgbHASCONNECTOR

public static Bool_t fgbHASCONNECTOR
default setting for all markers of connector line flag.

fgbHASLABEL

public static Bool_t fgbHASLABEL
default setting for all markers of label on/off flag.

fgbXBINDRAW

public static Bool_t fgbXBINDRAW
default setting for all markers of xbindraw flag.

fgbXDRAW

public static Bool_t fgbXDRAW
default setting for all markers of xdraw flag.

fgbYBINDRAW

public static Bool_t fgbYBINDRAW
default setting for all markers of ybindraw flag.

fgbYDRAW

public static Bool_t fgbYDRAW
default setting for all markers of ydraw flag.

fguInstanceCounter

private static UInt_t fguInstanceCounter
use this counter for automatic naming and coloring

fxDrawPad

private TVirtualPad* fxDrawPad
Remember last pad used for Draw. Needed for condition editor to
prevent displaying marker on pad other than the working pad.

fxHisto

private TH1* fxHisto
Reference to currently used histogram (for bin contents).

fxName

private TString fxName
since TMarker is not TNamed, we provide identifier string here:

fxPainter

protected TGo4MarkerPainter* fxPainter
Painter instance to display the condition in root pad. To
be used in Paint() which is called on TPad::Update automatically for
all TObjects appended to the pad.
Constructor Detail

TGo4Marker

public TGo4Marker()

TGo4Marker

public TGo4Marker(Double_t x, Double_t y, Int_t style)
Method Detail

~TGo4Marker

public virtual synchronized ~TGo4Marker()
Method Detail

CheckDrawPad

public Bool_t CheckDrawPad()
True if current draw pad is still exisiting

CheckHistogram

public Bool_t CheckHistogram()
True if current histogram is still exisiting

CreatePainter

public virtual TGo4MarkerPainter* CreatePainter()
Factory method to generate (optional subclass) implementation for painter

DeleteMarker

public void DeleteMarker()

Draw

public virtual void Draw(Option_t* opt)
Draw this marker on current pad

GetCont

public Int_t GetCont()
Deliver bin content of work histogram at marker position

GetDrawPad

public TVirtualPad* GetDrawPad()

GetHistogram

public TH1* GetHistogram()

GetInstances

public static Int_t GetInstances()

GetLabelX

public Double_t GetLabelX()
Calculate initial label coordinate from marker position

GetLabelY

public Double_t GetLabelY()
Calculate initial label coordinate from marker position

GetName

public virtual const const char * GetName()
TMarker is not TNamed, so we implement name ourself

GetXbin

public Int_t GetXbin()
Deliver x axis bin number of work histogram at marker position

GetYbin

public Int_t GetYbin()
Deliver y axis bin number of work histogram at marker position

HasConnector

public Bool_t HasConnector()

HasLabel

public Bool_t HasLabel()

InitLabelStyle

public void InitLabelStyle()
Initialize label setup from static default variables

IsContDraw

public Bool_t IsContDraw()

IsPainted

protected Bool_t IsPainted()

IsVisible

public Bool_t IsVisible()

IsXbinDraw

public Bool_t IsXbinDraw()

IsXDraw

public Bool_t IsXDraw()

IsYbinDraw

public Bool_t IsYbinDraw()

IsYDraw

public Bool_t IsYDraw()

Paint

public virtual void Paint(Option_t* opt)
Display marker with plain root canvas and in go4 viewpanel

Print

public virtual const void Print(Option_t* opt)
Implement standard root print.
If option is "go4log", print to TGo4Log::Message. Otherwise use cout

PrintMarker

public void PrintMarker(Option_t* opt)
If option is "go4log", print to TGo4Log::Message. Otherwise use cout

ResetLabel

public void ResetLabel()
Will reset label position to defaults

SaveLabelStyle

public void SaveLabelStyle()
This will save draw flags into static default setup

SetContDraw

public void SetContDraw(Bool_t on)

SetDrawPad

protected void SetDrawPad(TVirtualPad* pad)

SetHistogram

public void SetHistogram(TH1* histo)

SetLabelDraw

public void SetLabelDraw(Bool_t on)

SetLineDraw

public void SetLineDraw(Bool_t on)

SetName

public virtual void SetName(const char * name)

SetPadHistogram

public void SetPadHistogram(TVirtualPad* pad)
Set first histogram found in pad as working histogram.
For standalone markers outside go4 viewpanel.

SetPainted

protected void SetPainted(Bool_t on)

SetToBin

public void SetToBin(Int_t xbin, Int_t ybin)
Set marker to position according to work histogram axis.

SetVisible

public void SetVisible(Bool_t on)

SetXbinDraw

public void SetXbinDraw(Bool_t on)

SetXDraw

public void SetXDraw(Bool_t on)

SetYbinDraw

public void SetYbinDraw(Bool_t on)

SetYDraw

public void SetYDraw(Bool_t on)

UnDraw

public virtual void UnDraw(Option_t* opt)
Erase view of this marker from the pad

Association Links

to Class TGo4MarkerPainter

Painter instance to display the condition in root pad. To
be used in Paint() which is called on TPad::Update automatically for
all TObjects appended to the pad.

to Class TH1

Reference to currently used histogram (for bin contents).

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005