Skip to content

Commit

Permalink
PWGHF: implement requested changes in old PR omegac xic (AliceO2Group…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZFederica authored May 14, 2024
1 parent e7aa767 commit c2c5f64
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,21 @@ struct HfCandidateCreatorXic0Omegac0 {

void init(InitContext const&)
{
std::array<bool, 9> 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<bool, 3> 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<bool, 3> 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<bool, 9> processesToOmegaK = {doprocessNoCentToOmegaK, doprocessCentFT0CToOmegaK, doprocessCentFT0MToOmegaK};
if (std::accumulate(processesToOmegaK.begin(), processesToOmegaK.end(), 0) != 1) {
std::array<bool, 3> 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.");
}

Expand Down

0 comments on commit c2c5f64

Please sign in to comment.