10#ifndef CbmQaCheckerObjectDB_h
11#define CbmQaCheckerObjectDB_h 1
58 void AddVersion(
const char* label,
const char* path);
93 const std::pair<std::string, uint32_t>&
GetObject(
int iFile,
int iObject)
const
154 std::string
ToString(
int verbose = 1)
const;
190 static void CollectObjectPaths(TDirectory* pDir,
const TString& parentPah, std::set<std::string>& paths);
205 std::vector<std::vector<std::pair<std::string, uint32_t>>>
fvObjects;
Common definitions for QA-Checker framework.
friend fscal max(fscal x, fscal y)
friend fscal min(fscal x, fscal y)
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.
int GetNofObjectParameters() const
Gets number of object parameters.
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::vector< ObjectParameters > fvObjectParameters
Container of object parameters.
std::string fsInputRootPath
Root path for input files.
ObjectDB & operator=(const ObjectDB &)=delete
Copy assignment operator.
void SetPvalThreshold(double pVal)
Sets P-value threshold.
const std::pair< std::string, uint32_t > & GetObject(int iFile, int iObject) const
Gets object name by its local index and index of file.
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.
const ObjectParameters & GetObjectParameters(uint32_t paramIndex) const
Gets object parameters by its local index.
int GetNofVersions() const
Gets number of versions.
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.
std::vector< std::vector< std::pair< std::string, uint32_t > > > fvObjects
Container of object names and corresponding parameter IDs in fvObjectParameters.
ObjectDB()=default
Default constructor.
ObjectDB & operator=(ObjectDB &&)=delete
Move assignment operator.
std::string fsOutputPath
Path to the output file.