Skip to content

Commit

Permalink
fatal error for invalid configuration (AliceO2Group#1054)
Browse files Browse the repository at this point in the history
* fatal error for invalid configuration

* switch processRun2 on by default
  • Loading branch information
jgrosseo authored Jul 27, 2022
1 parent 9ddb447 commit b873ac7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Common/TableProducer/centralityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<RunningWorkflowInfo const>();
for (DeviceSpec device : workflows.devices) {
Expand Down Expand Up @@ -290,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<aod::BCs, aod::Timestamps>;

Expand Down
7 changes: 7 additions & 0 deletions Common/TableProducer/multiplicityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b873ac7

Please sign in to comment.