@@ -515,13 +515,14 @@ struct UccZdc {
515515 registry.fill (HIST (" hEventCounter" ), EvCutLabel::Zem);
516516 }
517517
518- const auto & fMeanNch = ccdb->getForTimeStamp <TF1>(paTHmeanNch.value , foundBC.timestamp ());
519- const auto & fSigmaNch = ccdb->getForTimeStamp <TF1>(paTHsigmaNch.value , foundBC.timestamp ());
520- if (!fMeanNch ) {
521- LOGF (fatal, " fMeanNch object not found!" );
518+ // Get Nch-based selection objects from the CCDB
519+ fMeanNch = ccdb->getForTimeStamp <TF1>(paTHmeanNch.value , foundBC.timestamp ());
520+ fSigmaNch = ccdb->getForTimeStamp <TF1>(paTHsigmaNch.value , foundBC.timestamp ());
521+ if (fMeanNch == nullptr ) {
522+ LOGF (fatal, " Could not load fMeanNch!" );
522523 }
523- if (! fSigmaNch ) {
524- LOGF (fatal, " fSigmaNch object not found !" );
524+ if (fSigmaNch == nullptr ) {
525+ LOGF (fatal, " Could not load fSigmaNch !" );
525526 }
526527
527528 float znA{zdc.amplitudeZNA ()};
@@ -619,10 +620,9 @@ struct UccZdc {
619620 const auto & foundBC = collision.foundBC_as <o2::aod::BCsRun3>();
620621 // LOGF(info, "Getting object %s for run number %i from timestamp=%llu", paTH.value.data(), foundBC.runNumber(), foundBC.timestamp());
621622
622- const auto & efficiency = ccdb->getForTimeStamp <TH1F>(paTH.value , foundBC.timestamp ());
623- // auto efficiency = ccdb->getForRun<TH1F>(paTH.value, foundBC.runNumber());
624- if (!efficiency) {
625- LOGF (fatal, " Efficiency object not found!" );
623+ efficiency = ccdb->getForTimeStamp <TH1F>(paTH.value , foundBC.timestamp ());
624+ if (efficiency == nullptr ) {
625+ LOGF (fatal, " Could not load efficiency!" );
626626 }
627627
628628 // has ZDC?
@@ -676,14 +676,14 @@ struct UccZdc {
676676 registry.fill (HIST (" hEventCounter" ), EvCutLabel::Zem);
677677 }
678678
679- // Nch-based selection
680- const auto & fMeanNch = ccdb->getForTimeStamp <TF1>(paTHmeanNch.value , foundBC.timestamp ());
681- const auto & fSigmaNch = ccdb->getForTimeStamp <TF1>(paTHsigmaNch.value , foundBC.timestamp ());
682- if (! fMeanNch ) {
683- LOGF (fatal, " fMeanNch object not found !" );
679+ // Get Nch-based selection objects from the CCDB
680+ fMeanNch = ccdb->getForTimeStamp <TF1>(paTHmeanNch.value , foundBC.timestamp ());
681+ fSigmaNch = ccdb->getForTimeStamp <TF1>(paTHsigmaNch.value , foundBC.timestamp ());
682+ if (fMeanNch == nullptr ) {
683+ LOGF (fatal, " Could not load fMeanNch !" );
684684 }
685- if (! fSigmaNch ) {
686- LOGF (fatal, " fSigmaNch object not found !" );
685+ if (fSigmaNch == nullptr ) {
686+ LOGF (fatal, " Could not load fSigmaNch !" );
687687 }
688688
689689 std::vector<float > pTs;
0 commit comments