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

Handler for single files, created from different QA versions. More...

#include <CbmQaCheckerFileHandler.h>

Public Member Functions

 FileHandler (std::shared_ptr< ObjectDB > &pObjDB, int iDataset, int iFile)
 Constructor.
 
 ~FileHandler ()
 Destructor.
 
 FileHandler (const FileHandler &)=delete
 Copy constructor.
 
 FileHandler (FileHandler &&)=delete
 Move constructor.
 
FileHandleroperator= (const FileHandler &)=delete
 Copy assignment operator.
 
FileHandleroperator= (FileHandler &&)=delete
 Move assignment operator.
 
int GetDatasetID () const
 Gets index of dataset.
 
int GetFileID () const
 Gets index of file.
 
std::vector< ECmpInferenceProcess (Option_t *opt="")
 Processes comparison.
 

Private Member Functions

TDirectory * CreateNestedDirectory (const std::string &path)
 Creates nested directory from a given path.
 
void ReOpenOutputFile ()
 Closes and opens output file.
 

Private Attributes

int fFileID = -1
 Index of file.
 
int fDatasetID = -1
 Index of dataset.
 
std::shared_ptr< ObjectDBfpObjDB = nullptr
 Pointer to object database.
 
TDirectory * fpOutDir = nullptr
 Pointer to output directory.
 
std::unique_ptr< TClonesArray > fpInputFiles = nullptr
 Pointer to input files array.
 
std::unique_ptr< TFile > fpOutputFile = nullptr
 Pointer to output file.
 

Detailed Description

Handler for single files, created from different QA versions.

Definition at line 28 of file CbmQaCheckerFileHandler.h.

Constructor & Destructor Documentation

◆ FileHandler() [1/3]

FileHandler::FileHandler ( std::shared_ptr< ObjectDB > & pObjDB,
int iDataset,
int iFile )

Constructor.

Parameters
pObjDBShared pointer to object database
iDatasetIndex of dataset
iFileIndex of file

Definition at line 38 of file CbmQaCheckerFileHandler.cxx.

References fDatasetID, fFileID, fpInputFiles, fpObjDB, fpOutDir, and ReOpenOutputFile().

◆ ~FileHandler()

FileHandler::~FileHandler ( )

Destructor.

Definition at line 62 of file CbmQaCheckerFileHandler.cxx.

References fpInputFiles, and fpOutputFile.

◆ FileHandler() [2/3]

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

Copy constructor.

◆ FileHandler() [3/3]

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

Move constructor.

Member Function Documentation

◆ CreateNestedDirectory()

TDirectory * FileHandler::CreateNestedDirectory ( const std::string & path)
private

Creates nested directory from a given path.

Parameters
pathPath, parts of which are separated with slash
Returns
Pointer to created TDirectory object

Definition at line 73 of file CbmQaCheckerFileHandler.cxx.

References fpOutDir.

Referenced by Process().

◆ GetDatasetID()

int cbm::qa::checker::FileHandler::GetDatasetID ( ) const
inline

Gets index of dataset.

Returns
Index of dataset

Definition at line 53 of file CbmQaCheckerFileHandler.h.

References fDatasetID.

◆ GetFileID()

int cbm::qa::checker::FileHandler::GetFileID ( ) const
inline

Gets index of file.

Returns
Index of file

Definition at line 57 of file CbmQaCheckerFileHandler.h.

References fFileID.

◆ operator=() [1/2]

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

Copy assignment operator.

◆ operator=() [2/2]

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

Move assignment operator.

◆ Process()

std::vector< ECmpInference > FileHandler::Process ( Option_t * opt = "")

Processes comparison.

Parameters
optOption: "B": suppress canvas creation "P": enables bin-by-bin comparison "S": enables statistical hypothesis test, where is possible "U": enables interval comparison
Returns
a vector of comparison inferences (for each version)

Definition at line 81 of file CbmQaCheckerFileHandler.cxx.

References cbm::qa::checker::Chi2, CreateNestedDirectory(), cbm::qa::checker::Exact, fDatasetID, fFileID, fpInputFiles, fpObjDB, cbm::qa::checker::Ratio, ReOpenOutputFile(), and cbm::qa::checker::StronglyEqual.

◆ ReOpenOutputFile()

void FileHandler::ReOpenOutputFile ( )
private

Closes and opens output file.

Definition at line 186 of file CbmQaCheckerFileHandler.cxx.

References fDatasetID, fFileID, fpObjDB, fpOutDir, and fpOutputFile.

Referenced by FileHandler(), and Process().

Member Data Documentation

◆ fDatasetID

int cbm::qa::checker::FileHandler::fDatasetID = -1
private

Index of dataset.

Definition at line 78 of file CbmQaCheckerFileHandler.h.

Referenced by FileHandler(), GetDatasetID(), Process(), and ReOpenOutputFile().

◆ fFileID

int cbm::qa::checker::FileHandler::fFileID = -1
private

Index of file.

Definition at line 77 of file CbmQaCheckerFileHandler.h.

Referenced by FileHandler(), GetFileID(), Process(), and ReOpenOutputFile().

◆ fpInputFiles

std::unique_ptr<TClonesArray> cbm::qa::checker::FileHandler::fpInputFiles = nullptr
private

Pointer to input files array.

Definition at line 82 of file CbmQaCheckerFileHandler.h.

Referenced by FileHandler(), Process(), and ~FileHandler().

◆ fpObjDB

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

Pointer to object database.

Definition at line 80 of file CbmQaCheckerFileHandler.h.

Referenced by FileHandler(), Process(), and ReOpenOutputFile().

◆ fpOutDir

TDirectory* cbm::qa::checker::FileHandler::fpOutDir = nullptr
private

Pointer to output directory.

Definition at line 81 of file CbmQaCheckerFileHandler.h.

Referenced by CreateNestedDirectory(), FileHandler(), and ReOpenOutputFile().

◆ fpOutputFile

std::unique_ptr<TFile> cbm::qa::checker::FileHandler::fpOutputFile = nullptr
private

Pointer to output file.

Definition at line 83 of file CbmQaCheckerFileHandler.h.

Referenced by ReOpenOutputFile(), and ~FileHandler().


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