From b650e39fc75360abf0b1a8be7a70500d4c899147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Jacazio?= Date: Tue, 14 May 2024 19:06:56 +0200 Subject: [PATCH] Fix Zeq multiplicity table filling (#6140) - only affects cases when the FT0 tables are not subscribed to --- Common/TableProducer/multiplicityTable.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index bd455c8b4b1..23652edc066 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -40,6 +40,13 @@ static constexpr int kFDDMultZeqs = 11; static constexpr int kPVMultZeqs = 12; static constexpr int kMultsExtraMC = 13; static constexpr int nTables = 14; + +// Checking that the Zeq tables are after the normal ones +static_assert(kFV0Mults < kFV0MultZeqs); +static_assert(kFT0Mults < kFT0MultZeqs); +static_assert(kFDDMults < kFDDMultZeqs); +static_assert(kPVMults < kPVMultZeqs); + static constexpr int nParameters = 1; static const std::vector tableNames{"FV0Mults", // 0 "FT0Mults", // 1 @@ -151,6 +158,7 @@ struct MultiplicityTable { mEnabledTables.push_back(kPVMults); LOG(info) << "Cannot have the " << tableNames[kPVMultZeqs] << " table enabled and not the one on " << tableNames[kPVMults] << ". Enabling it."; } + std::sort(mEnabledTables.begin(), mEnabledTables.end()); mRunNumber = 0; lCalibLoaded = false;