From 76227fe5d80c76162ab314d08383eeed5ab251f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Thu, 3 Jul 2025 18:22:34 +0200 Subject: [PATCH] [QC-1082] filter empty qos and mos in datasource --- Framework/src/InfrastructureSpecReader.cxx | 28 ++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/Framework/src/InfrastructureSpecReader.cxx b/Framework/src/InfrastructureSpecReader.cxx index c6beb40037..a904b3570a 100644 --- a/Framework/src/InfrastructureSpecReader.cxx +++ b/Framework/src/InfrastructureSpecReader.cxx @@ -230,7 +230,12 @@ DataSourceSpec InfrastructureSpecReader::readSpecEntry(const std dss.inputs = { { dss.name, TaskRunner::createTaskDataOrigin(detectorName), TaskRunner::createTaskDataDescription(dss.name), 0, Lifetime::Sporadic } }; if (dataSourceTree.count("MOs") > 0) { for (const auto& moName : dataSourceTree.get_child("MOs")) { - dss.subInputs.push_back(moName.second.get_value()); + const auto mo = moName.second.get_value(); + if (!mo.empty()) { + dss.subInputs.push_back(std::move(mo)); + } else { + ILOG(Warning, Ops) << "Data source of type Task with name: " << dss.name << " contains empty mo, ignoring, but configuration should be fixed." << ENDM; + } } } break; @@ -245,7 +250,12 @@ DataSourceSpec InfrastructureSpecReader::readSpecEntry(const std dss.inputs = { { dss.name, TaskRunner::createTaskDataOrigin(detectorName, true), TaskRunner::createTaskDataDescription(taskName), 0, Lifetime::Sporadic } }; if (dataSourceTree.count("MOs") > 0) { for (const auto& moName : dataSourceTree.get_child("MOs")) { - dss.subInputs.push_back(moName.second.get_value()); + const auto mo = moName.second.get_value(); + if (!mo.empty()) { + dss.subInputs.push_back(std::move(mo)); + } else { + ILOG(Warning, Ops) << "Data source of type TaskMovingWindow with name: " << dss.name << " contains empty mo, ignoring, but configuration should be fixed." << ENDM; + } } } break; @@ -270,7 +280,12 @@ DataSourceSpec InfrastructureSpecReader::readSpecEntry(const std dss.inputs = { { dss.name, Check::createCheckDataOrigin(detectorName), Check::createCheckDataDescription(dss.name), 0, Lifetime::Sporadic } }; if (dataSourceTree.count("QOs") > 0) { for (const auto& moName : dataSourceTree.get_child("QOs")) { - dss.subInputs.push_back(moName.second.get_value()); + const auto qo = moName.second.get_value(); + if (!qo.empty()) { + dss.subInputs.push_back(std::move(qo)); + } else { + ILOG(Warning, Ops) << "Data source of type Check with name: " << dss.name << " contains empty qo, ignoring, but configuration should be fixed." << ENDM; + } } } break; @@ -282,7 +297,12 @@ DataSourceSpec InfrastructureSpecReader::readSpecEntry(const std dss.inputs = { { dss.name, Check::createCheckDataOrigin(detectorName), AggregatorRunner::createAggregatorRunnerDataDescription(dss.name), 0, Lifetime::Sporadic } }; if (dataSourceTree.count("QOs") > 0) { for (const auto& moName : dataSourceTree.get_child("QOs")) { - dss.subInputs.push_back(moName.second.get_value()); + const auto qo = moName.second.get_value(); + if (!qo.empty()) { + dss.subInputs.push_back(std::move(qo)); + } else { + ILOG(Warning, Ops) << "Data source of type Aggregator with name: " << dss.name << " contains empty qo, ignoring, but configuration should be fixed." << ENDM; + } } } break;