Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Hal::Painter Class Referenceabstract

#include <Painter.h>

Inheritance diagram for Hal::Painter:
Hal::CorrFitPainter Hal::FemtoCFPainter Hal::CorrFit1DCFPainter Hal::CorrFit3DCFPainter Hal::Femto1DCFPainter Hal::Femto3DCFPainter Hal::FemtoSHCFPainter

Public Member Functions

Bool_t HasParent () const
 
 Painter (const Painter &other)=delete
 
void AddPainter (Painter *painter)
 
virtual void SetOption (TString option)
 
void Paint ()
 
PainterGetParent () const
 
Painteroperator= (const Painter &other)=delete
 
TCanvas * GetCanvas (Int_t canvasNo=0) const
 
TVirtualPad * GetPad (Int_t index, Int_t canvasNo=0) const
 
void SetGlobalPadStyle (Hal::PadStyle &pad)
 

Protected Member Functions

void SetFlag (Int_t bit, Bool_t state)
 
void SetFlagForced (ULong64_t flag)
 
void ResetFewBits (ULong64_t &flag, std::initializer_list< Int_t > bits, Int_t set=-1) const
 
Bool_t OwnGraphic () const
 
Bool_t CheckOpt (Int_t opt) const
 
ULong64_t GetDrawFlags () const
 
virtual ULong64_t SetOptionInternal (TString opt, ULong64_t prev=0)=0
 
virtual void OptionsApplied ()
 
virtual void SetDefaultFlag ()
 
virtual Bool_t CheckPads () const
 
Bool_t CanvasExist (Int_t canvasNo=0) const
 
Bool_t GetPatterns (TString opt, TString flag, std::vector< double > &vals) const
 
void ContitionalPattern (TString &option, TString pattern, ULong64_t &drawOpt, Int_t bit, Bool_t remove=kTRUE) const
 
void LockPad ()
 
void UnlockPad ()
 
Int_t GetPadsNo (Int_t canvasNo=0) const
 
void GotoPad (Int_t no, Int_t canvasNo=0)
 
void MakeCanvasPads (Int_t x=1, Int_t y=1, Int_t canvasNo=0)
 
void UpdateAllPads ()
 
void ClearCanvas (Int_t canvas)
 
virtual void InnerRepaint ()
 
virtual void InnerPaint ()
 
virtual void MakePadsAndCanvases ()=0
 
void CleanCommonData ()
 
PainterGetAncestor () const
 

Protected Attributes

Bool_t fOptionsChanged = {kFALSE}
 

Static Protected Attributes

static const int kHtmlBit = 0
 
static const int kGridBit = 1
 

Detailed Description

class for drawing objects, contains pads, and copies of drawn objects

Definition at line 28 of file Painter.h.

Constructor & Destructor Documentation

◆ Painter()

Hal::Painter::Painter ( )

Definition at line 23 of file Painter.cxx.

◆ ~Painter()

Hal::Painter::~Painter ( )
virtual

Definition at line 28 of file Painter.cxx.

Member Function Documentation

◆ AddPainter()

void Hal::Painter::AddPainter ( Painter * painter)

adds painter to the paintes

Parameters
painter

Definition at line 34 of file Painter.cxx.

◆ CanvasExist()

Bool_t Hal::Painter::CanvasExist ( Int_t canvasNo = 0) const
protected
Returns
true if main pad exist

Definition at line 208 of file Painter.cxx.

◆ CheckOpt()

Bool_t Hal::Painter::CheckOpt ( Int_t opt) const
inlineprotected
Parameters
opt
Returns
true if opt bit is true in draw flag

Definition at line 79 of file Painter.h.

◆ CheckPads()

virtual Bool_t Hal::Painter::CheckPads ( ) const
inlineprotectedvirtual
Returns
true if number of subpads is proper for drawing, if return false this painter will not be drawn

Reimplemented in Hal::Femto3DCFPainter, and Hal::FemtoSHCFPainter.

Definition at line 111 of file Painter.h.

◆ CleanCommonData()

void Hal::Painter::CleanCommonData ( )
protected

clean canvases if own them

Definition at line 213 of file Painter.cxx.

◆ ClearCanvas()

void Hal::Painter::ClearCanvas ( Int_t canvas)
protected

clears main pad

Definition at line 189 of file Painter.cxx.

◆ ContitionalPattern()

void Hal::Painter::ContitionalPattern ( TString & option,
TString pattern,
ULong64_t & drawOpt,
Int_t bit,
Bool_t remove = kTRUE ) const
protected

set given flag depending of pattern if "pattern" is found set bit to 1 if "!pattern" is found set bit to 0, otherwise do nothing

Parameters
optionoption
patternpattern that we want to find
drawOptflag
bitbit to set/clean
removeif true remowe pattern from string
Returns

Definition at line 174 of file Painter.cxx.

◆ GetAncestor()

Painter * Hal::Painter::GetAncestor ( ) const
protected

Definition at line 201 of file Painter.cxx.

◆ GetCanvas()

TCanvas * Hal::Painter::GetCanvas ( Int_t canvasNo = 0) const
inline
Returns
TCanvas assigned to this object (if present)

Definition at line 227 of file Painter.h.

◆ GetDrawFlags()

ULong64_t Hal::Painter::GetDrawFlags ( ) const
inlineprotected
Returns
draw flags

Definition at line 84 of file Painter.h.

◆ GetPad()

TVirtualPad * Hal::Painter::GetPad ( Int_t index,
Int_t canvasNo = 0 ) const

add subpad

Parameters
index(staring with 1) if 0 returns pointer to main pad
Returns

Definition at line 196 of file Painter.cxx.

◆ GetPadsNo()

Int_t Hal::Painter::GetPadsNo ( Int_t canvasNo = 0) const
inlineprotected
Returns
number of subpads

Definition at line 148 of file Painter.h.

◆ GetParent()

Painter * Hal::Painter::GetParent ( ) const
inline
Returns
parent if present

Definition at line 221 of file Painter.h.

◆ GetPatterns()

Bool_t Hal::Painter::GetPatterns ( TString opt,
TString flag,
std::vector< double > & vals ) const
protected

looks for patterns like {flag=val[0],val[1]..} where val[n] is a float, returns true if found

Parameters
opt
flag
vals
Returns

Definition at line 161 of file Painter.cxx.

◆ GotoPad()

void Hal::Painter::GotoPad ( Int_t no,
Int_t canvasNo = 0 )
protected

enter subpad

Parameters
no
canvasNo

Definition at line 187 of file Painter.cxx.

◆ HasParent()

Bool_t Hal::Painter::HasParent ( ) const

true if this painter have parent that own pad

Returns

Definition at line 156 of file Painter.cxx.

◆ InnerPaint()

virtual void Hal::Painter::InnerPaint ( )
inlineprotectedvirtual

inner method for pain - without checking ownership

Reimplemented in Hal::CorrFit3DCFPainter, Hal::CorrFitPainter, and Hal::FemtoCFPainter.

Definition at line 176 of file Painter.h.

◆ InnerRepaint()

virtual void Hal::Painter::InnerRepaint ( )
inlineprotectedvirtual

inner method for repaint - without checking ownership

Reimplemented in Hal::CorrFitPainter, and Hal::FemtoCFPainter.

Definition at line 172 of file Painter.h.

◆ LockPad()

void Hal::Painter::LockPad ( )
protected

keep a current gPad

Definition at line 180 of file Painter.cxx.

◆ MakeCanvasPads()

void Hal::Painter::MakeCanvasPads ( Int_t x = 1,
Int_t y = 1,
Int_t canvasNo = 0 )
protected

construct a TCanvas with pads

Parameters
x
y

Definition at line 70 of file Painter.cxx.

◆ MakePadsAndCanvases()

virtual void Hal::Painter::MakePadsAndCanvases ( )
protectedpure virtual

creates pads and canvases, should call generate subpads

Implemented in Hal::CorrFitPainter, Hal::Femto1DCFPainter, Hal::Femto3DCFPainter, and Hal::FemtoSHCFPainter.

◆ OptionsApplied()

virtual void Hal::Painter::OptionsApplied ( )
inlineprotectedvirtual

options of drawing were aplied so reset options

Definition at line 101 of file Painter.h.

◆ OwnGraphic()

Bool_t Hal::Painter::OwnGraphic ( ) const
inlineprotected

true if this painter owns main pad

Returns

Definition at line 73 of file Painter.h.

◆ Paint()

void Hal::Painter::Paint ( )

called when object needs to be draw (should be called only once), it try to paint object if object was painted calls repaint it

Definition at line 42 of file Painter.cxx.

◆ ResetFewBits()

void Hal::Painter::ResetFewBits ( ULong64_t & flag,
std::initializer_list< Int_t > bits,
Int_t set = -1 ) const
protected
Parameters
flagflag to set
bitsclear listed bits
setset this bit if set >0

Definition at line 228 of file Painter.cxx.

◆ SetDefaultFlag()

virtual void Hal::Painter::SetDefaultFlag ( )
inlineprotectedvirtual

set default drawing flag

Definition at line 105 of file Painter.h.

◆ SetFlag()

void Hal::Painter::SetFlag ( Int_t bit,
Bool_t state )
protected

set bit in drawing flag

Parameters
bit
state

Definition at line 63 of file Painter.cxx.

◆ SetFlagForced()

void Hal::Painter::SetFlagForced ( ULong64_t flag)
inlineprotected

overwrite drawing flag

Parameters
flag

Definition at line 57 of file Painter.h.

◆ SetGlobalPadStyle()

void Hal::Painter::SetGlobalPadStyle ( Hal::PadStyle & pad)

Definition at line 206 of file Painter.cxx.

◆ SetOption()

void Hal::Painter::SetOption ( TString option)
virtual

set options for drawing:

Parameters
optionoptions: html - for drawing in HTML mode NOTE - might not be implemented for all objects default - reset flags to default and add additional flags from option default! -reset flags to default and ignore rest of the option keep - keeps old flags, add only new flags skip - ignore this method
See also
SetOptionInternal:

Definition at line 124 of file Painter.cxx.

◆ SetOptionInternal()

virtual ULong64_t Hal::Painter::SetOptionInternal ( TString opt,
ULong64_t prev = 0 )
protectedpure virtual

used internally

Parameters
optoption of drawing
  • "html" - for drawing in HTML mode NOTE - might not be implemented for all objects
  • "default" - reset flags to default and add additional flags from option
  • "default!" -reset flags to default and ignore rest of the option
  • "keep" - keeps old flags, add only new flags
  • "skip" - ignore this method
  • "grid" - draw grid on all pads
prevthe staring draw flag
Returns
new draw flag

Implemented in Hal::CorrFitPainter, Hal::Femto3DCFPainter, Hal::FemtoCFPainter, and Hal::FemtoSHCFPainter.

◆ UnlockPad()

void Hal::Painter::UnlockPad ( )
protected

restore LockedPad

Definition at line 182 of file Painter.cxx.

◆ UpdateAllPads()

void Hal::Painter::UpdateAllPads ( )
protected

Definition at line 97 of file Painter.cxx.

Member Data Documentation

◆ fOptionsChanged

Bool_t Hal::Painter::fOptionsChanged = {kFALSE}
protected

this should be true if draw flags were changed

Definition at line 68 of file Painter.h.

◆ kGridBit

const int Hal::Painter::kGridBit = 1
staticprotected

Definition at line 46 of file Painter.h.

◆ kHtmlBit

const int Hal::Painter::kHtmlBit = 0
staticprotected

Definition at line 45 of file Painter.h.


The documentation for this class was generated from the following files: