From 060d8de8714d768dbc6e79758d422e715a63f7c0 Mon Sep 17 00:00:00 2001 From: rspijkers Date: Mon, 22 Jan 2024 15:22:17 +0100 Subject: [PATCH 1/4] Fix autodetect in strangeness builders Look for Casc/V0 Indices tables instead of Datas tables --- PWGLF/TableProducer/cascadebuilder.cxx | 9 +++++---- PWGLF/TableProducer/lambdakzerobuilder.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/PWGLF/TableProducer/cascadebuilder.cxx b/PWGLF/TableProducer/cascadebuilder.cxx index 4521d9680ad..8ef5bacba7a 100644 --- a/PWGLF/TableProducer/cascadebuilder.cxx +++ b/PWGLF/TableProducer/cascadebuilder.cxx @@ -513,10 +513,11 @@ struct cascadeBuilder { for (auto const& input : device.inputs) { if (device.name.compare("cascade-initializer") == 0) continue; // don't listen to the initializer, it's just to extend stuff - const std::string CascDataName = "StoredCascDatas"; - const std::string CascDataExtName = "CascDatasExtension"; - if (input.matcher.binding == CascDataName || input.matcher.binding == CascDataExtName) { - LOGF(info, "Device named %s has subscribed to CascData table! Will now scan for desired settings...", device.name); + const std::string CascIndicesName = "CascIndices"; + const std::string KFCascIndicesName = "KFCascIndices"; + const std::string TraCascIndicesName = "TraCascIndices"; + if (input.matcher.binding == CascIndicesName || input.matcher.binding == KFCascIndicesName || input.matcher.binding == TraCascIndicesName) { + LOGF(info, "Device named %s has subscribed to a CascIndices table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) { // 5 V0 topological selections + 1 mass if (option.name.compare("cascadesetting_cospa") == 0) { diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 05e25e7d37e..03e6d192b71 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -413,10 +413,10 @@ struct lambdakzeroBuilder { for (auto const& input : device.inputs) { if (device.name.compare("lambdakzero-initializer") == 0) continue; // don't listen to the initializer, it's just to extend stuff - const std::string v0DataName = "V0Datas"; - const std::string v0DataExtName = "V0DatasExtension"; - if ((input.matcher.binding == v0DataName || input.matcher.binding == v0DataExtName) && device.name.compare("multistrange-builder") != 0) { - LOGF(info, "Device named %s has subscribed to V0datas table! Will now scan for desired settings...", device.name); + const std::string v0IndicesName = "V0Indices"; + const std::string v0fCIndicesName = "V0fCIndices"; + if ((input.matcher.binding == v0IndicesName || input.matcher.binding == v0fCIndicesName) && device.name.compare("multistrange-builder") != 0) { + LOGF(info, "Device named %s has subscribed to a V0Indices table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) { // 5 V0 topological selections if (option.name.compare("v0setting_cospa") == 0) { From 62616a75b282aeeaf1ad354a8a742563b79ab591 Mon Sep 17 00:00:00 2001 From: rspijkers Date: Mon, 22 Jan 2024 16:12:56 +0100 Subject: [PATCH 2/4] Change from V0/Casc Indices to Cores --- PWGLF/TableProducer/cascadebuilder.cxx | 10 +++++----- PWGLF/TableProducer/lambdakzerobuilder.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PWGLF/TableProducer/cascadebuilder.cxx b/PWGLF/TableProducer/cascadebuilder.cxx index 8ef5bacba7a..12cf1e7fa88 100644 --- a/PWGLF/TableProducer/cascadebuilder.cxx +++ b/PWGLF/TableProducer/cascadebuilder.cxx @@ -513,11 +513,11 @@ struct cascadeBuilder { for (auto const& input : device.inputs) { if (device.name.compare("cascade-initializer") == 0) continue; // don't listen to the initializer, it's just to extend stuff - const std::string CascIndicesName = "CascIndices"; - const std::string KFCascIndicesName = "KFCascIndices"; - const std::string TraCascIndicesName = "TraCascIndices"; - if (input.matcher.binding == CascIndicesName || input.matcher.binding == KFCascIndicesName || input.matcher.binding == TraCascIndicesName) { - LOGF(info, "Device named %s has subscribed to a CascIndices table! Will now scan for desired settings...", device.name); + const std::string CascCoresName = "StoredCascCores"; + const std::string KFCascCoresName = "StoredKFCascCores"; + const std::string TraCascCoresName = "StoredTraCascCores"; + if (input.matcher.binding == CascCoresName || input.matcher.binding == KFCascCoresName || input.matcher.binding == TraCascCoresName) { + LOGF(info, "Device named %s has subscribed to a CascCores table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) { // 5 V0 topological selections + 1 mass if (option.name.compare("cascadesetting_cospa") == 0) { diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 03e6d192b71..75776a21d27 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -413,10 +413,10 @@ struct lambdakzeroBuilder { for (auto const& input : device.inputs) { if (device.name.compare("lambdakzero-initializer") == 0) continue; // don't listen to the initializer, it's just to extend stuff - const std::string v0IndicesName = "V0Indices"; - const std::string v0fCIndicesName = "V0fCIndices"; - if ((input.matcher.binding == v0IndicesName || input.matcher.binding == v0fCIndicesName) && device.name.compare("multistrange-builder") != 0) { - LOGF(info, "Device named %s has subscribed to a V0Indices table! Will now scan for desired settings...", device.name); + const std::string v0CoresName = "V0Cores"; + const std::string v0fCCoressName = "V0fCCores"; + if ((input.matcher.binding == v0CoresName || input.matcher.binding == v0fCCoressName) && device.name.compare("multistrange-builder") != 0) { + LOGF(info, "Device named %s has subscribed to a V0Cores table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) { // 5 V0 topological selections if (option.name.compare("v0setting_cospa") == 0) { From f740075063238c09d986cca2b4cfd6277a338155 Mon Sep 17 00:00:00 2001 From: rspijkers Date: Fri, 26 Jan 2024 11:37:12 +0100 Subject: [PATCH 3/4] Also search devices that subscribe to casc tables for V0 settings --- PWGLF/TableProducer/lambdakzerobuilder.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index 75776a21d27..c72de0f041e 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -411,12 +411,17 @@ struct lambdakzeroBuilder { for (DeviceSpec const& device : workflows.devices) { // Step 1: check if this device subscribed to the V0data table for (auto const& input : device.inputs) { - if (device.name.compare("lambdakzero-initializer") == 0) - continue; // don't listen to the initializer, it's just to extend stuff + if (device.name.compare("lambdakzero-initializer") == 0 || device.name.compare("cascade-initializer") == 0) + continue; // don't listen to the initializers, it's just to extend stuff const std::string v0CoresName = "V0Cores"; const std::string v0fCCoressName = "V0fCCores"; - if ((input.matcher.binding == v0CoresName || input.matcher.binding == v0fCCoressName) && device.name.compare("multistrange-builder") != 0) { - LOGF(info, "Device named %s has subscribed to a V0Cores table! Will now scan for desired settings...", device.name); + const std::string CascCoresName = "StoredCascCores"; + const std::string KFCascCoresName = "StoredKFCascCores"; + const std::string TraCascCoresName = "StoredTraCascCores"; + // Logic: device is subscribed to a V0 table (excluding the cascade builder) or it's subscribed a Casc table + if (((input.matcher.binding == v0CoresName || input.matcher.binding == v0fCCoressName) && device.name.compare("cascade-builder") != 0 ) || + input.matcher.binding == CascCoresName || input.matcher.binding == KFCascCoresName || input.matcher.binding == TraCascCoresName) { + LOGF(info, "Device named %s has subscribed to a V0/Casc Cores table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) { // 5 V0 topological selections if (option.name.compare("v0setting_cospa") == 0) { From 0327ac7a30719188b6975ff3455a73e8983786fb Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Fri, 26 Jan 2024 11:40:34 +0100 Subject: [PATCH 4/4] Please consider the following formatting changes (#9) --- PWGLF/TableProducer/lambdakzerobuilder.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/TableProducer/lambdakzerobuilder.cxx b/PWGLF/TableProducer/lambdakzerobuilder.cxx index c72de0f041e..bb6cf17167a 100644 --- a/PWGLF/TableProducer/lambdakzerobuilder.cxx +++ b/PWGLF/TableProducer/lambdakzerobuilder.cxx @@ -418,8 +418,8 @@ struct lambdakzeroBuilder { const std::string CascCoresName = "StoredCascCores"; const std::string KFCascCoresName = "StoredKFCascCores"; const std::string TraCascCoresName = "StoredTraCascCores"; - // Logic: device is subscribed to a V0 table (excluding the cascade builder) or it's subscribed a Casc table - if (((input.matcher.binding == v0CoresName || input.matcher.binding == v0fCCoressName) && device.name.compare("cascade-builder") != 0 ) || + // Logic: device is subscribed to a V0 table (excluding the cascade builder) or it's subscribed a Casc table + if (((input.matcher.binding == v0CoresName || input.matcher.binding == v0fCCoressName) && device.name.compare("cascade-builder") != 0) || input.matcher.binding == CascCoresName || input.matcher.binding == KFCascCoresName || input.matcher.binding == TraCascCoresName) { LOGF(info, "Device named %s has subscribed to a V0/Casc Cores table! Will now scan for desired settings...", device.name); for (auto const& option : device.options) {