From 6e8cfd4726485ab4138e602f9f047fc926e16810 Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Mon, 28 Apr 2025 12:25:42 +0200 Subject: [PATCH 1/3] consistently use ppTree in PostProcessingConfig when possible --- Framework/src/PostProcessingConfig.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Framework/src/PostProcessingConfig.cxx b/Framework/src/PostProcessingConfig.cxx index 3c33ffda16..f0a9a9a4d2 100644 --- a/Framework/src/PostProcessingConfig.cxx +++ b/Framework/src/PostProcessingConfig.cxx @@ -34,13 +34,16 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p matchAnyRunNumber(config.get("qc.config.postprocessing.matchAnyRunNumber", false)), critical(true) { - moduleName = config.get("qc.postprocessing." + id + ".moduleName"); - className = config.get("qc.postprocessing." + id + ".className"); - detectorName = config.get("qc.postprocessing." + id + ".detectorName", "MISC"); + auto ppTree = config.get_child("qc.postprocessing." + id); + + moduleName = ppTree.get("moduleName"); + className = ppTree.get("className"); + detectorName = ppTree.get("detectorName", "MISC"); ccdbUrl = config.get("qc.config.conditionDB.url", ""); consulUrl = config.get("qc.config.consul.url", ""); + // if available, use the source repo as defined in the postprocessing task, otherwise the general QCDB - auto sourceRepo = config.get_child_optional("qc.postprocessing." + id + ".sourceRepo"); + auto sourceRepo = ppTree.get_child_optional("sourceRepo"); auto databasePath = sourceRepo ? "qc.postprocessing." + id + ".sourceRepo" : "qc.config.database"; auto qcdbUrl = config.get(databasePath + ".implementation") == "CCDB" ? config.get(databasePath + ".host") : ""; // build the config of the qcdb @@ -50,16 +53,15 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p }; repository = dbConfig; - for (const auto& initTrigger : config.get_child("qc.postprocessing." + id + ".initTrigger")) { + for (const auto& initTrigger : ppTree.get_child("initTrigger")) { initTriggers.push_back(initTrigger.second.get_value()); } - for (const auto& updateTrigger : config.get_child("qc.postprocessing." + id + ".updateTrigger")) { + for (const auto& updateTrigger : ppTree.get_child("updateTrigger")) { updateTriggers.push_back(updateTrigger.second.get_value()); } - for (const auto& stopTrigger : config.get_child("qc.postprocessing." + id + ".stopTrigger")) { + for (const auto& stopTrigger : ppTree.get_child("stopTrigger")) { stopTriggers.push_back(stopTrigger.second.get_value()); } - auto ppTree = config.get_child("qc.postprocessing." + id); if (ppTree.count("extendedTaskParameters")) { customParameters.populateCustomParameters(ppTree.get_child("extendedTaskParameters")); } else if (ppTree.count("taskParameters") > 0) { From 495b88eb37b4870d938c931c2c55d88ea6976c2d Mon Sep 17 00:00:00 2001 From: Piotr Konopka Date: Mon, 28 Apr 2025 13:22:37 +0200 Subject: [PATCH 2/3] remove unused "critical" field in PostProcessingConfig --- Framework/include/QualityControl/PostProcessingConfig.h | 1 - Framework/src/PostProcessingConfig.cxx | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Framework/include/QualityControl/PostProcessingConfig.h b/Framework/include/QualityControl/PostProcessingConfig.h index 88a13d2e62..9dfb636874 100644 --- a/Framework/include/QualityControl/PostProcessingConfig.h +++ b/Framework/include/QualityControl/PostProcessingConfig.h @@ -42,7 +42,6 @@ struct PostProcessingConfig : public o2::quality_control::core::UserCodeConfig { std::string kafkaTopic; core::Activity activity; bool matchAnyRunNumber = false; - bool critical; }; } // namespace o2::quality_control::postprocessing diff --git a/Framework/src/PostProcessingConfig.cxx b/Framework/src/PostProcessingConfig.cxx index f0a9a9a4d2..ed59781c3c 100644 --- a/Framework/src/PostProcessingConfig.cxx +++ b/Framework/src/PostProcessingConfig.cxx @@ -31,8 +31,7 @@ PostProcessingConfig::PostProcessingConfig(const std::string& id, const boost::p config.get("qc.config.Activity.provenance", "qc"), { config.get("qc.config.Activity.start", 0), config.get("qc.config.Activity.end", -1) }), - matchAnyRunNumber(config.get("qc.config.postprocessing.matchAnyRunNumber", false)), - critical(true) + matchAnyRunNumber(config.get("qc.config.postprocessing.matchAnyRunNumber", false)) { auto ppTree = config.get_child("qc.postprocessing." + id); From 4f003334059fbac4fc15748fb2e90af5e1f3d7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20von=20Haller?= Date: Mon, 5 May 2025 11:15:29 +0200 Subject: [PATCH 3/3] fix bad merge --- Framework/include/QualityControl/PostProcessingConfig.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Framework/include/QualityControl/PostProcessingConfig.h b/Framework/include/QualityControl/PostProcessingConfig.h index 5740db5064..8261496478 100644 --- a/Framework/include/QualityControl/PostProcessingConfig.h +++ b/Framework/include/QualityControl/PostProcessingConfig.h @@ -42,6 +42,7 @@ struct PostProcessingConfig : public o2::quality_control::core::UserCodeConfig { std::string kafkaTopicAliECSRun; core::Activity activity; bool matchAnyRunNumber = false; + bool validityFromLastTriggerOnly = false; }; } // namespace o2::quality_control::postprocessing