diff --git a/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h b/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h index bc1c4383ec3..c93645522ca 100644 --- a/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h +++ b/PWGCF/FemtoUniverse/Core/FemtoUniverseObjectSelection.h @@ -54,8 +54,10 @@ class FemtoUniverseObjectSelection void fillSelectionHistogram() { int nBins = mSelections.size(); - LOGF(info, "%s", (static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + "/cuthist").c_str()); - mHistogramRegistry->add((static_cast(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + "/cuthist").c_str(), "; Cut; Value", o2::framework::HistType::kTH1F, {{nBins, 0, static_cast(nBins)}}); + std::string histName{o2::aod::femtouniverseparticle::ParticleTypeName[part]}; + histName += "/cuthist"; + LOGF(info, "%s", histName.c_str()); + mHistogramRegistry->add(histName, "; Cut; Value", o2::framework::HistType::kTH1F, {{nBins, 0, static_cast(nBins)}}); auto hist = mHistogramRegistry->get(HIST(o2::aod::femtouniverseparticle::ParticleTypeName[part]) + HIST("/cuthist")); for (size_t i = 0; i < mSelections.size(); ++i) { hist->GetXaxis()->SetBinLabel(i + 1, Form("%u", mSelections.at(i).getSelectionVariable())); diff --git a/PWGCF/FemtoWorld/Core/FemtoWorldObjectSelection.h b/PWGCF/FemtoWorld/Core/FemtoWorldObjectSelection.h index b266ee16638..a418ca31e4d 100644 --- a/PWGCF/FemtoWorld/Core/FemtoWorldObjectSelection.h +++ b/PWGCF/FemtoWorld/Core/FemtoWorldObjectSelection.h @@ -52,7 +52,9 @@ class FemtoWorldObjectSelection void fillSelectionHistogram() { int nBins = mSelections.size(); - mHistogramRegistry->add((static_cast(o2::aod::femtoworldparticle::ParticleTypeName[part]) + "/cuthist").c_str(), "; Cut; Value", o2::framework::HistType::kTH1F, {{nBins, 0, static_cast(nBins)}}); + std::string histName{o2::aod::femtoworldparticle::ParticleTypeName[part]}; + histName += "/cuthist"; + mHistogramRegistry->add(histName, "; Cut; Value", o2::framework::HistType::kTH1F, {{nBins, 0, static_cast(nBins)}}); auto hist = mHistogramRegistry->get(HIST(o2::aod::femtoworldparticle::ParticleTypeName[part]) + HIST("/cuthist")); for (size_t i = 0; i < mSelections.size(); ++i) { hist->GetXaxis()->SetBinLabel(i + 1, Form("%u", mSelections.at(i).getSelectionVariable()));