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::FigureHStack Class Reference

Figure class for THStack. More...

#include "NAGASH/FigureTool.h"

Inheritance diagram for NAGASH::FigureHStack:
NAGASH::FigureElement

Public Member Functions

virtual ~FigureHStack ()
 
virtual void DrawElement () override
 
void DrawTotalHist (const TString &option, std::function< void(TH1D *)> optionfunc=[](TH1D *) {})
 Whether draw the total hist of the hstack.
 
TH1D * GetTotalHist ()
 
void Rebin (int)
 Rebin the histogram.
 
void Scale (double)
 Scale the histogram.
 
virtual void SetStyle () override
 
- 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)
 
virtual void CD ()
 
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)
 
std::shared_ptr< FigureElementTraceElement (const TString &name)
 

Private Member Functions

 FigureHStack (std::shared_ptr< MSGTool > MSG, std::shared_ptr< FigureStyleHelper > shelper, const TString &elementname, const std::vector< TString > &linkhists, const TString &option, FigureElement *mother)
 
void CalculateTotalHist ()
 
THStack * GetHist ()
 
std::pair< double, double > GetMinAndMax (double, double)
 

Private Attributes

bool draw_total_hist = false
 
TString DrawOption
 
TH1D * empty_hist = nullptr
 
std::vector< TString > LinkedHists
 
THStack * myhstack = nullptr
 
TH1D * total_hist = nullptr
 
TString total_hist_drawoption
 
TGraphErrors * total_hist_graph = nullptr
 
std::function< void(TH1D *)> total_hist_optionfunc
 

Friends

class FigureCanvas
 
class FigurePad
 
class FigureStyleHelper
 

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 THStack.

Definition at line 179 of file FigureTool.h.

Constructor & Destructor Documentation

◆ ~FigureHStack()

FigureHStack::~FigureHStack ( )
virtual

Definition at line 1564 of file FigureTool.cxx.

◆ FigureHStack()

FigureHStack::FigureHStack ( std::shared_ptr< MSGTool MSG,
std::shared_ptr< FigureStyleHelper shelper,
const TString &  elementname,
const std::vector< TString > &  linkhists,
const TString &  option,
FigureElement mother 
)
private

Definition at line 1334 of file FigureTool.cxx.

Member Function Documentation

◆ CalculateTotalHist()

void FigureHStack::CalculateTotalHist ( )
private

Definition at line 1438 of file FigureTool.cxx.

◆ DrawElement()

void FigureHStack::DrawElement ( )
overridevirtual

Reimplemented from NAGASH::FigureElement.

Definition at line 1373 of file FigureTool.cxx.

◆ DrawTotalHist()

void FigureHStack::DrawTotalHist ( const TString &  option,
std::function< void(TH1D *)>  optionfunc = [](TH1D *) {} 
)

Whether draw the total hist of the hstack.

Parameters
optionoption for drawing the total hist.
optionfuncuser-defined function for adjusting the style of the total hist, takes the pointer of TH1D as input.

Definition at line 1425 of file FigureTool.cxx.

◆ GetHist()

THStack * NAGASH::FigureHStack::GetHist ( )
inlineprivate

Definition at line 217 of file FigureTool.h.

◆ GetMinAndMax()

std::pair< double, double > FigureHStack::GetMinAndMax ( double  xmin,
double  xmax 
)
private

Definition at line 1478 of file FigureTool.cxx.

◆ GetTotalHist()

TH1D * FigureHStack::GetTotalHist ( )

Definition at line 1432 of file FigureTool.cxx.

◆ Rebin()

void FigureHStack::Rebin ( int  num)

Rebin the histogram.

Definition at line 1536 of file FigureTool.cxx.

◆ Scale()

void FigureHStack::Scale ( double  factor)

Scale the histogram.

Definition at line 1510 of file FigureTool.cxx.

◆ SetStyle()

void FigureHStack::SetStyle ( )
overridevirtual

Reimplemented from NAGASH::FigureElement.

Definition at line 1345 of file FigureTool.cxx.

Friends And Related Symbol Documentation

◆ FigureCanvas

friend class FigureCanvas
friend

Definition at line 182 of file FigureTool.h.

◆ FigurePad

friend class FigurePad
friend

Definition at line 181 of file FigureTool.h.

◆ FigureStyleHelper

friend class FigureStyleHelper
friend

Definition at line 183 of file FigureTool.h.

Member Data Documentation

◆ draw_total_hist

bool NAGASH::FigureHStack::draw_total_hist = false
private

Definition at line 212 of file FigureTool.h.

◆ DrawOption

TString NAGASH::FigureHStack::DrawOption
private

Definition at line 204 of file FigureTool.h.

◆ empty_hist

TH1D* NAGASH::FigureHStack::empty_hist = nullptr
private

Definition at line 208 of file FigureTool.h.

◆ LinkedHists

std::vector<TString> NAGASH::FigureHStack::LinkedHists
private

Definition at line 205 of file FigureTool.h.

◆ myhstack

THStack* NAGASH::FigureHStack::myhstack = nullptr
private

Definition at line 203 of file FigureTool.h.

◆ total_hist

TH1D* NAGASH::FigureHStack::total_hist = nullptr
private

Definition at line 209 of file FigureTool.h.

◆ total_hist_drawoption

TString NAGASH::FigureHStack::total_hist_drawoption
private

Definition at line 213 of file FigureTool.h.

◆ total_hist_graph

TGraphErrors* NAGASH::FigureHStack::total_hist_graph = nullptr
private

Definition at line 210 of file FigureTool.h.

◆ total_hist_optionfunc

std::function<void(TH1D *)> NAGASH::FigureHStack::total_hist_optionfunc
private

Definition at line 214 of file FigureTool.h.


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