CbmRoot
Loading...
Searching...
No Matches
cbm::qa::checker::Hist1DHandler Class Reference

Handler for 1D-histograms. More...

#include <CbmQaCheckerHist1DHandler.h>

Inheritance diagram for cbm::qa::checker::Hist1DHandler:
[legend]
Collaboration diagram for cbm::qa::checker::Hist1DHandler:
[legend]

Public Member Functions

 Hist1DHandler (int iObject, int iFile, int iDataset)
 Constructor.
 
 ~Hist1DHandler ()=default
 Destructor.
 
ECmpInference Compare (int iVersion) const override
 Compares objects to default.
 
void CreateCanvases (Option_t *opt="") override
 Creates object comparison canvas.
 
void AddObjects (const std::vector< TNamed * > &vpObj)
 Adds vector of pointer to objects.
 
std::vector< ECmpInferenceCompareWithDefault ()
 Compares different versions with default.
 
void SetOutputDirectory (TDirectory *pDir)
 Sets folder to store output.
 
void SetObjectDB (std::shared_ptr< ObjectDB > &pObjDB)
 Sets objects database.
 
void SetComparisonMethod (ECmpMethod method)
 Sets bit flag to control handler behaviour.
 
void Write ()
 Writes objects to file.
 

Protected Attributes

std::string fsObjType {""}
 Base type of the object to be handled.
 
std::string fsBaseName {""}
 Base names of the object.
 
std::vector< TNamed * > fvpObjects
 Vector of objects.
 
std::shared_ptr< ObjectDBfpObjDB {nullptr}
 Pointer to object database.
 
std::shared_ptr< TCanvas > fpCanvas {nullptr}
 Comparison canvas.
 
TDirectory * fpOutDir {nullptr}
 Pointer to directory.
 
int fObjectID {-1}
 Index of object.
 
int fFileID {-1}
 Index of file.
 
int fDatasetID {-1}
 Index of dataset.
 
std::bitset< static_cast< size_t >(ECmpMethod::END)> fCmpBits
 Bitset for comparison methods.
 

Detailed Description

Handler for 1D-histograms.

The handler keeps one-dimensional histogram objects of the same quantity within different code versions and provides several comparison methods including point-by-point comparison, test of ratio deviation and statistical hypothesis tests (Chi2 test).

Definition at line 29 of file CbmQaCheckerHist1DHandler.h.

Constructor & Destructor Documentation

◆ Hist1DHandler()

Hist1DHandler::Hist1DHandler ( int iObject,
int iFile,
int iDataset )

Constructor.

Parameters
iObjectIndex of object
iFileIndex of file
iDatasetIndex of dataset

Definition at line 33 of file CbmQaCheckerHist1DHandler.cxx.

◆ ~Hist1DHandler()

cbm::qa::checker::Hist1DHandler::~Hist1DHandler ( )
default

Destructor.

Member Function Documentation

◆ AddObjects()

void ObjectHandler::AddObjects ( const std::vector< TNamed * > & vpObj)
inherited

Adds vector of pointer to objects.

Parameters
vpObjVector of pointers to TNamed objects

Definition at line 44 of file CbmQaCheckerObjectHandler.cxx.

References cbm::qa::checker::ObjectHandler::fpObjDB, cbm::qa::checker::ObjectHandler::fpOutDir, cbm::qa::checker::ObjectHandler::fsBaseName, and cbm::qa::checker::ObjectHandler::fvpObjects.

◆ Compare()

◆ CompareWithDefault()

std::vector< ECmpInference > ObjectHandler::CompareWithDefault ( )
inherited

Compares different versions with default.

Returns
Vector of comparison inferences for different versions

Definition at line 70 of file CbmQaCheckerObjectHandler.cxx.

References cbm::qa::checker::ObjectHandler::Compare(), cbm::qa::checker::ObjectHandler::fpObjDB, cbm::qa::checker::ObjectHandler::fvpObjects, and cbm::qa::checker::StronglyEqual.

◆ CreateCanvases()

void Hist1DHandler::CreateCanvases ( Option_t * opt = "")
overridevirtual

◆ SetComparisonMethod()

void cbm::qa::checker::ObjectHandler::SetComparisonMethod ( ECmpMethod method)
inlineinherited

Sets bit flag to control handler behaviour.

Parameters
bitBit index

The bit flags should be defined in an enumeration of the default class

Definition at line 72 of file CbmQaCheckerObjectHandler.h.

References cbm::qa::checker::ObjectHandler::fCmpBits.

◆ SetObjectDB()

void cbm::qa::checker::ObjectHandler::SetObjectDB ( std::shared_ptr< ObjectDB > & pObjDB)
inlineinherited

Sets objects database.

Parameters
pObjDBShared pointer to object database

Definition at line 66 of file CbmQaCheckerObjectHandler.h.

References cbm::qa::checker::ObjectHandler::fpObjDB.

◆ SetOutputDirectory()

void ObjectHandler::SetOutputDirectory ( TDirectory * pDir)
inherited

Sets folder to store output.

Parameters
pDirPointer to folder instance

Definition at line 86 of file CbmQaCheckerObjectHandler.cxx.

References cbm::qa::checker::ObjectHandler::fpOutDir.

◆ Write()

void ObjectHandler::Write ( )
inherited

Member Data Documentation

◆ fCmpBits

std::bitset<static_cast<size_t>(ECmpMethod::END)> cbm::qa::checker::ObjectHandler::fCmpBits
protectedinherited

Bitset for comparison methods.

Definition at line 88 of file CbmQaCheckerObjectHandler.h.

Referenced by Compare(), and cbm::qa::checker::ObjectHandler::SetComparisonMethod().

◆ fDatasetID

int cbm::qa::checker::ObjectHandler::fDatasetID {-1}
protectedinherited

Index of dataset.

Definition at line 86 of file CbmQaCheckerObjectHandler.h.

Referenced by Compare().

◆ fFileID

int cbm::qa::checker::ObjectHandler::fFileID {-1}
protectedinherited

Index of file.

Definition at line 85 of file CbmQaCheckerObjectHandler.h.

Referenced by Compare().

◆ fObjectID

int cbm::qa::checker::ObjectHandler::fObjectID {-1}
protectedinherited

Index of object.

Definition at line 84 of file CbmQaCheckerObjectHandler.h.

Referenced by Compare().

◆ fpCanvas

std::shared_ptr<TCanvas> cbm::qa::checker::ObjectHandler::fpCanvas {nullptr}
protectedinherited

◆ fpObjDB

◆ fpOutDir

TDirectory* cbm::qa::checker::ObjectHandler::fpOutDir {nullptr}
protectedinherited

◆ fsBaseName

std::string cbm::qa::checker::ObjectHandler::fsBaseName {""}
protectedinherited

◆ fsObjType

std::string cbm::qa::checker::ObjectHandler::fsObjType {""}
protectedinherited

Base type of the object to be handled.

Definition at line 78 of file CbmQaCheckerObjectHandler.h.

◆ fvpObjects


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