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

Class to compare histograms of the QA task with default ones. More...

#include <CbmQaCompare.h>

Collaboration diagram for CbmQaCompare< Obj >:
[legend]

Classes

struct  Result
 

Public Member Functions

 CbmQaCompare (const Obj *pHistL, const Obj *pHistR, int verbose)
 Constructor.
 
 ~CbmQaCompare ()
 Destructor.
 
Result operator() (const std::string &opt, const std::string &optStat="UU") const
 Compares two histograms, returns a comparison status.
 
TCanvas * GetComparisonCanvas (const std::string &opt)
 Creates a comparison canvas.
 
void SetObjectLabels (const std::string &labelL, const std::string &labelR)
 Set version lables.
 

Private Attributes

const Obj * fpObjL = nullptr
 Left (new) histogram.
 
const Obj * fpObjR = nullptr
 Right (default) histogram.
 
std::string fsLabelL = "this"
 
std::string fsLabelR = "default"
 
int fVerbose = 0
 Verbosity.
 

Detailed Description

template<class Obj>
class CbmQaCompare< Obj >

Class to compare histograms of the QA task with default ones.

Template Parameters
ObjRoot object type

Definition at line 22 of file CbmQaCompare.h.

Constructor & Destructor Documentation

◆ CbmQaCompare()

template<class Obj >
CbmQaCompare< Obj >::CbmQaCompare ( const Obj * pHistL,
const Obj * pHistR,
int verbose )

Constructor.

Parameters
pHistLLeft object
pHistRRight object
verboseVerbosity level

Definition at line 35 of file CbmQaCompare.cxx.

◆ ~CbmQaCompare()

template<class Obj >
CbmQaCompare< Obj >::~CbmQaCompare ( )

Destructor.

Definition at line 45 of file CbmQaCompare.cxx.

Member Function Documentation

◆ GetComparisonCanvas()

template<class Obj >
TCanvas * CbmQaCompare< Obj >::GetComparisonCanvas ( const std::string & opt)

Creates a comparison canvas.

Parameters
optCanvas options
  • d: draw difference
  • r: draw ratio

Definition at line 152 of file CbmQaCompare.cxx.

◆ operator()()

template<class Obj >
CbmQaCompare< Obj >::Result CbmQaCompare< Obj >::operator() ( const std::string & opt,
const std::string & optStat = "UU" ) const

Compares two histograms, returns a comparison status.

Parameters
optComparison options
  • p: point-by-point
  • r: ratio
  • s[opt]: stat-test
optStatOption for the stat. test (see TH1 documentation)
Returns
Comparison results. By default the result is true

Definition at line 52 of file CbmQaCompare.cxx.

References CbmQaCompare< Obj >::Result::fChi2NDF, CbmQaCompare< Obj >::Result::fConsistent, CbmQaCompare< Obj >::Result::fPointByPoint, CbmQaCompare< Obj >::Result::fRatioLo, and CbmQaCompare< Obj >::Result::fRatioUp.

◆ SetObjectLabels()

template<class Obj >
void CbmQaCompare< Obj >::SetObjectLabels ( const std::string & labelL,
const std::string & labelR )

Set version lables.

Parameters
labelLLeft object label
labelRRight object label

Definition at line 266 of file CbmQaCompare.cxx.

Member Data Documentation

◆ fpObjL

template<class Obj >
const Obj* CbmQaCompare< Obj >::fpObjL = nullptr
private

Left (new) histogram.

Definition at line 62 of file CbmQaCompare.h.

◆ fpObjR

template<class Obj >
const Obj* CbmQaCompare< Obj >::fpObjR = nullptr
private

Right (default) histogram.

Definition at line 63 of file CbmQaCompare.h.

◆ fsLabelL

template<class Obj >
std::string CbmQaCompare< Obj >::fsLabelL = "this"
private

Definition at line 64 of file CbmQaCompare.h.

◆ fsLabelR

template<class Obj >
std::string CbmQaCompare< Obj >::fsLabelR = "default"
private

Definition at line 65 of file CbmQaCompare.h.

◆ fVerbose

template<class Obj >
int CbmQaCompare< Obj >::fVerbose = 0
private

Verbosity.

Definition at line 66 of file CbmQaCompare.h.


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