From 0e4007f6fdd5d6ac6bb77627fefef711d156d74a Mon Sep 17 00:00:00 2001 From: mlesch Date: Fri, 28 Jul 2023 13:32:44 +0200 Subject: [PATCH] TPC: Update Quality Aggregator --- Modules/TPC/src/TPCAggregator.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Modules/TPC/src/TPCAggregator.cxx b/Modules/TPC/src/TPCAggregator.cxx index e3ac8f0384..7c100db8c6 100644 --- a/Modules/TPC/src/TPCAggregator.cxx +++ b/Modules/TPC/src/TPCAggregator.cxx @@ -42,7 +42,12 @@ std::map TPCAggregator::aggregate(QualityObjectsMapType& q AggregatorMetaData[Quality::Bad.getName()] = ""; AggregatorMetaData[Quality::Medium.getName()] = ""; AggregatorMetaData[Quality::Good.getName()] = ""; - AggregatorMetaData["Comment"] = ""; + + std::unordered_map AggregatorComment; + AggregatorComment[Quality::Null.getName()] = ""; + AggregatorComment[Quality::Bad.getName()] = ""; + AggregatorComment[Quality::Medium.getName()] = ""; + AggregatorComment[Quality::Good.getName()] = ""; // we return the worse quality of all the objects we receive, but we preserve all FlagReasons Quality current = Quality::Good; @@ -61,7 +66,7 @@ std::map TPCAggregator::aggregate(QualityObjectsMapType& q insertQOName(qoMetaDataComment, insertTitle); AggregatorMetaData[qo->getQuality().getName()] += qoMetaData; - AggregatorMetaData["Comment"] += qoMetaDataComment; + AggregatorComment[qo->getQuality().getName()] += qoMetaDataComment; if (qo->getQuality().isWorseThan(current)) { current.set(qo->getQuality()); @@ -73,7 +78,7 @@ std::map TPCAggregator::aggregate(QualityObjectsMapType& q current.addMetadata(Quality::Medium.getName(), AggregatorMetaData[Quality::Medium.getName()]); current.addMetadata(Quality::Good.getName(), AggregatorMetaData[Quality::Good.getName()]); current.addMetadata(Quality::Null.getName(), AggregatorMetaData[Quality::Null.getName()]); - current.addMetadata("Comment", AggregatorMetaData["Comment"]); + current.addMetadata("Comment", AggregatorComment[current.getName()]); return { { mName, current } }; }