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

Core class for CBM QA checker framework (declaration) More...

#include <CbmQaCheckerCore.h>

Public Member Functions

 Core ()
 Default ctor.
 
 ~Core ()=default
 Destructor.
 
 Core (const Core &)=delete
 Copy constructor.
 
 Core (Core &&)=delete
 Move constructor.
 
Coreoperator= (const Core &)=delete
 Copy assignment operator.
 
Coreoperator= (Core &&)=delete
 Move assignment operator.
 
void AddVersion (const char *label, const char *path)
 Adds a version of QA output for a comparison.
 
void AddDataset (const char *datasetName)
 Adds a dataset name.
 
int Process (Option_t *comparisonMethod="E")
 Runs checking routine.
 
void RegisterOutFile (const char *filename)
 Registers root-file for storing output.
 
void SetDefaultVersion (const char *defaultLabel)
 Sets default version label.
 
void SetFromYAML (const char *configName)
 Sets checker configuration from YAML file.
 
void SetInputRootPath (const char *pathName)
 Sets root path to input files.
 
void SetPvalThreshold (double pVal)
 Sets P-value threshold.
 
void SetRatioRange (double min, double max)
 Sets ratio accepted range.
 

Private Member Functions

void PrepareOutputFile ()
 Prepares output file (creates directory structure)
 

Private Attributes

std::shared_ptr< ObjectDBfpObjDB = nullptr
 Database of names.
 

Detailed Description

Core class for CBM QA checker framework (declaration)

Class CbmQaCheckerCore defines a core of the QA checker framework and provides a user interface for the comparison routine execution

Definition at line 30 of file CbmQaCheckerCore.h.

Constructor & Destructor Documentation

◆ Core() [1/3]

Core::Core ( )

Default ctor.

Definition at line 23 of file CbmQaCheckerCore.cxx.

References fpObjDB.

◆ ~Core()

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

Destructor.

◆ Core() [2/3]

cbm::qa::checker::Core::Core ( const Core & )
delete

Copy constructor.

◆ Core() [3/3]

cbm::qa::checker::Core::Core ( Core && )
delete

Move constructor.

Member Function Documentation

◆ AddDataset()

void Core::AddDataset ( const char * datasetName)

Adds a dataset name.

Parameters
datasetNameName of dataset

Definition at line 35 of file CbmQaCheckerCore.cxx.

References fpObjDB.

◆ AddVersion()

void Core::AddVersion ( const char * label,
const char * path )

Adds a version of QA output for a comparison.

Parameters
labelLabel of the version
pathPath to the QA output directory for this version

Definition at line 31 of file CbmQaCheckerCore.cxx.

References fpObjDB.

◆ operator=() [1/2]

Core & cbm::qa::checker::Core::operator= ( const Core & )
delete

Copy assignment operator.

◆ operator=() [2/2]

Core & cbm::qa::checker::Core::operator= ( Core && )
delete

Move assignment operator.

◆ PrepareOutputFile()

void Core::PrepareOutputFile ( )
private

Prepares output file (creates directory structure)

Definition at line 95 of file CbmQaCheckerCore.cxx.

References fpObjDB.

Referenced by Process().

◆ Process()

int Core::Process ( Option_t * comparisonMethod = "E")

Runs checking routine.

Parameters
optOption: "B": suppress canvas creation "F": forces canvas creation (even if there is no difference) "R": draw ratio on canvas "D": draw difference on canvas "E": enables exact comparison "S": enables statistical hypothesis test, where is possible "U": enables ratio comparison
Returns
0: All versions are identical
1: Some checks for some histograms did not pass, but the histograms are consistent
2: Some histograms are different

Definition at line 47 of file CbmQaCheckerCore.cxx.

References fpObjDB, PrepareOutputFile(), cbm::qa::checker::StronglyEqual, and cbm::qa::checker::ToString().

◆ RegisterOutFile()

void Core::RegisterOutFile ( const char * filename)

Registers root-file for storing output.

Parameters
filenameName of file

Definition at line 39 of file CbmQaCheckerCore.cxx.

References fpObjDB.

◆ SetDefaultVersion()

void cbm::qa::checker::Core::SetDefaultVersion ( const char * defaultLabel)
inline

Sets default version label.

Parameters
defaultLabelName of default label

If the default version is not provided, the first version will be used as the default one.

Definition at line 82 of file CbmQaCheckerCore.h.

References fpObjDB.

◆ SetFromYAML()

void Core::SetFromYAML ( const char * configName)

Sets checker configuration from YAML file.

Parameters
configNameName of YAML configuration file

Definition at line 91 of file CbmQaCheckerCore.cxx.

References fpObjDB.

◆ SetInputRootPath()

void cbm::qa::checker::Core::SetInputRootPath ( const char * pathName)
inline

Sets root path to input files.

Parameters
pathNameRelative or absolute root path to input the input directories

Definition at line 90 of file CbmQaCheckerCore.h.

References fpObjDB.

◆ SetPvalThreshold()

void cbm::qa::checker::Core::SetPvalThreshold ( double pVal)
inline

Sets P-value threshold.

Parameters
pValP-value threshold

Definition at line 94 of file CbmQaCheckerCore.h.

References fpObjDB.

◆ SetRatioRange()

void cbm::qa::checker::Core::SetRatioRange ( double min,
double max )
inline

Sets ratio accepted range.

Parameters
minLower boundary
maxUpper boundary

Definition at line 99 of file CbmQaCheckerCore.h.

References fpObjDB.

Member Data Documentation

◆ fpObjDB

std::shared_ptr<ObjectDB> cbm::qa::checker::Core::fpObjDB = nullptr
private

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