CbmRoot
Loading...
Searching...
No Matches
CbmQaCheckerFileHandler.h
Go to the documentation of this file.
1/* Copyright (C) 2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#ifndef CbmQaCheckerFileHandler_h
11#define CbmQaCheckerFileHandler_h 1
12
15#include "TClonesArray.h"
16
17#include <memory>
18#include <vector>
19
20class TNamed;
21class TDirectory;
22class TFile;
23
24namespace cbm::qa::checker
25{
29 public:
34 FileHandler(std::shared_ptr<ObjectDB>& pObjDB, int iDataset, int iFile);
35
38
40 FileHandler(const FileHandler&) = delete;
41
44
47
50
53 int GetDatasetID() const { return fDatasetID; }
54
57 int GetFileID() const { return fFileID; }
58
66 std::vector<ECmpInference> Process(Option_t* opt = "");
67
68 private:
72 TDirectory* CreateNestedDirectory(const std::string& path);
73
75 void ReOpenOutputFile();
76
77 int fFileID = -1;
78 int fDatasetID = -1;
79
80 std::shared_ptr<ObjectDB> fpObjDB = nullptr;
81 TDirectory* fpOutDir = nullptr;
82 std::unique_ptr<TClonesArray> fpInputFiles = nullptr;
83 std::unique_ptr<TFile> fpOutputFile = nullptr;
84
85 // TODO: replace fpOutputFolder with shared_ptr
86 };
87} // namespace cbm::qa::checker
88
89#endif // CbmQaCheckerFileHandler_h
Database for processed objects in the QA checker framework (implementation)
Common definitions for QA-Checker framework.
Handler for single files, created from different QA versions.
TDirectory * CreateNestedDirectory(const std::string &path)
Creates nested directory from a given path.
std::unique_ptr< TClonesArray > fpInputFiles
Pointer to input files array.
FileHandler & operator=(const FileHandler &)=delete
Copy assignment operator.
FileHandler(std::shared_ptr< ObjectDB > &pObjDB, int iDataset, int iFile)
Constructor.
std::unique_ptr< TFile > fpOutputFile
Pointer to output file.
FileHandler(FileHandler &&)=delete
Move constructor.
int GetDatasetID() const
Gets index of dataset.
int GetFileID() const
Gets index of file.
FileHandler & operator=(FileHandler &&)=delete
Move assignment operator.
std::vector< ECmpInference > Process(Option_t *opt="")
Processes comparison.
void ReOpenOutputFile()
Closes and opens output file.
TDirectory * fpOutDir
Pointer to output directory.
FileHandler(const FileHandler &)=delete
Copy constructor.
std::shared_ptr< ObjectDB > fpObjDB
Pointer to object database.