Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimckh committed Oct 17, 2024
2 parents 54accc8 + a2af4e4 commit 1bc2098
Show file tree
Hide file tree
Showing 189 changed files with 13,505 additions and 4,798 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeowner-self-approval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
approve:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
# Only run if the PR author enabled auto-merge, not someone else.
# Also run if a new approval was created, as this affects whether we can
# auto-approve. There is a risk of infinite loops here, though -- when we
Expand Down
24 changes: 12 additions & 12 deletions Common/TableProducer/centralityTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -249,18 +249,21 @@ struct CentralityTable {
/* check the previous run number */
auto bc = collision.bc_as<BCsWithTimestampsAndRun2Infos>();
if (bc.runNumber() != mRunNumber) {
mRunNumber = bc.runNumber(); // mark that this run has been attempted already regardless of outcome
LOGF(debug, "timestamp=%llu", bc.timestamp());
TList* callst = nullptr;
if (ccdbConfig.reconstructionPass.value == "") {
callst = ccdb->getForTimeStamp<TList>(ccdbConfig.ccdbPath, bc.timestamp());
callst = ccdb->getForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber());
} else if (ccdbConfig.reconstructionPass.value == "metadata") {
std::map<std::string, std::string> metadata;
metadata["RecoPassName"] = metadataInfo.get("RecoPassName");
callst = ccdb->getSpecific<TList>(ccdbConfig.ccdbPath, bc.timestamp(), metadata);
LOGF(info, "Loading CCDB for reconstruction pass (from metadata): %s", metadataInfo.get("RecoPassName"));
callst = ccdb->getSpecificForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber(), metadata);
} else {
std::map<std::string, std::string> metadata;
metadata["RecoPassName"] = ccdbConfig.reconstructionPass.value;
callst = ccdb->getSpecific<TList>(ccdbConfig.ccdbPath, bc.timestamp(), metadata);
LOGF(info, "Loading CCDB for reconstruction pass (from provided argument): %s", ccdbConfig.reconstructionPass.value);
callst = ccdb->getSpecificForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber(), metadata);
}

Run2V0MInfo.mCalibrationStored = false;
Expand Down Expand Up @@ -350,15 +353,11 @@ struct CentralityTable {
LOGF(fatal, "Calibration information from CL1 multiplicity for run %d corrupted", bc.runNumber());
}
}
if (Run2V0MInfo.mCalibrationStored || Run2V0AInfo.mCalibrationStored || Run2SPDTksInfo.mCalibrationStored || Run2SPDClsInfo.mCalibrationStored || Run2CL0Info.mCalibrationStored || Run2CL1Info.mCalibrationStored) {
mRunNumber = bc.runNumber();
}
} else {
if (!ccdbConfig.doNotCrashOnNull) { // default behaviour: crash
LOGF(fatal, "Centrality calibration is not available in CCDB for run=%d at timestamp=%llu", bc.runNumber(), bc.timestamp());
} else { // only if asked: continue filling with non-valid values (105)
LOGF(info, "Centrality calibration is not available in CCDB for run=%d at timestamp=%llu, will fill tables with dummy values", bc.runNumber(), bc.timestamp());
mRunNumber = bc.runNumber();
}
}
}
Expand Down Expand Up @@ -473,6 +472,7 @@ struct CentralityTable {
/* check the previous run number */
auto bc = collision.template bc_as<BCsWithTimestamps>();
if (bc.runNumber() != mRunNumber) {
mRunNumber = bc.runNumber(); // mark that this run has been attempted already regardless of outcome
LOGF(info, "timestamp=%llu, run number=%d", bc.timestamp(), bc.runNumber());
TList* callst = nullptr;
// Check if the ccdb path is a root file
Expand All @@ -485,15 +485,17 @@ struct CentralityTable {
}
} else {
if (ccdbConfig.reconstructionPass.value == "") {
callst = ccdb->getForTimeStamp<TList>(ccdbConfig.ccdbPath, bc.timestamp());
callst = ccdb->getForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber());
} else if (ccdbConfig.reconstructionPass.value == "metadata") {
std::map<std::string, std::string> metadata;
metadata["RecoPassName"] = metadataInfo.get("RecoPassName");
callst = ccdb->getSpecific<TList>(ccdbConfig.ccdbPath, bc.timestamp(), metadata);
LOGF(info, "Loading CCDB for reconstruction pass (from metadata): %s", metadataInfo.get("RecoPassName"));
callst = ccdb->getSpecificForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber(), metadata);
} else {
std::map<std::string, std::string> metadata;
metadata["RecoPassName"] = ccdbConfig.reconstructionPass.value;
callst = ccdb->getSpecific<TList>(ccdbConfig.ccdbPath, bc.timestamp(), metadata);
LOGF(info, "Loading CCDB for reconstruction pass (from provided argument): %s", ccdbConfig.reconstructionPass.value);
callst = ccdb->getSpecificForRun<TList>(ccdbConfig.ccdbPath, bc.runNumber(), metadata);
}
}

Expand Down Expand Up @@ -555,13 +557,11 @@ struct CentralityTable {
break;
}
}
mRunNumber = bc.runNumber();
} else {
if (!ccdbConfig.doNotCrashOnNull) { // default behaviour: crash
LOGF(fatal, "Centrality calibration is not available in CCDB for run=%d at timestamp=%llu", bc.runNumber(), bc.timestamp());
} else { // only if asked: continue filling with non-valid values (105)
LOGF(info, "Centrality calibration is not available in CCDB for run=%d at timestamp=%llu, will fill tables with dummy values", bc.runNumber(), bc.timestamp());
mRunNumber = bc.runNumber();
}
}
}
Expand Down
Loading

0 comments on commit 1bc2098

Please sign in to comment.