Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions PWGCF/JCorran/Tasks/jflucWeightsLoader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ struct JflucWeightsLoader {
bool useEffFromCCDB = false;
Service<o2::ccdb::BasicCCDBManager> ccdb;
std::string ccdbURL = "http://alice-ccdb.cern.ch";
enum { kNUA, kEFF };
enum { kNUA,
kEFF };

~JflucWeightsLoader()
{
Expand Down Expand Up @@ -139,13 +140,12 @@ enum { kNUA, kEFF };
LOGF(info, "Assuming efficiency corrections from CCDB.");
useEffFromCCDB = true;
// If NUA corrections are from CCDB, use the same CCDB URL for efficiency corrections
if (!useNUAFromCCDB) {
if (!useNUAFromCCDB) {
ccdb->setURL(ccdbURL.data()); // default CCDB URL
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();
ccdb->setFatalWhenNull(false);
}

}
}

Expand Down Expand Up @@ -174,7 +174,8 @@ enum { kNUA, kEFF };
}
if (pfeff) {
if (collision.runNumber() != runNumber) {
if (pheff) delete pheff;
if (pheff)
delete pheff;
if (!useEffFromCCDB) {
if (!(pheff = pfeff->Get<THnF>("ccdb_object"))) {
LOGF(warning, "Efficiency correction histogram not found.");
Expand Down
Loading