CbmRoot
Loading...
Searching...
No Matches
cbm::qa::checker::ObjectHandler Class Referenceabstract

Base abstract class for object handler. More...

#include <CbmQaCheckerObjectHandler.h>

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

Public Member Functions

 ObjectHandler (int iObject, int iFile, int iDataset, const char *objType="")
 Default constructor.
 
virtual ~ObjectHandler ()
 Destructor.
 
void AddObjects (const std::vector< TNamed * > &vpObj)
 Adds vector of pointer to objects.
 
virtual void CreateCanvases (Option_t *)
 Creates object comparison canvas.
 
virtual ECmpInference Compare (int iVersion) const =0
 Compares objects to default.
 
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

Base abstract class for object handler.

The class provides interface for handling objects of the same type, obtained under different versions of the code base.

Definition at line 31 of file CbmQaCheckerObjectHandler.h.

Constructor & Destructor Documentation

◆ ObjectHandler()

ObjectHandler::ObjectHandler ( int iObject,
int iFile,
int iDataset,
const char * objType = "" )

Default constructor.

Parameters
iObjectIndex of object
iFileIndex of file
iDatasetIndex of dataset
objTypeType of the handled objects

Definition at line 22 of file CbmQaCheckerObjectHandler.cxx.

◆ ~ObjectHandler()

ObjectHandler::~ObjectHandler ( )
virtual

Destructor.

Definition at line 32 of file CbmQaCheckerObjectHandler.cxx.

References fvpObjects.

Member Function Documentation

◆ AddObjects()

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

Adds vector of pointer to objects.

Parameters
vpObjVector of pointers to TNamed objects

Definition at line 44 of file CbmQaCheckerObjectHandler.cxx.

References fpObjDB, fpOutDir, fsBaseName, and fvpObjects.

◆ Compare()

virtual ECmpInference cbm::qa::checker::ObjectHandler::Compare ( int iVersion) const
pure virtual

Compares objects to default.

Parameters
iVersionVersion index
Returns
Comparison inference

Implemented in cbm::qa::checker::Hist1DHandler.

Referenced by CompareWithDefault().

◆ CompareWithDefault()

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

Compares different versions with default.

Returns
Vector of comparison inferences for different versions

Definition at line 70 of file CbmQaCheckerObjectHandler.cxx.

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

◆ CreateCanvases()

virtual void cbm::qa::checker::ObjectHandler::CreateCanvases ( Option_t * )
inlinevirtual

Creates object comparison canvas.

Parameters
optCanvas options

Reimplemented in cbm::qa::checker::Hist1DHandler, cbm::qa::checker::Hist2DHandler, and cbm::qa::checker::Profile1DHandler.

Definition at line 49 of file CbmQaCheckerObjectHandler.h.

◆ SetComparisonMethod()

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

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

◆ SetObjectDB()

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

Sets objects database.

Parameters
pObjDBShared pointer to object database

Definition at line 66 of file CbmQaCheckerObjectHandler.h.

References fpObjDB.

◆ SetOutputDirectory()

void ObjectHandler::SetOutputDirectory ( TDirectory * pDir)

Sets folder to store output.

Parameters
pDirPointer to folder instance

Definition at line 86 of file CbmQaCheckerObjectHandler.cxx.

References fpOutDir.

◆ Write()

void ObjectHandler::Write ( )

Writes objects to file.

Definition at line 94 of file CbmQaCheckerObjectHandler.cxx.

References fpCanvas, fpOutDir, and fvpObjects.

Member Data Documentation

◆ fCmpBits

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

Bitset for comparison methods.

Definition at line 88 of file CbmQaCheckerObjectHandler.h.

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

◆ fDatasetID

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

Index of dataset.

Definition at line 86 of file CbmQaCheckerObjectHandler.h.

Referenced by cbm::qa::checker::Hist1DHandler::Compare().

◆ fFileID

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

Index of file.

Definition at line 85 of file CbmQaCheckerObjectHandler.h.

Referenced by cbm::qa::checker::Hist1DHandler::Compare().

◆ fObjectID

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

Index of object.

Definition at line 84 of file CbmQaCheckerObjectHandler.h.

Referenced by cbm::qa::checker::Hist1DHandler::Compare().

◆ fpCanvas

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

◆ fpObjDB

◆ fpOutDir

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

Pointer to directory.

Definition at line 83 of file CbmQaCheckerObjectHandler.h.

Referenced by AddObjects(), cbm::qa::checker::Hist1DHandler::CreateCanvases(), SetOutputDirectory(), and Write().

◆ fsBaseName

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

◆ fsObjType

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

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: