diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index d1698f55c85..8a87abc7804 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -105,16 +105,21 @@ struct HfCandidateCreatorXic0Omegac0 { void init(InitContext const&) { + std::array allProcesses = {doprocessNoCentToXiPi, doprocessCentFT0CToXiPi, doprocessCentFT0MToXiPi, doprocessNoCentToOmegaPi, doprocessCentFT0CToOmegaPi, doprocessCentFT0MToOmegaPi, doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK}; + if (std::accumulate(allProcesses.begin(), allProcesses.end(), 0) == 0) { + LOGP(fatal, "No process function enabled, please select one for at least one channel."); + } + std::array processesToXiPi = {doprocessNoCentToXiPi, doprocessCentFT0CToXiPi, doprocessCentFT0MToXiPi}; - if (std::accumulate(processesToXiPi.begin(), processesToXiPi.end(), 0) != 1) { + if (std::accumulate(processesToXiPi.begin(), processesToXiPi.end(), 0) > 1) { LOGP(fatal, "One and only one ToXiPi process function must be enabled at a time."); } std::array processesToOmegaPi = {doprocessNoCentToOmegaPi, doprocessCentFT0CToOmegaPi, doprocessCentFT0MToOmegaPi}; - if (std::accumulate(processesToOmegaPi.begin(), processesToOmegaPi.end(), 0) != 1) { + if (std::accumulate(processesToOmegaPi.begin(), processesToOmegaPi.end(), 0) > 1) { LOGP(fatal, "One and only one process ToOmegaPi function must be enabled at a time."); } - std::array processesToOmegaK = {doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK}; - if (std::accumulate(processesToOmegaK.begin(), processesToOmegaK.end(), 0) != 1) { + std::array processesToOmegaK = {doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK}; + if (std::accumulate(processesToOmegaK.begin(), processesToOmegaK.end(), 0) > 1) { LOGP(fatal, "One and only one process ToOmegaK function must be enabled at a time."); }