CbmRoot
|
Base abstract class for object handler. More...
#include <CbmQaCheckerObjectHandler.h>
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< ECmpInference > | CompareWithDefault () |
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< ObjectDB > | fpObjDB {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. | |
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.
ObjectHandler::ObjectHandler | ( | int | iObject, |
int | iFile, | ||
int | iDataset, | ||
const char * | objType = "" ) |
Default constructor.
iObject | Index of object |
iFile | Index of file |
iDataset | Index of dataset |
objType | Type of the handled objects |
Definition at line 22 of file CbmQaCheckerObjectHandler.cxx.
|
virtual |
void ObjectHandler::AddObjects | ( | const std::vector< TNamed * > & | vpObj | ) |
Adds vector of pointer to objects.
vpObj | Vector of pointers to TNamed objects |
Definition at line 44 of file CbmQaCheckerObjectHandler.cxx.
References fpObjDB, fpOutDir, fsBaseName, and fvpObjects.
|
pure virtual |
Compares objects to default.
iVersion | Version index |
Implemented in cbm::qa::checker::Hist1DHandler.
Referenced by CompareWithDefault().
std::vector< ECmpInference > ObjectHandler::CompareWithDefault | ( | ) |
Compares different versions with default.
Definition at line 70 of file CbmQaCheckerObjectHandler.cxx.
References Compare(), fpObjDB, fvpObjects, and cbm::qa::checker::StronglyEqual.
|
inlinevirtual |
Creates object comparison canvas.
opt | Canvas options |
Reimplemented in cbm::qa::checker::Hist1DHandler, cbm::qa::checker::Hist2DHandler, and cbm::qa::checker::Profile1DHandler.
Definition at line 49 of file CbmQaCheckerObjectHandler.h.
|
inline |
Sets bit flag to control handler behaviour.
bit | Bit index |
The bit flags should be defined in an enumeration of the default class
Definition at line 72 of file CbmQaCheckerObjectHandler.h.
References fCmpBits.
|
inline |
Sets objects database.
pObjDB | Shared pointer to object database |
Definition at line 66 of file CbmQaCheckerObjectHandler.h.
References fpObjDB.
void ObjectHandler::SetOutputDirectory | ( | TDirectory * | pDir | ) |
Sets folder to store output.
pDir | Pointer to folder instance |
Definition at line 86 of file CbmQaCheckerObjectHandler.cxx.
References fpOutDir.
void ObjectHandler::Write | ( | ) |
Writes objects to file.
Definition at line 94 of file CbmQaCheckerObjectHandler.cxx.
References fpCanvas, fpOutDir, and fvpObjects.
|
protected |
Bitset for comparison methods.
Definition at line 88 of file CbmQaCheckerObjectHandler.h.
Referenced by cbm::qa::checker::Hist1DHandler::Compare(), and SetComparisonMethod().
|
protected |
Index of dataset.
Definition at line 86 of file CbmQaCheckerObjectHandler.h.
Referenced by cbm::qa::checker::Hist1DHandler::Compare().
|
protected |
Index of file.
Definition at line 85 of file CbmQaCheckerObjectHandler.h.
Referenced by cbm::qa::checker::Hist1DHandler::Compare().
|
protected |
Index of object.
Definition at line 84 of file CbmQaCheckerObjectHandler.h.
Referenced by cbm::qa::checker::Hist1DHandler::Compare().
|
protected |
Comparison canvas.
Definition at line 82 of file CbmQaCheckerObjectHandler.h.
Referenced by cbm::qa::checker::Hist1DHandler::CreateCanvases(), cbm::qa::checker::Hist2DHandler::CreateCanvases(), cbm::qa::checker::Profile1DHandler::CreateCanvases(), and Write().
|
protected |
Pointer to object database.
Definition at line 81 of file CbmQaCheckerObjectHandler.h.
Referenced by AddObjects(), cbm::qa::checker::Hist1DHandler::Compare(), CompareWithDefault(), cbm::qa::checker::Hist1DHandler::CreateCanvases(), cbm::qa::checker::Hist2DHandler::CreateCanvases(), cbm::qa::checker::Profile1DHandler::CreateCanvases(), and SetObjectDB().
|
protected |
Pointer to directory.
Definition at line 83 of file CbmQaCheckerObjectHandler.h.
Referenced by AddObjects(), cbm::qa::checker::Hist1DHandler::CreateCanvases(), SetOutputDirectory(), and Write().
|
protected |
Base names of the object.
Definition at line 79 of file CbmQaCheckerObjectHandler.h.
Referenced by AddObjects(), cbm::qa::checker::Hist1DHandler::CreateCanvases(), cbm::qa::checker::Hist2DHandler::CreateCanvases(), and cbm::qa::checker::Profile1DHandler::CreateCanvases().
|
protected |
Base type of the object to be handled.
Definition at line 78 of file CbmQaCheckerObjectHandler.h.
|
protected |
Vector of objects.
Definition at line 80 of file CbmQaCheckerObjectHandler.h.
Referenced by AddObjects(), cbm::qa::checker::Hist1DHandler::Compare(), CompareWithDefault(), cbm::qa::checker::Hist1DHandler::CreateCanvases(), cbm::qa::checker::Hist2DHandler::CreateCanvases(), cbm::qa::checker::Profile1DHandler::CreateCanvases(), Write(), and ~ObjectHandler().