From 8ba56b5612fd5f1c3a9b19f32116d3ac17b62c60 Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Mon, 11 Dec 2023 20:10:52 +0100 Subject: [PATCH] QA: flag selection --- core/qa/CbmQaIO.cxx | 3 +- core/qa/CbmQaIO.h | 1 - core/qa/CbmQaManager.cxx | 38 ++++++--- core/qa/CbmQaManager.h | 10 ++- core/qa/CbmQaTask.cxx | 53 ++++++++++++ core/qa/CbmQaTask.h | 93 ++++++++++++++-------- macro/mcbm/mcbm_qa.C | 1 + macro/qa/configs/qa_tasks_config_mcbm.yaml | 49 +++++++++++- reco/L1/qa/CbmCaInputQaBase.cxx | 21 ++--- reco/L1/qa/CbmCaInputQaBase.h | 2 +- reco/L1/qa/CbmCaInputQaMuch.h | 3 +- reco/L1/qa/CbmCaInputQaMvd.h | 3 +- reco/L1/qa/CbmCaInputQaSetup.cxx | 2 +- reco/L1/qa/CbmCaInputQaSetup.h | 2 +- reco/L1/qa/CbmCaInputQaSts.cxx | 11 +-- reco/L1/qa/CbmCaInputQaSts.h | 3 +- reco/L1/qa/CbmCaInputQaTof.h | 3 +- reco/L1/qa/CbmCaInputQaTrd.h | 3 +- reco/L1/qa/CbmCaOutputQa.cxx | 4 +- reco/L1/qa/CbmCaOutputQa.h | 3 +- 20 files changed, 222 insertions(+), 86 deletions(-) diff --git a/core/qa/CbmQaIO.cxx b/core/qa/CbmQaIO.cxx index d440cb3011..12ed180c22 100644 --- a/core/qa/CbmQaIO.cxx +++ b/core/qa/CbmQaIO.cxx @@ -19,7 +19,7 @@ CbmQaIO::CbmQaIO(TString prefixName, std::shared_ptr<ObjList_t> pObjList) : fsPrefix(prefixName), fpvObjList(pObjList) { if (!fsPrefix.IsNull()) { - fsPrefix += "_"; + //fsPrefix += "_"; } if (!fpvObjList.get()) { fpvObjList = std::make_shared<ObjList_t>(); @@ -104,6 +104,7 @@ void CbmQaIO::SetConfigName(const char* path) msg << "configuration file for QA \"" << path << "\" is improperly formatted"; throw std::runtime_error(msg.str()); } + LOG(info) << fsPrefix << ": configuration file is set to " << path; } // --------------------------------------------------------------------------------------------------------------------- diff --git a/core/qa/CbmQaIO.h b/core/qa/CbmQaIO.h index 2964cdac4d..7cb64f07ab 100644 --- a/core/qa/CbmQaIO.h +++ b/core/qa/CbmQaIO.h @@ -136,7 +136,6 @@ class CbmQaIO { /// @param pOutFile Pointer to output ROOT file void WriteToFile(TFile* pOutFile) const; - TString fsRootFolderName = ""; ///< Name of root folder TString fsConfigName = ""; ///< Name of configuration file TString fsPrefix = ""; ///< Unique prefix for all writeable root diff --git a/core/qa/CbmQaManager.cxx b/core/qa/CbmQaManager.cxx index ce4852f2e1..aac24f8084 100644 --- a/core/qa/CbmQaManager.cxx +++ b/core/qa/CbmQaManager.cxx @@ -27,22 +27,30 @@ void CbmQaManager::Finish() using std::right; using std::setw; - std::map<std::string, std::map<std::string, bool>> qaResults; for (auto* task : *(this->GetListOfTasks())) { auto* pQaTask = dynamic_cast<CbmQaTask*>(task); if (pQaTask) { - qaResults[std::string(task->GetName())] = pQaTask->Check(); + LOG(info) << "Checking the task " << pQaTask->GetName(); + pQaTask->Check(); + pQaTask->ReadCheckListFromConfig(); } } - fStatus = true; LOG(info) << fName << ": monitorable status:"; - for (auto& [name, resMap] : qaResults) { - LOG(info) << name; - for (auto& [quantity, flag] : resMap) { - LOG(info) << '\t' << left << setw(40) << quantity << right - << (flag ? "\e[1;32mpassed\e[0m" : "\e[1;31mfailed\e[0m"); - fStatus &= flag; + fStatus = true; + for (auto* task : *(this->GetListOfTasks())) { + auto* pQaTask = dynamic_cast<CbmQaTask*>(task); + if (pQaTask) { + LOG(info) << "Check list for the task " << pQaTask->GetName(); + const auto& mCheckList = pQaTask->GetCheckList(); + for (const auto& [entryName, flags] : mCheckList) { + LOG(info) << '\t' << left << setw(40) << entryName << right << setw(10) + << (flags.fResult ? "\e[1;32mpassed\e[0m" : "\e[1;31mfailed\e[0m") + << (flags.fStatus ? "" : " IGNORED"); + if (flags.fStatus) { + fStatus &= flags.fResult; + } + } } } } @@ -51,9 +59,15 @@ void CbmQaManager::Finish() // InitStatus CbmQaManager::Init() { - for (auto* task : *(this->GetListOfTasks())) { - LOG(info) << "\t- " << task->GetName(); + // Apply configuration file to all underlying tasks + if (fsConfigName.Length()) { + LOG(info) << "CbmQaManager: using configuration file " << fsConfigName; + for (auto* task : *(this->GetListOfTasks())) { + auto* pQaTask = dynamic_cast<CbmQaTask*>(task); + if (pQaTask) { + pQaTask->SetConfigName(fsConfigName.Data()); + } + } } - return kSUCCESS; } diff --git a/core/qa/CbmQaManager.h b/core/qa/CbmQaManager.h index 2c81876965..96c0ac0ca5 100644 --- a/core/qa/CbmQaManager.h +++ b/core/qa/CbmQaManager.h @@ -10,6 +10,7 @@ #pragma once #include "FairTask.h" +#include "TString.h" #include <map> #include <string> @@ -52,9 +53,16 @@ class CbmQaManager : public FairTask { ClassDef(CbmQaManager, 0); + /// \brief Gets YAML config name + const TString& GetConfigName() const { return fsConfigName; } + /// \brief Gets status flag bool GetStatus() const { return fStatus; } + /// \brief Sets YAML config name + void SetConfigName(const TString& name) { fsConfigName = name; } + private: - bool fStatus = true; ///< Status of QA: true - all tasks passed, false - at least one of the task failed + bool fStatus = true; ///< Status of QA: true - all tasks passed, false - at least one of the task failed + TString fsConfigName = ""; ///< Name of the configuration YAML file (passed to underlying QA tasks) }; diff --git a/core/qa/CbmQaTask.cxx b/core/qa/CbmQaTask.cxx index 4dbd7da02c..f545fc93e9 100644 --- a/core/qa/CbmQaTask.cxx +++ b/core/qa/CbmQaTask.cxx @@ -22,6 +22,7 @@ #include "TString.h" #include <array> +#include <regex> ClassImp(CbmQaTask); @@ -175,3 +176,55 @@ void CbmQaTask::PutSetupNameOnPad(double xMin, double yMin, double xMax, double paveText->Draw("same"); } } + +// --------------------------------------------------------------------------------------------------------------------- +// +void CbmQaTask::ReadCheckListFromConfig() +{ + YAML::Node tagNode = fConfigNode["check_list"]; + if (tagNode) { + std::vector<char> vbConfigKeyUsed; + std::vector<char> vbCheckKeyProcessed(fmCheckList.size(), false); // Flag to avoid checking the check entry twice + vbConfigKeyUsed.reserve(tagNode.size()); + std::regex rexInt("%d"); + // First loop: read all the entries, containing special characters ("%d") + for (auto it = tagNode.begin(); it != tagNode.end(); ++it) { + std::string configEntry = it->first.as<std::string>(); + if (static_cast<int>(configEntry.find_last_of("%d")) != -1) { + vbConfigKeyUsed.push_back(true); + bool bCheckStatus = it->second.as<bool>(); // use-flag, stored in the configuration + std::regex keyRex = std::regex(std::regex_replace(configEntry, rexInt, "([0-9*])")); + int iCheckEntry = 0; + for (auto& [checkEntry, checkFlags] : fmCheckList) { + if (!vbCheckKeyProcessed[iCheckEntry] && std::regex_match(checkEntry, keyRex)) { + vbCheckKeyProcessed[iCheckEntry] = true; + checkFlags.fStatus = bCheckStatus; + } + ++iCheckEntry; + } + } + else { + vbConfigKeyUsed.push_back(false); + } + } + // Second loop: read all other entries + int iConfigEntry = 0; + for (auto it = tagNode.begin(); it != tagNode.end(); ++it) { + if (!vbConfigKeyUsed[iConfigEntry]) { + std::string configEntry = it->first.as<std::string>(); + auto checkListIt = fmCheckList.find(configEntry); + if (checkListIt != fmCheckList.end()) { + checkListIt->second.fStatus = it->second.as<bool>(); + } + else { + LOG(warn) << fName << "::ReadCheckListFromConfig: config contains unknown entry " << configEntry; + } + } + ++iConfigEntry; + } + } +} + +// --------------------------------------------------------------------------------------------------------------------- +// +void CbmQaTask::StoreCheckResult(const std::string& tag, bool result) { fmCheckList[tag] = CheckFlags{result, false}; } diff --git a/core/qa/CbmQaTask.h b/core/qa/CbmQaTask.h index 1c04db3f81..27d023aa5e 100644 --- a/core/qa/CbmQaTask.h +++ b/core/qa/CbmQaTask.h @@ -42,94 +42,110 @@ class TClonesArray; /// Class CbmQaTask is to be inherited with a particular QA-task. It provides mechanisms for storage and management /// of QA canvases and histograms management class CbmQaTask : public FairTask, public CbmQaIO { + /// \struct CheckFlags + /// \brief Contains a check result and its activeness status of the check-list entry + /// + /// If the status is set to false, the check result is ignored in the QA verdict. + struct CheckFlags { + bool fResult = false; ///< Check result storage + bool fStatus = false; ///< Status of the check + }; + public: - /// Constructor from parameters + /// \brief Constructor from parameters /// \param name Name of the task /// \param verbose Verbose level /// \param isMCUsed Flag: true - MC information is used, false - only reconstructed data QA is processed CbmQaTask(const char* name, int verbose, bool isMCUsed); - /// @brief Default constructor + /// \brief Default constructor CbmQaTask() = delete; // TODO: Let's see, what can happen, if one deletes default constructor - /// @brief Destructor + /// \brief Destructor virtual ~CbmQaTask() = default; - /// @brief Copy constructor + /// \brief Copy constructor CbmQaTask(const CbmQaTask&) = delete; - /// @brief Move constructor + /// \brief Move constructor CbmQaTask(CbmQaTask&&) = delete; - /// @brief Copy assignment operator + /// \brief Copy assignment operator CbmQaTask& operator=(const CbmQaTask&) = delete; - /// @brief Move assignment operator + /// \brief Move assignment operator CbmQaTask& operator=(CbmQaTask&&) = delete; - /// @brief Gets name of the setup + /// \brief Gets name of the setup const std::string& GetSetupName() const { return fsSetupName; } - /// @brief Returns flag, whether MC information is used or not in the task + /// \brief Returns flag, whether MC information is used or not in the task bool IsMCUsed() const { return fbUseMC; } - /// @brief Sets events suppression flag + /// \brief Sets events suppression flag /// /// By default the QA task runs on the reconstructed events (CbmEvent objects), if the tree of the objects is /// presented in the input. This flag disables the events-based routine, so the QA is executed over the whole /// Time-slice. void SetProcessFullTs(bool bProcessFullTs) { fbProcessFullTs = bProcessFullTs; } - /// FairTask: Task initialization in the beginning of the run + /// \brief FairTask: Task initialization in the beginning of the run InitStatus Init() override; - /// FairTask: Task reinitialization + /// \brief FairTask: Task reinitialization InitStatus ReInit() override; - /// FairTask: Defines action of the task in the event/TS + /// \brief FairTask: Defines action of the task in the event/TS void Exec(Option_t* /*option*/) override; - /// FairTask: Defines action of the task in the end of run + /// \brief FairTask: Defines action of the task in the end of run void Finish() override; - /// @brief Sets name of the setup + /// \brief Sets name of the setup void SetSetupName(const char* setup) { fsSetupName = setup; } // ***************************************************** // ** Functions accessible inside the derived classes ** // ***************************************************** - /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - virtual std::map<std::string, bool> Check() = 0; + /// \brief Function to check, if the QA results are acceptable + /// + /// In the function one should provide the check flags with the function StoreCheckResult. + virtual void Check() = 0; + + /// \brief Reads check-list from the configuration file + void ReadCheckListFromConfig(); + + /// \brief Gets check-list + const std::map<std::string, CheckFlags>& GetCheckList() const { return fmCheckList; } protected: - /// De-initialize the task + /// \brief De-initialize the task virtual void DeInit() {} - /// Initializes data branches + /// \brief Initializes data branches virtual InitStatus InitDataBranches() { return kSUCCESS; } - /// Initializes histograms + /// \brief Initializes histograms virtual InitStatus InitHistograms() { return kSUCCESS; } - /// Initializes canvases + /// \brief Initializes canvases virtual InitStatus InitCanvases() { return kSUCCESS; } - /// Initializes event / time-slice + /// \brief Initializes event / time-slice virtual InitStatus InitTimeSlice() { return kSUCCESS; } - /// Method to fill histograms per event or time-slice + /// \brief Method to fill histograms per event or time-slice virtual void FillHistograms() {} - /// Get current event number + /// \brief Get current event number int GetEventNumber() const { return fNofEvents.GetVal(); } // *********************** // ** Utility functions ** // *********************** - /// Checks range of variable + /// \brief Checks range of variable /// \param name Name of the variable /// \param var Variable to check /// \param lo Lower limit of the variable @@ -138,7 +154,7 @@ class CbmQaTask : public FairTask, public CbmQaIO { template<typename T> bool CheckRange(std::string_view name, T var, T lo, T hi) const; - /// Checks range of variable + /// \brief Checks range of variable /// \param name Name of the variable /// \param var Variable to check /// \param varErr Standard Error of the variable @@ -148,20 +164,34 @@ class CbmQaTask : public FairTask, public CbmQaIO { template<typename T> bool CheckRange(std::string_view name, T var, T varErr, T lo, T hi) const; - /// Checks ranges for mean and standard deviation + /// \brief Checks ranges for mean and standard deviation /// \return False, if variable exits the range bool CheckRange(TH1* h, double meanMax, double rmsMin, double rmsMax); - /// @brief Puts setup title on the canvas + /// \brief Puts setup title on the canvas void PutSetupNameOnPad(double xMin, double yMin, double xMax, double yMax); - /// @brief Gets pointer to current event + /// \brief Gets pointer to current event CbmEvent* GetCurrentEvent() { return fpCurrentEvent; } + /// \brief Stores check flag to the check-list + /// \param tag The flag name + /// \param result Check result + void StoreCheckResult(const std::string& tag, bool result); + private: - /// @brief De-initializes this task + /// \brief De-initializes this task void DeInitBase(); + /// \brief A QA check-list map + /// + /// The check list is updated with new entries with the StoreCheckResult(tag, result) function, which is to be called + /// from the Check() function. The result is stored to CheckFlags::fResult field, while the CheckFlags::fStatus stays + /// uninitialized. Than, when the ReadCheckListFromConfig() function is called, the fStatus is updated according to + /// the check list entries in the qa_tasks_config_mcbm.yaml/qa_tasks_config_cbm.yaml. If the fStatus is false + /// (default), the check is ignored in the final verdict making. + std::map<std::string, CheckFlags> fmCheckList; + TClonesArray* fpBrEvents = nullptr; ///< Pointer to CbmEvent branch CbmEvent* fpCurrentEvent = nullptr; ///< Pointer to the current event std::string fsSetupName = ""; ///< Name of the setup (to draw on the canvases) @@ -169,7 +199,6 @@ class CbmQaTask : public FairTask, public CbmQaIO { bool fbUseMC = false; ///< Flag, if MC is used bool fbProcessFullTs = false; ///< If true, routine runs on the full TS even if the CbmEvent branch is in - ClassDefOverride(CbmQaTask, 0); }; diff --git a/macro/mcbm/mcbm_qa.C b/macro/mcbm/mcbm_qa.C index 2253208c42..7601e16f3f 100644 --- a/macro/mcbm/mcbm_qa.C +++ b/macro/mcbm/mcbm_qa.C @@ -167,6 +167,7 @@ void mcbm_qa(Int_t nEvents = 0, TString dataset = "data/mcbm_beam_2020_03_test", // ------------------------------------------------------------------------ auto* qaManager = new CbmQaManager(3); + qaManager->SetConfigName(qaConfig); run->AddTask(qaManager); // ----- MCDataManager (legacy mode) ----------------------------------- diff --git a/macro/qa/configs/qa_tasks_config_mcbm.yaml b/macro/qa/configs/qa_tasks_config_mcbm.yaml index 2bc8bb254f..351fbcb6e7 100644 --- a/macro/qa/configs/qa_tasks_config_mcbm.yaml +++ b/macro/qa/configs/qa_tasks_config_mcbm.yaml @@ -8,6 +8,37 @@ ## @author Sergei Zharko <s.zharko@gsi.de> qa: + CbmCaInputQaMvd: + check_list: + station_position_ordering: true + station_position_hit_delta_z: false + hit_efficiency_station_%d: true + pull_x_station_%d: true + pull_y_station_%d: true + pull_t_station_%d: true + pull_station_%_pull_x: false + CbmCaInputQaSts: + check_list: + station_position_ordering: true + station_position_hit_delta_z: false + hit_efficiency_station_%d: true + pull_x_station_%d: true + pull_y_station_%d: true + pull_t_station_%d: true + pull_u_%d_digis: true + pull_v_%d_digis: true + CbmCaInputQaMuch: + check_list: + station_position_ordering: true + station_position_hit_delta_z: true + hit_efficiency_station_%d: true + pull_x_station_2: false + pull_x_station_3: false + pull_x_station_%d: true + pull_y_station_%d: true + pull_t_station_%d: true + pull_t_station_1: false + pull_t_station_3: false CbmCaInputQaTrd: histograms: #xy_station0: @@ -19,6 +50,22 @@ qa: #xy_station2: # x: { nbins: 500, min: -100., max: 100. } # y: { nbins: 500, min: -100., max: 100. } - profiles: none + profiles: none + check_list: + station_position_ordering: true + station_position_hit_delta_z: true + hit_efficiency_station_%d: true + pull_t_station_0: false + pull_x_station_%d: true + pull_y_station_%d: true + pull_t_station_%d: true + CbmCaInputQaTof: + check_list: + station_position_ordering: true + station_position_hit_delta_z: false + hit_efficiency_station_%d: true + pull_x_station_%d: true + pull_y_station_%d: true + pull_t_station_%d: true ... diff --git a/reco/L1/qa/CbmCaInputQaBase.cxx b/reco/L1/qa/CbmCaInputQaBase.cxx index 2864e30369..470172749c 100644 --- a/reco/L1/qa/CbmCaInputQaBase.cxx +++ b/reco/L1/qa/CbmCaInputQaBase.cxx @@ -73,13 +73,10 @@ CbmCaInputQaBase<DetID>::CbmCaInputQaBase(const char* name, int verbose, bool is // --------------------------------------------------------------------------------------------------------------------- // template<ca::EDetectorID DetID> -std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() +void CbmCaInputQaBase<DetID>::Check() { - std::map<std::string, bool> resMap; - int nSt = fpDetInterface->GetNtrackingStations(); - // ************************************************************** // ** Basic checks, available both for real and simulated data ** // ************************************************************** @@ -118,7 +115,7 @@ std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() } res = false; } - resMap["station_position_ordering"] = res; + StoreCheckResult("station_position_ordering", res); } // ----- Checks for mismatch between station and hit z positions // The purpose of this block is to be ensured, that hits belong to the correct tracking station. For each tracking @@ -149,7 +146,7 @@ std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() res = false; } } - resMap["station_position_hit_delta_z"] = res; + StoreCheckResult("station_position_hit_delta_z", res); } // ******************************************************* @@ -174,8 +171,8 @@ std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() auto eff = fvph_reco_eff[iSt]->GetMean(); pEffTable->SetCell(iSt, 0, iSt); pEffTable->SetCell(iSt, 1, eff); - resMap[Form("hit_efficiency_station_%d", iSt)] = - CheckRange("Hit finder efficiency in station " + std::to_string(iSt), eff, fEffThrsh, 1.000); + bool res = CheckRange("Hit finder efficiency in station " + std::to_string(iSt), eff, fEffThrsh, 1.000); + StoreCheckResult(Form("hit_efficiency_station_%d", iSt), res); } LOG(info) << '\n' << pEffTable->ToString(3); } @@ -224,9 +221,9 @@ std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() cbm::qa::util::SetLargeStats(fvph_pull_t[iSt]); // Check the pull quality - resMap[Form("pull_station_%d_pull_x", iSt)] = CheckRangePull(fvph_pull_x[iSt]); - resMap[Form("pull_station_%d_pull_y", iSt)] = CheckRangePull(fvph_pull_y[iSt]); - resMap[Form("pull_station_%d_pull_t", iSt)] = CheckRangePull(fvph_pull_t[iSt]); + StoreCheckResult(Form("pull_x_station_%d", iSt), CheckRangePull(fvph_pull_x[iSt])); + StoreCheckResult(Form("pull_y_station_%d", iSt), CheckRangePull(fvph_pull_y[iSt])); + StoreCheckResult(Form("pull_t_station_%d", iSt), CheckRangePull(fvph_pull_t[iSt])); pPullsTable->SetCell(iSt, 0, iSt); pPullsTable->SetCell(iSt, 1, fvph_pull_x[iSt]->GetStdDev()); @@ -237,8 +234,6 @@ std::map<std::string, bool> CbmCaInputQaBase<DetID>::Check() LOG(info) << '\n' << pPullsTable->ToString(3); } } // McUsed - - return resMap; } // --------------------------------------------------------------------------------------------------------------------- diff --git a/reco/L1/qa/CbmCaInputQaBase.h b/reco/L1/qa/CbmCaInputQaBase.h index 5f71e64dc2..c91a030e32 100644 --- a/reco/L1/qa/CbmCaInputQaBase.h +++ b/reco/L1/qa/CbmCaInputQaBase.h @@ -100,7 +100,7 @@ class CbmCaInputQaBase : public CbmQaTask { /// \brief Method to check, if the QA results are acceptable /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override; + void Check() override; /// @brief Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaInputQaMuch.h b/reco/L1/qa/CbmCaInputQaMuch.h index 414001d5a7..adbf58508a 100644 --- a/reco/L1/qa/CbmCaInputQaMuch.h +++ b/reco/L1/qa/CbmCaInputQaMuch.h @@ -23,8 +23,7 @@ class CbmCaInputQaMuch : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kMu protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override { return CbmCaInputQaBase::Check(); } + void Check() override { return CbmCaInputQaBase::Check(); } /// @brief Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaInputQaMvd.h b/reco/L1/qa/CbmCaInputQaMvd.h index 6748e11c1f..0a92507d62 100644 --- a/reco/L1/qa/CbmCaInputQaMvd.h +++ b/reco/L1/qa/CbmCaInputQaMvd.h @@ -23,8 +23,7 @@ class CbmCaInputQaMvd : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kMvd protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override { return CbmCaInputQaBase::Check(); } + void Check() override { return CbmCaInputQaBase::Check(); } /// @brief Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaInputQaSetup.cxx b/reco/L1/qa/CbmCaInputQaSetup.cxx index d56e079c58..4ff128997c 100644 --- a/reco/L1/qa/CbmCaInputQaSetup.cxx +++ b/reco/L1/qa/CbmCaInputQaSetup.cxx @@ -25,7 +25,7 @@ InputQaSetup::InputQaSetup(int verbose, bool isMCUsed) : CbmQaTask("CbmCaInputQa // --------------------------------------------------------------------------------------------------------------------- // -std::map<std::string, bool> InputQaSetup::Check() { return std::map<std::string, bool>(); } +void InputQaSetup::Check() {} // --------------------------------------------------------------------------------------------------------------------- diff --git a/reco/L1/qa/CbmCaInputQaSetup.h b/reco/L1/qa/CbmCaInputQaSetup.h index fa484fe220..c378e35641 100644 --- a/reco/L1/qa/CbmCaInputQaSetup.h +++ b/reco/L1/qa/CbmCaInputQaSetup.h @@ -53,7 +53,7 @@ namespace cbm::ca void SetDetectorFlag(ca::EDetectorID detID, bool flag = true) { fvbUseDet[detID] = flag; } /// @brief Checks results of the QA and returns a success flag - std::map<std::string, bool> Check() override; + void Check() override; /// @brief Initializes canvases InitStatus InitCanvases() override; diff --git a/reco/L1/qa/CbmCaInputQaSts.cxx b/reco/L1/qa/CbmCaInputQaSts.cxx index b67a942cdb..4083bba43f 100644 --- a/reco/L1/qa/CbmCaInputQaSts.cxx +++ b/reco/L1/qa/CbmCaInputQaSts.cxx @@ -55,21 +55,18 @@ CbmCaInputQaSts::CbmCaInputQaSts(int verbose, bool isMCUsed) : CbmCaInputQaBase( // --------------------------------------------------------------------------------------------------------------------- // -std::map<std::string, bool> CbmCaInputQaSts::Check() +void CbmCaInputQaSts::Check() { - std::map<std::string, bool> res = CbmCaInputQaBase::Check(); - + CbmCaInputQaBase::Check(); if (IsMCUsed()) { for (int idig = 0; idig <= fkMaxDigisInClusterForPulls; idig++) { cbm::qa::util::SetLargeStats(fvph_pull_u_Ndig[idig]); - res[Form("pull_pull_u_%d_digis", idig)] = CheckRangePull(fvph_pull_u_Ndig[idig]); + StoreCheckResult(Form("pull_u_%d_digis", idig), CheckRangePull(fvph_pull_u_Ndig[idig])); cbm::qa::util::SetLargeStats(fvph_pull_v_Ndig[idig]); - res[Form("pull_pull_v_%d_digis", idig)] = CheckRangePull(fvph_pull_v_Ndig[idig]); + StoreCheckResult(Form("pull_v_%d_digis", idig), CheckRangePull(fvph_pull_v_Ndig[idig])); } } // McUsed - - return res; } // --------------------------------------------------------------------------------------------------------------------- diff --git a/reco/L1/qa/CbmCaInputQaSts.h b/reco/L1/qa/CbmCaInputQaSts.h index 36e3478fbd..383f3c1062 100644 --- a/reco/L1/qa/CbmCaInputQaSts.h +++ b/reco/L1/qa/CbmCaInputQaSts.h @@ -44,8 +44,7 @@ class CbmCaInputQaSts : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kSts protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override; + void Check() override; /// Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaInputQaTof.h b/reco/L1/qa/CbmCaInputQaTof.h index 96357c8063..b586fcf451 100644 --- a/reco/L1/qa/CbmCaInputQaTof.h +++ b/reco/L1/qa/CbmCaInputQaTof.h @@ -49,8 +49,7 @@ class CbmCaInputQaTof : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kTof protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override { return CbmCaInputQaBase::Check(); } + void Check() override { CbmCaInputQaBase::Check(); } /// @brief Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaInputQaTrd.h b/reco/L1/qa/CbmCaInputQaTrd.h index db103ee5d8..3eac8d2119 100644 --- a/reco/L1/qa/CbmCaInputQaTrd.h +++ b/reco/L1/qa/CbmCaInputQaTrd.h @@ -23,8 +23,7 @@ class CbmCaInputQaTrd : public CbmCaInputQaBase<cbm::algo::ca::EDetectorID::kTrd protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override { return CbmCaInputQaBase::Check(); } + void Check() override { CbmCaInputQaBase::Check(); } /// @brief Initializes data branches InitStatus InitDataBranches() override; diff --git a/reco/L1/qa/CbmCaOutputQa.cxx b/reco/L1/qa/CbmCaOutputQa.cxx index ea25ca2d1e..88c0551657 100644 --- a/reco/L1/qa/CbmCaOutputQa.cxx +++ b/reco/L1/qa/CbmCaOutputQa.cxx @@ -597,7 +597,7 @@ InitStatus OutputQa::InitHistograms() // --------------------------------------------------------------------------------------------------------------------- // -std::map<std::string, bool> OutputQa::Check() +void OutputQa::Check() { // Create summary table if (IsMCUsed()) { @@ -645,8 +645,6 @@ std::map<std::string, bool> OutputQa::Check() } LOG(info) << '\n' << fMonitor.ToString(); - - return std::map<std::string, bool>(); } // --------------------------------------------------------------------------------------------------------------------- diff --git a/reco/L1/qa/CbmCaOutputQa.h b/reco/L1/qa/CbmCaOutputQa.h index 9a90689d9d..79cf1921c3 100644 --- a/reco/L1/qa/CbmCaOutputQa.h +++ b/reco/L1/qa/CbmCaOutputQa.h @@ -193,8 +193,7 @@ namespace cbm::ca protected: /// \brief Method to check, if the QA results are acceptable - /// \return Map of checks: key - name of the check, value - result of the check - std::map<std::string, bool> Check() override; + void Check() override; /// @brief Initializes canvases InitStatus InitCanvases() override; -- GitLab