CbmRoot
Loading...
Searching...
No Matches
CbmQaCmpDrawer< Obj > Class Template Reference

Class to draw a comparison of objects on the provided canvas or pad. More...

#include <CbmQaCmpDrawer.h>

Public Member Functions

 CbmQaCmpDrawer ()
 Default constructor.
 
 ~CbmQaCmpDrawer ()=default
 Destructor.
 
 CbmQaCmpDrawer (const CbmQaCmpDrawer &)=delete
 Copy constructor.
 
 CbmQaCmpDrawer (CbmQaCmpDrawer &&)=delete
 Move constructor.
 
CbmQaCmpDraweroperator= (const CbmQaCmpDrawer &)=delete
 Copy assignment operator.
 
CbmQaCmpDraweroperator= (CbmQaCmpDrawer &&)=delete
 Move assignment operator.
 
void Clear ()
 Clears the set of objects.
 
void RegisterObject (const Obj *pObj, const char *title=nullptr)
 Registers an object to draw.
 
void Draw (Option_t *opt) const
 Draw objects.
 
void SetMinimum (double min)
 Sets minimum of the histogram/graph.
 
void SetMaximum (double max)
 Sets maximum of the histogram/graph.
 

Private Attributes

double fMinimum = std::numeric_limits<double>::signaling_NaN()
 
double fMaximum = std::numeric_limits<double>::signaling_NaN()
 
std::vector< Obj * > fvpObjects
 Set of objects to be drawn.
 
std::vector< TString > fvsLegEntries
 Entries to legend.
 

Static Private Attributes

static constexpr double kLegEntryHight = 0.06
 Hight of one legend entry in Y axis.
 
static constexpr double kLegEntryWidth = 0.35
 Width of the legend.
 
static constexpr double kLegRightBound = 0.99
 Right bound of the legend.
 
static constexpr double kLegTopBound = 0.90
 Top bound of the legend.
 
static constexpr double kLegTextSize = 0.04
 Text size of the legend entries.
 
static constexpr double kIndentFromMax = 0.1
 Indent from the maximum (percentage from (max - min))
 

Detailed Description

template<class Obj>
class CbmQaCmpDrawer< Obj >

Class to draw a comparison of objects on the provided canvas or pad.

Template Parameters
ObjType of underlying objects (TH1D, TGraph, TProfile, ...)

Definition at line 29 of file CbmQaCmpDrawer.h.

Constructor & Destructor Documentation

◆ CbmQaCmpDrawer() [1/3]

template<class Obj >
CbmQaCmpDrawer< Obj >::CbmQaCmpDrawer ( )

Default constructor.

Definition at line 99 of file CbmQaCmpDrawer.h.

◆ ~CbmQaCmpDrawer()

template<class Obj >
CbmQaCmpDrawer< Obj >::~CbmQaCmpDrawer ( )
default

Destructor.

◆ CbmQaCmpDrawer() [2/3]

template<class Obj >
CbmQaCmpDrawer< Obj >::CbmQaCmpDrawer ( const CbmQaCmpDrawer< Obj > & )
delete

Copy constructor.

◆ CbmQaCmpDrawer() [3/3]

template<class Obj >
CbmQaCmpDrawer< Obj >::CbmQaCmpDrawer ( CbmQaCmpDrawer< Obj > && )
delete

Move constructor.

Member Function Documentation

◆ Clear()

template<class Obj >
void CbmQaCmpDrawer< Obj >::Clear ( )

Clears the set of objects.

Definition at line 106 of file CbmQaCmpDrawer.h.

Referenced by cbm::ca::OutputQa::DrawSetOf().

◆ Draw()

template<class Obj >
void CbmQaCmpDrawer< Obj >::Draw ( Option_t * opt) const

Draw objects.

Parameters
optDrawing option: TODO: Specify options

Definition at line 136 of file CbmQaCmpDrawer.h.

Referenced by cbm::ca::OutputQa::DrawSetOf().

◆ operator=() [1/2]

template<class Obj >
CbmQaCmpDrawer & CbmQaCmpDrawer< Obj >::operator= ( CbmQaCmpDrawer< Obj > && )
delete

Move assignment operator.

◆ operator=() [2/2]

template<class Obj >
CbmQaCmpDrawer & CbmQaCmpDrawer< Obj >::operator= ( const CbmQaCmpDrawer< Obj > & )
delete

Copy assignment operator.

◆ RegisterObject()

template<class Obj >
void CbmQaCmpDrawer< Obj >::RegisterObject ( const Obj * pObj,
const char * title = nullptr )

Registers an object to draw.

Parameters
pObjPointer to object
titleTitle of object (appears in the legend).

Definition at line 117 of file CbmQaCmpDrawer.h.

Referenced by cbm::ca::OutputQa::DrawSetOf().

◆ SetMaximum()

template<class Obj >
void CbmQaCmpDrawer< Obj >::SetMaximum ( double max)
inline

Sets maximum of the histogram/graph.

Parameters
maxMaximum

If the maximum is not set with this function, it will be set to the maximum value of the objects, multiplied by the value (1. + kIndentFromMax), which is 1.1 by default

Definition at line 73 of file CbmQaCmpDrawer.h.

References CbmQaCmpDrawer< Obj >::fMaximum, and max().

◆ SetMinimum()

template<class Obj >
void CbmQaCmpDrawer< Obj >::SetMinimum ( double min)
inline

Sets minimum of the histogram/graph.

Parameters
minMinimum

If the minimum is not set with this function, it will be set to 0 or the minimal value of the objects

Definition at line 66 of file CbmQaCmpDrawer.h.

References CbmQaCmpDrawer< Obj >::fMinimum, and min().

Referenced by cbm::ca::OutputQa::DrawSetOf().

Member Data Documentation

◆ fMaximum

template<class Obj >
double CbmQaCmpDrawer< Obj >::fMaximum = std::numeric_limits<double>::signaling_NaN()
private

Definition at line 85 of file CbmQaCmpDrawer.h.

Referenced by CbmQaCmpDrawer< Obj >::SetMaximum().

◆ fMinimum

template<class Obj >
double CbmQaCmpDrawer< Obj >::fMinimum = std::numeric_limits<double>::signaling_NaN()
private

Definition at line 84 of file CbmQaCmpDrawer.h.

Referenced by CbmQaCmpDrawer< Obj >::SetMinimum().

◆ fvpObjects

template<class Obj >
std::vector<Obj*> CbmQaCmpDrawer< Obj >::fvpObjects
private

Set of objects to be drawn.

Definition at line 87 of file CbmQaCmpDrawer.h.

◆ fvsLegEntries

template<class Obj >
std::vector<TString> CbmQaCmpDrawer< Obj >::fvsLegEntries
private

Entries to legend.

Definition at line 88 of file CbmQaCmpDrawer.h.

◆ kIndentFromMax

template<class Obj >
double CbmQaCmpDrawer< Obj >::kIndentFromMax = 0.1
staticconstexprprivate

Indent from the maximum (percentage from (max - min))

Definition at line 82 of file CbmQaCmpDrawer.h.

◆ kLegEntryHight

template<class Obj >
double CbmQaCmpDrawer< Obj >::kLegEntryHight = 0.06
staticconstexprprivate

Hight of one legend entry in Y axis.

Definition at line 77 of file CbmQaCmpDrawer.h.

◆ kLegEntryWidth

template<class Obj >
double CbmQaCmpDrawer< Obj >::kLegEntryWidth = 0.35
staticconstexprprivate

Width of the legend.

Definition at line 78 of file CbmQaCmpDrawer.h.

◆ kLegRightBound

template<class Obj >
double CbmQaCmpDrawer< Obj >::kLegRightBound = 0.99
staticconstexprprivate

Right bound of the legend.

Definition at line 79 of file CbmQaCmpDrawer.h.

◆ kLegTextSize

template<class Obj >
double CbmQaCmpDrawer< Obj >::kLegTextSize = 0.04
staticconstexprprivate

Text size of the legend entries.

Definition at line 81 of file CbmQaCmpDrawer.h.

◆ kLegTopBound

template<class Obj >
double CbmQaCmpDrawer< Obj >::kLegTopBound = 0.90
staticconstexprprivate

Top bound of the legend.

Definition at line 80 of file CbmQaCmpDrawer.h.


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