Skip to content

Commit c2c5f64

Browse files
authored
PWGHF: implement requested changes in old PR omegac xic (#6139)
1 parent e7aa767 commit c2c5f64

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,21 @@ struct HfCandidateCreatorXic0Omegac0 {
105105

106106
void init(InitContext const&)
107107
{
108+
std::array<bool, 9> allProcesses = {doprocessNoCentToXiPi, doprocessCentFT0CToXiPi, doprocessCentFT0MToXiPi, doprocessNoCentToOmegaPi, doprocessCentFT0CToOmegaPi, doprocessCentFT0MToOmegaPi, doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK};
109+
if (std::accumulate(allProcesses.begin(), allProcesses.end(), 0) == 0) {
110+
LOGP(fatal, "No process function enabled, please select one for at least one channel.");
111+
}
112+
108113
std::array<bool, 3> processesToXiPi = {doprocessNoCentToXiPi, doprocessCentFT0CToXiPi, doprocessCentFT0MToXiPi};
109-
if (std::accumulate(processesToXiPi.begin(), processesToXiPi.end(), 0) != 1) {
114+
if (std::accumulate(processesToXiPi.begin(), processesToXiPi.end(), 0) > 1) {
110115
LOGP(fatal, "One and only one ToXiPi process function must be enabled at a time.");
111116
}
112117
std::array<bool, 3> processesToOmegaPi = {doprocessNoCentToOmegaPi, doprocessCentFT0CToOmegaPi, doprocessCentFT0MToOmegaPi};
113-
if (std::accumulate(processesToOmegaPi.begin(), processesToOmegaPi.end(), 0) != 1) {
118+
if (std::accumulate(processesToOmegaPi.begin(), processesToOmegaPi.end(), 0) > 1) {
114119
LOGP(fatal, "One and only one process ToOmegaPi function must be enabled at a time.");
115120
}
116-
std::array<bool, 9> processesToOmegaK = {doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK};
117-
if (std::accumulate(processesToOmegaK.begin(), processesToOmegaK.end(), 0) != 1) {
121+
std::array<bool, 3> processesToOmegaK = {doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK};
122+
if (std::accumulate(processesToOmegaK.begin(), processesToOmegaK.end(), 0) > 1) {
118123
LOGP(fatal, "One and only one process ToOmegaK function must be enabled at a time.");
119124
}
120125

0 commit comments

Comments
 (0)