|
CbmRoot
|
A data base class for processed objects. More...
#include <CbmQaCheckerObjectDB.h>
Classes | |
| struct | ObjectParameters |
Public Member Functions | |
| ObjectDB ()=default | |
| Default constructor. | |
| ObjectDB (const ObjectDB &)=delete | |
| Copy constructor. | |
| ObjectDB (ObjectDB &&)=delete | |
| Move constructor. | |
| ~ObjectDB ()=default | |
| Destructor. | |
| ObjectDB & | operator= (const ObjectDB &)=delete |
| Copy assignment operator. | |
| ObjectDB & | operator= (ObjectDB &&)=delete |
| Move assignment operator. | |
| void | AddVersion (const char *label, const char *path) |
| Adds version. | |
| void | AddDataset (const char *dataset) |
| Adds dataset. | |
| void | Clear () |
| Clears content. | |
| const std::string & | GetDataset (int iDataset) const |
| Gets name of dataset. | |
| int | GetDefaultID () const |
| Gets index of default version. | |
| const std::string & | GetFileLabel (int iFile) const |
| Gets label of file. | |
| std::string | GetInputFileName (int iVersion, int iFile, int iDataset) const |
| Gets name of file from indexes of version, file and dataset. | |
| const std::pair< std::string, uint32_t > & | GetObject (int iFile, int iObject) const |
| Gets object name by its local index and index of file. | |
| const ObjectParameters & | GetObjectParameters (uint32_t paramIndex) const |
| Gets object parameters by its local index. | |
| int | GetNofDatasets () const |
| Gets number of datasets. | |
| int | GetNofObjects () const |
| Gets total number of objects. | |
| int | GetNofObjects (int iFile) const |
| Gets number of objects in file. | |
| int | GetNofObjectParameters () const |
| Gets number of object parameters. | |
| int | GetNofFiles () const |
| Gets number of files. | |
| int | GetNofVersions () const |
| Gets number of versions. | |
| const std::string & | GetOutputPath () const |
| Gets output path. | |
| double | GetPvalThreshold () const |
| Gets p-value threshold. | |
| double | GetRatioRangeMax () const |
| Gets upper bound of the accepted ratio range. | |
| double | GetRatioRangeMin () const |
| Gets lower bound of the accepted ratio range. | |
| const std::string & | GetVersionLabel (int iVersion) const |
| Gets version label. | |
| const std::string & | GetVersionPath (int iVersion) const |
| Gets version path. | |
| void | Init () |
| Initializes the database. | |
| void | ReadFromYAML (const char *configName) |
| Reads DB from YAML node. | |
| std::string | ToString (int verbose=1) const |
| String representation of the content. | |
| void | SetDefaultLabel (const char *defaultLabel) |
| Sets default version label. | |
| void | SetInputRootPath (const char *pathName) |
| Sets root path to input files. | |
| void | SetOutputPath (const char *path) |
| Sets the output path. | |
| void | SetPvalThreshold (double pVal) |
| Sets P-value threshold. | |
| void | SetRatioRange (double min, double max) |
| Sets ratio accepted range. | |
Private Member Functions | |
| void | ReadObjectList (int iFile) |
| Reads list of histograms from file. | |
Static Private Member Functions | |
| static void | CollectObjectPaths (TDirectory *pDir, const TString &parentPah, std::set< std::string > &paths) |
| Loops over ROOT-file and collects object paths. | |
Private Attributes | |
| int | fDefVersionID = -1 |
| Index of default version. | |
| std::string | fsInputRootPath = "" |
| Root path for input files. | |
| std::string | fsOutputPath = "" |
| Path to the output file. | |
| std::string | fsDefaultLabel = "" |
| Name of default version label. | |
| std::vector< std::string > | fvDatasets |
| Container of dataset names. | |
| std::vector< std::string > | fvFiles |
| Container of file names. | |
| std::vector< char > | fvbProcessWholeFile |
| If the whole file should be processed. | |
| std::vector< int > | fvObjectFirstGlobIndex |
| First global index of object in a file. | |
| std::vector< std::string > | fvFileLabels |
| Container of file labels (used in output) | |
| std::vector< std::vector< std::pair< std::string, uint32_t > > > | fvObjects |
| Container of object names and corresponding parameter IDs in fvObjectParameters. | |
| std::vector< ObjectParameters > | fvObjectParameters |
| Container of object parameters. | |
| std::vector< std::string > | fvVersionLabels |
| Container of version labels. | |
| std::vector< std::string > | fvVersionPaths |
| Container of version paths. | |
| double | fPvalThresh {0.05} |
| P-value threshold for histograms equality. | |
| double | fRatioMax {1.05} |
| Upper boundary for ratio deviation. | |
| double | fRatioMin {0.95} |
| Lower boundary for ratio deviation. | |
A data base class for processed objects.
The data base contains information on datasets, file-object pairs and versions, which are compared.
Definition at line 28 of file CbmQaCheckerObjectDB.h.
|
default |
Default constructor.
|
delete |
Copy constructor.
|
delete |
Move constructor.
|
default |
Destructor.
| void ObjectDB::AddDataset | ( | const char * | dataset | ) |
Adds dataset.
| dataset | Name of dataset |
Definition at line 49 of file CbmQaCheckerObjectDB.cxx.
| void ObjectDB::AddVersion | ( | const char * | label, |
| const char * | path ) |
Adds version.
| label | Label of version |
| path | Path to output files made for this version |
Definition at line 41 of file CbmQaCheckerObjectDB.cxx.
| void ObjectDB::Clear | ( | ) |
Clears content.
Definition at line 28 of file CbmQaCheckerObjectDB.cxx.
|
staticprivate |
Loops over ROOT-file and collects object paths.
| [in] | pDir | Pointer on directory |
| [in] | parentPath | Parent path within file |
| [out] | paths | A set of object paths |
Definition at line 268 of file CbmQaCheckerObjectDB.cxx.
|
inline |
Gets name of dataset.
| iDataset | Index of dataset |
Definition at line 70 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets index of default version.
Definition at line 74 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets label of file.
| iFile | Index of file |
Definition at line 79 of file CbmQaCheckerObjectDB.h.
| std::string ObjectDB::GetInputFileName | ( | int | iVersion, |
| int | iFile, | ||
| int | iDataset ) const |
Gets name of file from indexes of version, file and dataset.
| iVersion | Index of version |
| iFile | Index of file |
| iDataset | Index of dataset |
Definition at line 53 of file CbmQaCheckerObjectDB.cxx.
|
inline |
Gets number of datasets.
Definition at line 103 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets number of files.
Definition at line 116 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets number of object parameters.
Definition at line 113 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets total number of objects.
Definition at line 106 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets number of objects in file.
| iFile | Index of file |
Definition at line 110 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets number of versions.
Definition at line 119 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets object name by its local index and index of file.
| iFile | Index of file |
| iObject | Index of object for a given file |
Definition at line 93 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets object parameters by its local index.
| paramIndex | Index of object parameters |
Definition at line 101 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets output path.
Definition at line 122 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets p-value threshold.
Definition at line 125 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets upper bound of the accepted ratio range.
Definition at line 128 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets lower bound of the accepted ratio range.
Definition at line 131 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets version label.
| iVersion | Index of version |
Definition at line 135 of file CbmQaCheckerObjectDB.h.
|
inline |
Gets version path.
| iVersion | Index of version |
Definition at line 139 of file CbmQaCheckerObjectDB.h.
| void ObjectDB::Init | ( | ) |
Initializes the database.
Definition at line 64 of file CbmQaCheckerObjectDB.cxx.
Copy assignment operator.
| void ObjectDB::ReadFromYAML | ( | const char * | configName | ) |
Reads DB from YAML node.
| config | Root node of the YAML file |
Definition at line 128 of file CbmQaCheckerObjectDB.cxx.
|
private |
Reads list of histograms from file.
| iFile | Index of file |
Definition at line 284 of file CbmQaCheckerObjectDB.cxx.
|
inline |
Sets default version label.
| defaultLabel | Name of default label |
If the default version is not provided as well as the provided, the first version will be used as the default one.
Definition at line 161 of file CbmQaCheckerObjectDB.h.
|
inline |
Sets root path to input files.
| pathName | Relative or absolute root path to input the input directories |
Definition at line 165 of file CbmQaCheckerObjectDB.h.
|
inline |
Sets the output path.
| path | Path to the output ROOT-file |
Definition at line 169 of file CbmQaCheckerObjectDB.h.
| void ObjectDB::SetPvalThreshold | ( | double | pVal | ) |
Sets P-value threshold.
| pVal | P-value threshold |
Definition at line 316 of file CbmQaCheckerObjectDB.cxx.
| void ObjectDB::SetRatioRange | ( | double | min, |
| double | max ) |
Sets ratio accepted range.
| min | Lower boundary |
| max | Upper boundary |
Definition at line 326 of file CbmQaCheckerObjectDB.cxx.
| std::string ObjectDB::ToString | ( | int | verbose = 1 | ) | const |
String representation of the content.
| verbose | Verbosity level: 0: no output, 1: minimal output (versions, datasets and file names), 2: objects as well |
Definition at line 339 of file CbmQaCheckerObjectDB.cxx.
|
private |
Index of default version.
Definition at line 192 of file CbmQaCheckerObjectDB.h.
|
private |
P-value threshold for histograms equality.
Definition at line 211 of file CbmQaCheckerObjectDB.h.
|
private |
Upper boundary for ratio deviation.
Definition at line 212 of file CbmQaCheckerObjectDB.h.
|
private |
Lower boundary for ratio deviation.
Definition at line 213 of file CbmQaCheckerObjectDB.h.
|
private |
Name of default version label.
Definition at line 196 of file CbmQaCheckerObjectDB.h.
|
private |
Root path for input files.
Definition at line 194 of file CbmQaCheckerObjectDB.h.
|
private |
Path to the output file.
Definition at line 195 of file CbmQaCheckerObjectDB.h.
|
private |
If the whole file should be processed.
Definition at line 200 of file CbmQaCheckerObjectDB.h.
|
private |
Container of dataset names.
Definition at line 198 of file CbmQaCheckerObjectDB.h.
|
private |
Container of file labels (used in output)
Definition at line 202 of file CbmQaCheckerObjectDB.h.
|
private |
Container of file names.
Definition at line 199 of file CbmQaCheckerObjectDB.h.
|
private |
First global index of object in a file.
Definition at line 201 of file CbmQaCheckerObjectDB.h.
|
private |
Container of object parameters.
Definition at line 207 of file CbmQaCheckerObjectDB.h.
|
private |
Container of object names and corresponding parameter IDs in fvObjectParameters.
Definition at line 205 of file CbmQaCheckerObjectDB.h.
|
private |
Container of version labels.
Definition at line 208 of file CbmQaCheckerObjectDB.h.
|
private |
Container of version paths.
Definition at line 209 of file CbmQaCheckerObjectDB.h.