10#ifndef CbmQaCheckerObjectDB_h
11#define CbmQaCheckerObjectDB_h 1
51 void AddVersion(
const char* label,
const char* path);
136 std::string
ToString(
int verbose = 1)
const;
172 static void CollectObjectPaths(TDirectory* pDir,
const TString& parentPah, std::set<std::string>& paths);
Common definitions for QA-Checker framework.
A data base class for processed objects.
double GetRatioRangeMin() const
Gets lower bound of the accepted ratio range.
std::vector< std::string > fvFileLabels
Container of file labels (used in output)
const std::string & GetOutputPath() const
Gets output path.
int GetNofObjects() const
Gets total number of objects.
ObjectDB(const ObjectDB &)=delete
Copy constructor.
void ReadObjectList(int iFile)
Reads list of histograms from file.
std::string ToString(int verbose=1) const
String representation of the content.
static void CollectObjectPaths(TDirectory *pDir, const TString &parentPah, std::set< std::string > &paths)
Loops over ROOT-file and collects object paths.
std::string GetInputFileName(int iVersion, int iFile, int iDataset) const
Gets name of file from indexes of version, file and dataset.
const std::string & GetVersionPath(int iVersion) const
Gets version path.
int GetNofObjects(int iFile) const
Gets number of objects in file.
std::vector< int > fvObjectFirstGlobIndex
First global index of object in a file.
std::vector< std::string > fvVersionPaths
Container of version paths.
void AddDataset(const char *dataset)
Adds dataset.
int GetNofDatasets() const
Gets number of datasets.
std::string fsInputRootPath
Root path for input files.
ObjectDB & operator=(const ObjectDB &)=delete
Copy assignment operator.
std::vector< std::vector< std::string > > fvObjects
Container of object names vs file id.
void SetPvalThreshold(double pVal)
Sets P-value threshold.
void Clear()
Clears content.
void SetRatioRange(double min, double max)
Sets ratio accepted range.
int GetDefaultID() const
Gets index of default version.
double GetPvalThreshold() const
Gets p-value threshold.
~ObjectDB()=default
Destructor.
std::vector< std::string > fvDatasets
Container of dataset names.
int GetNofVersions() const
Gets number of versions.
const std::string & GetObject(int iFile, int iObject) const
Gets object name by its local index and index of file.
const std::string & GetVersionLabel(int iVersion) const
Gets version label.
std::vector< char > fvbProcessWholeFile
If the whole file should be processed.
double GetRatioRangeMax() const
Gets upper bound of the accepted ratio range.
std::vector< std::string > fvFiles
Container of file names.
void AddVersion(const char *label, const char *path)
Adds version.
int GetNofFiles() const
Gets number of files.
ObjectDB(ObjectDB &&)=delete
Move constructor.
std::vector< std::string > fvVersionLabels
Container of version labels.
const std::string & GetFileLabel(int iFile) const
Gets label of file.
double fRatioMin
Lower boundary for ratio deviation.
const std::string & GetDataset(int iDataset) const
Gets name of dataset.
void SetInputRootPath(const char *pathName)
Sets root path to input files.
void SetDefaultLabel(const char *defaultLabel)
Sets default version label.
void SetOutputPath(const char *path)
Sets the output path.
double fPvalThresh
P-value threshold for histograms equality.
double fRatioMax
Upper boundary for ratio deviation.
void ReadFromYAML(const char *configName)
Reads DB from YAML node.
int fDefVersionID
Index of default version.
void Init()
Initializes the database.
std::string fsDefaultLabel
Name of default version label.
ObjectDB()=default
Default constructor.
ObjectDB & operator=(ObjectDB &&)=delete
Move assignment operator.
std::string fsOutputPath
Path to the output file.