Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4Marker Class Reference

Extended graphical marker class for go4 condition editor and viewpanel. More...

#include <TGo4Marker.h>

List of all members.

Public Methods

 TGo4Marker ()
 TGo4Marker (Double_t x, Double_t y, Int_t style)
virtual ~TGo4Marker ()
virtual void Print (Option_t *opt="") const
 Implement standard root print. More...

void PrintMarker (Option_t *opt="")
 If option is "go4log", print to TGo4Log::Message. More...

virtual void Paint (Option_t *opt="")
 Display marker with plain root canvas and in go4 viewpanel. More...

virtual void Draw (Option_t *opt="")
 Draw this marker on current pad. More...

virtual void UnDraw (Option_t *opt="")
 Erase view of this marker from the pad. More...

virtual TGo4MarkerPainterCreatePainter ()
 Factory method to generate (optional subclass) implementation for painter. More...

void SetVisible (Bool_t on)
Bool_t IsVisible ()
virtual void SetName (const char *name)
void DeleteMarker ()
void SetToBin (Int_t xbin, Int_t ybin=0)
 Set marker to position according to work histogram axis. More...

void SetLabelDraw (Bool_t on)
Bool_t HasLabel ()
void SetLineDraw (Bool_t on)
Bool_t HasConnector ()
void SetXDraw (Bool_t on)
Bool_t IsXDraw ()
void SetYDraw (Bool_t on)
Bool_t IsYDraw ()
void SetXbinDraw (Bool_t on)
Bool_t IsXbinDraw ()
void SetYbinDraw (Bool_t on)
Bool_t IsYbinDraw ()
void SetContDraw (Bool_t on)
Bool_t IsContDraw ()
void SaveLabelStyle ()
 This will save draw flags into static default setup. More...

void ResetLabel ()
 Will reset label position to defaults. More...

void InitLabelStyle ()
 Initialize label setup from static default variables. More...

void SetHistogram (TH1 *histo)
TH1 * GetHistogram ()
void SetPadHistogram (TVirtualPad *pad)
 Set first histogram found in pad as working histogram. More...

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

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

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

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

Double_t GetLabelX ()
 Calculate initial label coordinate from marker position. More...

Double_t GetLabelY ()
 Calculate initial label coordinate from marker position. More...

TVirtualPad * GetDrawPad ()
Bool_t CheckDrawPad ()
 True if current draw pad is still exisiting. More...

Bool_t CheckHistogram ()
 True if current histogram is still exisiting. More...


Static Public Methods

Int_t GetInstances ()

Static Public Attributes

Bool_t fgbHASLABEL = kTRUE
 default setting for all markers of label on/off flag. More...

Bool_t fgbHASCONNECTOR = kTRUE
 default setting for all markers of connector line flag. More...

Bool_t fgbXDRAW = kTRUE
 default setting for all markers of xdraw flag. More...

Bool_t fgbYDRAW = kTRUE
 default setting for all markers of ydraw flag. More...

Bool_t fgbXBINDRAW = kFALSE
 default setting for all markers of xbindraw flag. More...

Bool_t fgbYBINDRAW = kFALSE
 default setting for all markers of ybindraw flag. More...

Bool_t fgbCONTDRAW = kTRUE
 default setting for all markers of bin content flag. More...


Protected Methods

void SetPainted (Bool_t on)
Bool_t IsPainted ()
void SetDrawPad (TVirtualPad *pad)

Protected Attributes

TGo4MarkerPainterfxPainter
 Painter instance to display the condition in root pad. More...


Private Attributes

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

Bool_t fbIsPainted
 Flag to prevent Paint() method to redraw marker views after UnDraw. More...

Bool_t fbVisible
 Visibility of this marker on pad. More...

Bool_t fbHasLabel
 Switch marker label on or off. More...

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

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

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

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

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

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

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

TVirtualPad * fxDrawPad
 Remember last pad used for Draw. More...


Static Private Attributes

UInt_t fguInstanceCounter = 0
 use this counter for automatic naming and coloring. More...


Detailed Description

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

Definition at line 34 of file TGo4Marker.h.


Constructor & Destructor Documentation

TGo4Marker::TGo4Marker  
 

Definition at line 48 of file TGo4Marker.cxx.

References InitLabelStyle().

TGo4Marker::TGo4Marker Double_t    x,
Double_t    y,
Int_t    style
 

Definition at line 37 of file TGo4Marker.cxx.

References fguInstanceCounter, fxName, and InitLabelStyle().

TGo4Marker::~TGo4Marker   [virtual]
 

Definition at line 58 of file TGo4Marker.cxx.

References fguInstanceCounter, fxPainter, and UnDraw().


Member Function Documentation

void TGo4Marker::Print Option_t *    opt = "" const [virtual]
 

Implement standard root print.

If option is "go4log", print to TGo4Log::Message. Otherwise use cout

Definition at line 235 of file TGo4Marker.cxx.

References PrintMarker().

void TGo4Marker::PrintMarker Option_t *    opt = ""
 

If option is "go4log", print to TGo4Log::Message.

Otherwise use cout

Definition at line 246 of file TGo4Marker.cxx.

References GetCont(), GetHistogram(), GetName(), GetXbin(), GetYbin(), and TGo4Log::Message().

Referenced by Print().

void TGo4Marker::Paint Option_t *    opt = "" [virtual]
 

Display marker with plain root canvas and in go4 viewpanel.

Definition at line 109 of file TGo4Marker.cxx.

References CheckHistogram(), CreatePainter(), fxPainter, GetDrawPad(), IsPainted(), IsVisible(), TGo4MarkerPainter::PaintLabel(), SetDrawPad(), SetPadHistogram(), and SetPainted().

void TGo4Marker::Draw Option_t *    opt = "" [virtual]
 

Draw this marker on current pad.

Definition at line 126 of file TGo4Marker.cxx.

References IsVisible(), SetDrawPad(), SetPainted(), and UnDraw().

Referenced by TGo4PreviewPanelSlots::AddMarker(), TGo4PreviewPanelSlots::MouseClick(), TGo4PreviewPanelSlots::RedrawAllLabels(), and TGo4PreviewPanelSlots::SetMarkerSetup().

void TGo4Marker::UnDraw Option_t *    opt = "" [virtual]
 

Erase view of this marker from the pad.

Definition at line 143 of file TGo4Marker.cxx.

References CreatePainter(), fxPainter, SetDrawPad(), SetPainted(), and TGo4MarkerPainter::UnPaintLabel().

Referenced by Draw(), and ~TGo4Marker().

TGo4MarkerPainter * TGo4Marker::CreatePainter   [virtual]
 

Factory method to generate (optional subclass) implementation for painter.

Definition at line 165 of file TGo4Marker.cxx.

References GetName(), and TGo4MarkerPainter::SetMarker().

Referenced by Paint(), and UnDraw().

void TGo4Marker::SetVisible Bool_t    on [inline]
 

Definition at line 59 of file TGo4Marker.h.

References fbVisible.

Bool_t TGo4Marker::IsVisible   [inline]
 

Definition at line 60 of file TGo4Marker.h.

References fbVisible.

Referenced by Draw(), and Paint().

virtual void TGo4Marker::SetName const char *    name [inline, virtual]
 

Definition at line 61 of file TGo4Marker.h.

References fxName.

void TGo4Marker::DeleteMarker  
 

Definition at line 240 of file TGo4Marker.cxx.

void TGo4Marker::SetToBin Int_t    xbin,
Int_t    ybin = 0
 

Set marker to position according to work histogram axis.

Definition at line 172 of file TGo4Marker.cxx.

References CheckHistogram(), and fxHisto.

void TGo4Marker::SetLabelDraw Bool_t    on [inline]
 

Definition at line 66 of file TGo4Marker.h.

References fbHasLabel.

Bool_t TGo4Marker::HasLabel   [inline]
 

Definition at line 67 of file TGo4Marker.h.

References fbHasLabel.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SetLineDraw Bool_t    on [inline]
 

Definition at line 68 of file TGo4Marker.h.

References fbHasConnector.

Bool_t TGo4Marker::HasConnector   [inline]
 

Definition at line 69 of file TGo4Marker.h.

References fbHasConnector.

Referenced by TGo4MarkerPainter::PaintConnector().

void TGo4Marker::SetXDraw Bool_t    on [inline]
 

Definition at line 70 of file TGo4Marker.h.

References fbXDraw.

Bool_t TGo4Marker::IsXDraw   [inline]
 

Definition at line 71 of file TGo4Marker.h.

References fbXDraw.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SetYDraw Bool_t    on [inline]
 

Definition at line 72 of file TGo4Marker.h.

References fbYDraw.

Bool_t TGo4Marker::IsYDraw   [inline]
 

Definition at line 73 of file TGo4Marker.h.

References fbYDraw.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SetXbinDraw Bool_t    on [inline]
 

Definition at line 74 of file TGo4Marker.h.

References fbXbinDraw.

Bool_t TGo4Marker::IsXbinDraw   [inline]
 

Definition at line 75 of file TGo4Marker.h.

References fbXbinDraw.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SetYbinDraw Bool_t    on [inline]
 

Definition at line 76 of file TGo4Marker.h.

References fbYbinDraw.

Bool_t TGo4Marker::IsYbinDraw   [inline]
 

Definition at line 77 of file TGo4Marker.h.

References fbYbinDraw.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SetContDraw Bool_t    on [inline]
 

Definition at line 78 of file TGo4Marker.h.

References fbContDraw.

Bool_t TGo4Marker::IsContDraw   [inline]
 

Definition at line 79 of file TGo4Marker.h.

References fbContDraw.

Referenced by TGo4MarkerPainter::PaintLabel().

void TGo4Marker::SaveLabelStyle  
 

This will save draw flags into static default setup.

Definition at line 278 of file TGo4Marker.cxx.

References fbContDraw, fbHasConnector, fbHasLabel, fbXbinDraw, fbXDraw, fbYbinDraw, fbYDraw, fgbCONTDRAW, fgbHASCONNECTOR, fgbHASLABEL, fgbXBINDRAW, fgbXDRAW, fgbYBINDRAW, and fgbYDRAW.

void TGo4Marker::ResetLabel  
 

Will reset label position to defaults.

Definition at line 300 of file TGo4Marker.cxx.

References fxPainter, TGo4MarkerPainter::PaintLabel(), and TGo4MarkerPainter::UnPaintLabel().

void TGo4Marker::InitLabelStyle  
 

Initialize label setup from static default variables.

Definition at line 289 of file TGo4Marker.cxx.

References fbContDraw, fbHasConnector, fbHasLabel, fbXbinDraw, fbXDraw, fbYbinDraw, fbYDraw, fgbCONTDRAW, fgbHASCONNECTOR, fgbHASLABEL, fgbXBINDRAW, fgbXDRAW, fgbYBINDRAW, and fgbYDRAW.

Referenced by TGo4Marker().

void TGo4Marker::SetHistogram TH1 *    histo
 

Definition at line 86 of file TGo4Marker.cxx.

References fxHisto.

Referenced by TGo4PreviewPanelSlots::MouseClick(), TGo4PreviewPanelSlots::SetMarkerSetup(), TGo4PreviewPanelSlots::SetMarkersHistogram(), and SetPadHistogram().

TH1* TGo4Marker::GetHistogram   [inline]
 

Definition at line 91 of file TGo4Marker.h.

References fxHisto.

Referenced by PrintMarker().

void TGo4Marker::SetPadHistogram TVirtualPad *    pad
 

Set first histogram found in pad as working histogram.

For standalone markers outside go4 viewpanel.

Definition at line 153 of file TGo4Marker.cxx.

References SetHistogram().

Referenced by Paint().

virtual const char* TGo4Marker::GetName   const [inline, virtual]
 

TMarker is not TNamed, so we implement name ourself.

Definition at line 98 of file TGo4Marker.h.

References fxName.

Referenced by CreatePainter(), TGo4PreviewPanelSlots::GetActiveMarkerName(), TGo4MarkerPainter::PaintLabel(), and PrintMarker().

Int_t TGo4Marker::GetXbin  
 

Deliver x axis bin number of work histogram at marker position.

Definition at line 192 of file TGo4Marker.cxx.

References CheckDrawPad(), CheckHistogram(), fxDrawPad, and fxHisto.

Referenced by GetCont(), TGo4MarkerPainter::PaintLabel(), and PrintMarker().

Int_t TGo4Marker::GetYbin  
 

Deliver y axis bin number of work histogram at marker position.

Definition at line 199 of file TGo4Marker.cxx.

References CheckDrawPad(), CheckHistogram(), fxDrawPad, and fxHisto.

Referenced by GetCont(), TGo4MarkerPainter::PaintLabel(), and PrintMarker().

Int_t TGo4Marker::GetCont  
 

Deliver bin content of work histogram at marker position.

Definition at line 207 of file TGo4Marker.cxx.

References CheckDrawPad(), CheckHistogram(), fxHisto, GetXbin(), and GetYbin().

Referenced by TGo4MarkerPainter::PaintLabel(), and PrintMarker().

Double_t TGo4Marker::GetLabelX  
 

Calculate initial label coordinate from marker position.

Definition at line 215 of file TGo4Marker.cxx.

References CheckDrawPad(), and fxDrawPad.

Referenced by TGo4MarkerPainter::PaintLabel().

Double_t TGo4Marker::GetLabelY  
 

Calculate initial label coordinate from marker position.

Definition at line 223 of file TGo4Marker.cxx.

References CheckDrawPad(), and fxDrawPad.

Referenced by TGo4MarkerPainter::PaintLabel().

Int_t TGo4Marker::GetInstances   [inline, static]
 

Definition at line 112 of file TGo4Marker.h.

References fguInstanceCounter.

Referenced by TGo4PreviewPanelSlots::MouseClick().

TVirtualPad* TGo4Marker::GetDrawPad   [inline]
 

Definition at line 114 of file TGo4Marker.h.

References fxDrawPad.

Referenced by TGo4PreviewPanelSlots::ClearAllLabels(), TGo4PreviewPanelSlots::CreateMarkerSetup(), Paint(), TGo4PreviewPanelSlots::RedrawAllLabels(), and TGo4PreviewPanelSlots::SetMarkersHistogram().

Bool_t TGo4Marker::CheckDrawPad  
 

True if current draw pad is still exisiting.

Definition at line 73 of file TGo4Marker.cxx.

References fxDrawPad.

Referenced by GetCont(), GetLabelX(), GetLabelY(), GetXbin(), and GetYbin().

Bool_t TGo4Marker::CheckHistogram  
 

True if current histogram is still exisiting.

Definition at line 94 of file TGo4Marker.cxx.

References fxHisto.

Referenced by GetCont(), GetXbin(), GetYbin(), Paint(), and SetToBin().

void TGo4Marker::SetPainted Bool_t    on [inline, protected]
 

Definition at line 150 of file TGo4Marker.h.

References fbIsPainted.

Referenced by Draw(), Paint(), and UnDraw().

Bool_t TGo4Marker::IsPainted   [inline, protected]
 

Definition at line 151 of file TGo4Marker.h.

References fbIsPainted.

Referenced by Paint().

void TGo4Marker::SetDrawPad TVirtualPad *    pad [protected]
 

Definition at line 65 of file TGo4Marker.cxx.

References fxDrawPad.

Referenced by Draw(), Paint(), and UnDraw().


Member Data Documentation

Bool_t TGo4Marker::fgbHASLABEL = kTRUE [static]
 

default setting for all markers of label on/off flag.

Definition at line 28 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbHASCONNECTOR = kTRUE [static]
 

default setting for all markers of connector line flag.

Definition at line 29 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbXDRAW = kTRUE [static]
 

default setting for all markers of xdraw flag.

Definition at line 30 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbYDRAW = kTRUE [static]
 

default setting for all markers of ydraw flag.

Definition at line 31 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbXBINDRAW = kFALSE [static]
 

default setting for all markers of xbindraw flag.

Definition at line 32 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbYBINDRAW = kFALSE [static]
 

default setting for all markers of ybindraw flag.

Definition at line 33 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

Bool_t TGo4Marker::fgbCONTDRAW = kTRUE [static]
 

default setting for all markers of bin content flag.

Definition at line 34 of file TGo4Marker.cxx.

Referenced by TGo4MainWindow::init(), InitLabelStyle(), SaveLabelStyle(), and TGo4MainWindow::saveOptions().

TGo4MarkerPainter* TGo4Marker::fxPainter [protected]
 

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.

Definition at line 148 of file TGo4Marker.h.

Referenced by Paint(), ResetLabel(), UnDraw(), and ~TGo4Marker().

TString TGo4Marker::fxName [private]
 

since TMarker is not TNamed, we provide identifier string here:.

Definition at line 159 of file TGo4Marker.h.

Referenced by GetName(), SetName(), and TGo4Marker().

Bool_t TGo4Marker::fbIsPainted [private]
 

Flag to prevent Paint() method to redraw marker views after UnDraw.

Problem with Paint() called from ROOT event loop.

Definition at line 163 of file TGo4Marker.h.

Referenced by IsPainted(), and SetPainted().

Bool_t TGo4Marker::fbVisible [private]
 

Visibility of this marker on pad.

For marker array in editor

Definition at line 166 of file TGo4Marker.h.

Referenced by IsVisible(), and SetVisible().

Bool_t TGo4Marker::fbHasLabel [private]
 

Switch marker label on or off.

Definition at line 169 of file TGo4Marker.h.

Referenced by HasLabel(), InitLabelStyle(), SaveLabelStyle(), and SetLabelDraw().

Bool_t TGo4Marker::fbHasConnector [private]
 

Switch connectionline between marker and label on or off.

Definition at line 172 of file TGo4Marker.h.

Referenced by HasConnector(), InitLabelStyle(), SaveLabelStyle(), and SetLineDraw().

Bool_t TGo4Marker::fbXDraw [private]
 

If true, draw corresponding value as label on working pad.

Definition at line 175 of file TGo4Marker.h.

Referenced by InitLabelStyle(), IsXDraw(), SaveLabelStyle(), and SetXDraw().

Bool_t TGo4Marker::fbYDraw [private]
 

If true, draw corresponding value as label on working pad.

Definition at line 178 of file TGo4Marker.h.

Referenced by InitLabelStyle(), IsYDraw(), SaveLabelStyle(), and SetYDraw().

Bool_t TGo4Marker::fbXbinDraw [private]
 

If true, draw corresponding value as label on working pad.

Definition at line 181 of file TGo4Marker.h.

Referenced by InitLabelStyle(), IsXbinDraw(), SaveLabelStyle(), and SetXbinDraw().

Bool_t TGo4Marker::fbYbinDraw [private]
 

If true, draw corresponding value as label on working pad.

Definition at line 184 of file TGo4Marker.h.

Referenced by InitLabelStyle(), IsYbinDraw(), SaveLabelStyle(), and SetYbinDraw().

Bool_t TGo4Marker::fbContDraw [private]
 

If true, draw corresponding value as label on working pad.

Definition at line 187 of file TGo4Marker.h.

Referenced by InitLabelStyle(), IsContDraw(), SaveLabelStyle(), and SetContDraw().

TH1* TGo4Marker::fxHisto [private]
 

Reference to currently used histogram (for bin contents).

Definition at line 190 of file TGo4Marker.h.

Referenced by CheckHistogram(), GetCont(), GetHistogram(), GetXbin(), GetYbin(), SetHistogram(), and SetToBin().

TVirtualPad* TGo4Marker::fxDrawPad [private]
 

Remember last pad used for Draw.

Needed for condition editor to prevent displaying marker on pad other than the working pad.

Definition at line 194 of file TGo4Marker.h.

Referenced by CheckDrawPad(), GetDrawPad(), GetLabelX(), GetLabelY(), GetXbin(), GetYbin(), and SetDrawPad().

UInt_t TGo4Marker::fguInstanceCounter = 0 [static, private]
 

use this counter for automatic naming and coloring.

Definition at line 26 of file TGo4Marker.cxx.

Referenced by GetInstances(), TGo4Marker(), and ~TGo4Marker().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:46 2005 for Go4-v2.10-5 by doxygen1.2.15