From 653c4beab078e9eb1c7d3abc3493876b5d6dcce7 Mon Sep 17 00:00:00 2001 From: Jan Fiete Date: Tue, 26 Jul 2022 14:57:50 +0200 Subject: [PATCH 1/2] fatal error for invalid configuration --- Common/TableProducer/centralityTable.cxx | 7 +++++++ Common/TableProducer/multiplicityTable.cxx | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Common/TableProducer/centralityTable.cxx b/Common/TableProducer/centralityTable.cxx index eb7f902c7d1..5603f5a761e 100644 --- a/Common/TableProducer/centralityTable.cxx +++ b/Common/TableProducer/centralityTable.cxx @@ -102,6 +102,13 @@ struct CentralityTable { void init(InitContext& context) { + if (doprocessRun2 == false && doprocessRun3 == false) { + LOGF(fatal, "Neither processRun2 nor processRun3 enabled. Please choose one."); + } + if (doprocessRun2 == true && doprocessRun3 == true) { + LOGF(fatal, "Cannot enable processRun2 and processRun3 at the same time. Please choose one."); + } + /* Checking the tables which are requested in the workflow and enabling them */ auto& workflows = context.services().get(); for (DeviceSpec device : workflows.devices) { diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index 61b0d4ef967..ac505a1653d 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -54,6 +54,13 @@ struct MultiplicityTableTaskIndexed { void init(InitContext& context) { + if (doprocessRun2 == false && doprocessRun3 == false) { + LOGF(fatal, "Neither processRun2 nor processRun3 enabled. Please choose one."); + } + if (doprocessRun2 == true && doprocessRun3 == true) { + LOGF(fatal, "Cannot enable processRun2 and processRun3 at the same time. Please choose one."); + } + mRunNumber = 0; lCalibLoaded = false; lCalibObjects = nullptr; From f9be221d2cc5c79e0e9ddb91cb7deb4553545556 Mon Sep 17 00:00:00 2001 From: Jan Fiete Date: Tue, 26 Jul 2022 15:39:30 +0200 Subject: [PATCH 2/2] switch processRun2 on by default --- Common/TableProducer/centralityTable.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/TableProducer/centralityTable.cxx b/Common/TableProducer/centralityTable.cxx index 5603f5a761e..ca27136fdc7 100644 --- a/Common/TableProducer/centralityTable.cxx +++ b/Common/TableProducer/centralityTable.cxx @@ -297,7 +297,7 @@ struct CentralityTable { centRun2CL1(cCL1); } } - PROCESS_SWITCH(CentralityTable, processRun2, "Provide Run2 calibrated centrality/multiplicity percentiles tables", false); + PROCESS_SWITCH(CentralityTable, processRun2, "Provide Run2 calibrated centrality/multiplicity percentiles tables", true); using BCsWithTimestamps = soa::Join;