From 8e57c1dd56d38edf7bb0934e9b3444928c3878c7 Mon Sep 17 00:00:00 2001 From: glromane <95305986+glromane@users.noreply.github.com> Date: Tue, 21 Jan 2025 22:16:41 +0100 Subject: [PATCH] Propagate list of tables also in case of derived data --- Framework/AnalysisSupport/src/Plugin.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Framework/AnalysisSupport/src/Plugin.cxx b/Framework/AnalysisSupport/src/Plugin.cxx index 52435375d7e9e..e3a39761e8049 100644 --- a/Framework/AnalysisSupport/src/Plugin.cxx +++ b/Framework/AnalysisSupport/src/Plugin.cxx @@ -155,12 +155,14 @@ struct DiscoverMetadataInAOD : o2::framework::ConfigDiscoveryPlugin { LOGP(fatal, "Couldn't open file \"{}\"!", filename); } std::vector results = readMetadata(currentFile); + const bool metaDataEmpty = results.empty(); + auto tables = getListOfTables(currentFile); + if (tables.empty() == false) { + results.push_back(ConfigParamSpec{"aod-metadata-tables", VariantType::ArrayString, tables, {"Tables in first AOD"}}); + } + // Found metadata already in the main file. - if (!results.empty()) { - auto tables = getListOfTables(currentFile); - if (tables.empty() == false) { - results.push_back(ConfigParamSpec{"aod-metadata-tables", VariantType::ArrayString, tables, {"Tables in first AOD"}}); - } + if (!metaDataEmpty) { results.push_back(ConfigParamSpec{"aod-metadata-source", VariantType::String, filename, {"File from which the metadata was extracted."}}); return results; }