14#include "TClonesArray.h"
26 fpObjDB = std::make_shared<ObjectDB>();
41 LOG(info) <<
"Core: Registering output file: " << filename;
42 fpObjDB->SetOutputPath(filename);
54 int nDatasets =
fpObjDB->GetNofDatasets();
55 int nFiles =
fpObjDB->GetNofFiles();
56 int nVersions =
fpObjDB->GetNofVersions();
61 for (
int iDS = 0; iDS < nDatasets; ++iDS) {
62 for (
int iFile = 0; iFile < nFiles; ++iFile) {
64 auto pFileHandler = std::make_unique<FileHandler>(
fpObjDB, iDS, iFile);
65 auto cmpRes = pFileHandler->Process(opt);
66 for (
int iVer = 0; iVer < nVersions; ++iVer) {
67 cmpSummary[nVersions * (iDS * nFiles + iFile) + iVer] = cmpRes[iVer];
73 LOG(info) <<
"Summary:";
74 for (
int iDS{0}; iDS < nDatasets; ++iDS) {
75 LOG(info) <<
"\tDataset: " <<
fpObjDB->GetDataset(iDS);
76 for (
int iFile{0}; iFile < nFiles; ++iFile) {
77 LOG(info) <<
"\t\tFile: " <<
fpObjDB->GetFileLabel(iDS);
78 for (
int iVer{0}; iVer < nVersions; ++iVer) {
79 auto versionInference = cmpSummary[nVersions * (iDS * nFiles + iFile) + iVer];
80 LOG(info) <<
"\t\t\tVersion: " <<
fpObjDB->GetVersionLabel(iVer)
81 <<
" (path: " <<
fpObjDB->GetInputFileName(iVer, iFile, iDS) <<
"): " <<
ToString(versionInference);
82 res = std::max(versionInference, res);
86 return static_cast<int>(res);
97 TFile outFile(
fpObjDB->GetOutputPath().c_str(),
"RECREATE");
98 for (
int iDS = 0; iDS <
fpObjDB->GetNofDatasets(); ++iDS) {
99 auto* pDSDir = outFile.mkdir(
fpObjDB->GetDataset(iDS).c_str());
100 for (
int iFile = 0; iFile <
fpObjDB->GetNofFiles(); ++iFile) {
101 pDSDir->mkdir(
fpObjDB->GetFileLabel(iFile).c_str());
Core class of the QA checking framework (declaration)
A handler class to process versions from similar files (declaration)
Core class for CBM QA checker framework (declaration)
void RegisterOutFile(const char *filename)
Registers root-file for storing output.
void SetFromYAML(const char *configName)
Sets checker configuration from YAML file.
void AddDataset(const char *datasetName)
Adds a dataset name.
int Process(Option_t *comparisonMethod="E")
Runs checking routine.
void AddVersion(const char *label, const char *path)
Adds a version of QA output for a comparison.
std::shared_ptr< ObjectDB > fpObjDB
Database of names.
void PrepareOutputFile()
Prepares output file (creates directory structure)
ECmpInference
The object comparison inference.
@ StronglyEqual
All the comparison methods gave equality.
std::string ToString(ECmpInference inference)
String representation of the ECmpInference enum.