NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
NAGASH::FigureCanvas Class Reference

Figure class for TCanvas. A canvas is the base of your figure where you can define multiple NAGASH::FigurePad objects for drawing all the ingredients. More...

#include "NAGASH/FigureTool.h"

Inheritance diagram for NAGASH::FigureCanvas:
NAGASH::FigureElement

Public Member Functions

virtual ~FigureCanvas ()
 
std::shared_ptr< FigurePadBookPad (const TString &padname, int lbx, int lby, int rtx, int rty, std::function< void(TPad *)> optionfunc=[](TPad *) {})
 Book a FigurePad in this canvas.
 
std::shared_ptr< FigurePadBookPadNDC (const TString &padname, double lbx, double lby, double rtx, double rty, std::function< void(TPad *)> optionfunc=[](TPad *) {})
 Book a FigurePad in this canvas. The position is given in relative coordinates.
 
virtual void CD () override
 
virtual void DrawElement () override
 
void SaveAs (const TString &filename)
 
- Public Member Functions inherited from NAGASH::FigureElement
 FigureElement (std::shared_ptr< MSGTool > MSG, std::shared_ptr< FigureStyleHelper > shelper, const TString &elementname, const TString &tyname, FigureElement *mother=0)
 
void Draw ()
 
std::shared_ptr< FigureElementFindLinkElement (const TString &name)
 
std::shared_ptr< FigureElementGetLinkElement (int index)
 
int GetLinkIndex (const TString &name)
 
FigureElementGetMotherElement ()
 
TString GetName ()
 
int GetNLinkElement ()
 
FigureElementGetRootElement ()
 
TString GetTypeName ()
 
bool IsType (const TString &tyname)
 
virtual void SetStyle ()
 
std::shared_ptr< FigureElementTraceElement (const TString &name)
 

Private Member Functions

 FigureCanvas (std::shared_ptr< MSGTool > MSG, std::shared_ptr< FigureStyleHelper > shelper, const TString &elementname, int npx, int npy)
 

Private Attributes

TCanvas * mycanvas = nullptr
 

Friends

class FigureTool
 

Additional Inherited Members

- Public Attributes inherited from NAGASH::FigureElement
FigureSquareRange Range_Total
 
- Protected Member Functions inherited from NAGASH::FigureElement
bool CheckDuplicate (const TString &name)
 
bool Contain (FigureSquareRange A, FigureSquareRange SubA)
 
bool Contain (std::shared_ptr< FigureElement > subelement)
 
std::shared_ptr< MSGToolMSGUser ()
 
std::shared_ptr< FigureStyleHelperStyleUser ()
 
- Protected Attributes inherited from NAGASH::FigureElement
std::deque< std::shared_ptr< FigureElement > > LinkedElement
 
std::map< TString, uint64_t > MapLinkedElement
 
FigureElementMotherElement
 
std::vector< FigureSquareRangeRange_vec
 

Detailed Description

Figure class for TCanvas. A canvas is the base of your figure where you can define multiple NAGASH::FigurePad objects for drawing all the ingredients.

Definition at line 489 of file FigureTool.h.

Constructor & Destructor Documentation

◆ ~FigureCanvas()

FigureCanvas::~FigureCanvas ( )
virtual

Definition at line 2312 of file FigureTool.cxx.

◆ FigureCanvas()

FigureCanvas::FigureCanvas ( std::shared_ptr< MSGTool MSG,
std::shared_ptr< FigureStyleHelper shelper,
const TString &  elementname,
int  npx,
int  npy 
)
private

Definition at line 2299 of file FigureTool.cxx.

Member Function Documentation

◆ BookPad()

std::shared_ptr< FigurePad > FigureCanvas::BookPad ( const TString &  padname,
int  lbx,
int  lby,
int  rtx,
int  rty,
std::function< void(TPad *)>  optionfunc = [](TPad *) {} 
)

Book a FigurePad in this canvas.

Parameters
padnamename of the pad.
lbxleft-bottom x position of the pad.
lbyleft-bottom y position of the pad.
rtxright-top x position of the pad.
rtyright-top y position of the pad.
optionfuncuser-defined function to draw the pad, passed to TPad::Draw().
Returns
the pointer to the FigurePad object.

Definition at line 2337 of file FigureTool.cxx.

◆ BookPadNDC()

std::shared_ptr< FigurePad > FigureCanvas::BookPadNDC ( const TString &  padname,
double  lbx,
double  lby,
double  rtx,
double  rty,
std::function< void(TPad *)>  optionfunc = [](TPad *) {} 
)

Book a FigurePad in this canvas. The position is given in relative coordinates.

Parameters
padnamename of the pad.
lbxleft-bottom x position of the pad in relative coordinates(0 to 1).
lbyleft-bottom y position of the pad in relative coordinates(0 to 1).
rtxright-top x position of the pad in relative coordinates (0 to 1).
rtyright-top y position of the pad in relative coordinates (0 to 1).
optionfuncuser-defined function to draw the pad, passed to TPad::Draw().
Returns
the pointer to the FigurePad object.

Definition at line 2358 of file FigureTool.cxx.

◆ CD()

void FigureCanvas::CD ( )
overridevirtual

Reimplemented from NAGASH::FigureElement.

Definition at line 2324 of file FigureTool.cxx.

◆ DrawElement()

void FigureCanvas::DrawElement ( )
overridevirtual

Reimplemented from NAGASH::FigureElement.

Definition at line 2317 of file FigureTool.cxx.

◆ SaveAs()

void NAGASH::FigureCanvas::SaveAs ( const TString &  filename)
inline

Definition at line 509 of file FigureTool.h.

Friends And Related Symbol Documentation

◆ FigureTool

friend class FigureTool
friend

Definition at line 491 of file FigureTool.h.

Member Data Documentation

◆ mycanvas

TCanvas* NAGASH::FigureCanvas::mycanvas = nullptr
private

Definition at line 506 of file FigureTool.h.


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