Skip to content

Commit f3ad84f

Browse files
author
Maurice Coquet
committed
[PWGDQ] Throwing fatal in case Zshift CCDB object not found
1 parent 7af4149 commit f3ad84f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

PWGDQ/TableProducer/tableMakerMC_withAssoc.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ struct TableMakerMC {
215215
Configurable<std::string> fGeoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
216216
Configurable<std::string> fGrpMagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
217217
Configurable<std::string> fZShiftPath{"zShiftPath", "Users/m/mcoquet/ZShift", "CCDB path for z shift to apply to forward tracks"};
218-
Configurable<bool> fUseRemoteZShift{"cfgUseRemoteZShift", true, "Enable getting Zshift from ccdb"};
218+
Configurable<bool> fUseRemoteZShift{"cfgUseRemoteZShift", false, "Enable getting Zshift from ccdb"};
219219
Configurable<float> fManualZShift{"cfgManualZShift", 0.f, "Manual value for the Zshift for muons."};
220220
Configurable<std::string> fGrpMagPathRun2{"grpmagPathRun2", "GLO/GRP/GRP", "CCDB path of the GRPObject (Usage for Run 2)"};
221221
Configurable<int64_t> timestampCCDB{"timestampCCDB", -1, "timestamp of the ONNX file for ML model used to query in CCDB"};
@@ -1204,7 +1204,9 @@ struct TableMakerMC {
12041204
auto* fZShift = fCCDB->getForTimeStamp<std::vector<float>>(fConfigCCDB.fZShiftPath, bcs.begin().timestamp());
12051205
if (fZShift != nullptr && !fZShift->empty()) {
12061206
VarManager::SetZShift((*fZShift)[0]);
1207-
}
1207+
} else {
1208+
LOG(fatal) << "Could not retrieve Z-shift value from CCDB";
1209+
}
12081210
} else {
12091211
VarManager::SetZShift(fConfigCCDB.fManualZShift.value);
12101212
}

PWGDQ/TableProducer/tableMaker_withAssoc.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ struct TableMaker {
254254
Configurable<std::string> fConfigGeoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
255255
Configurable<std::string> fConfigGrpMagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
256256
Configurable<std::string> fZShiftPath{"zShiftPath", "Users/m/mcoquet/ZShift", "CCDB path for z shift to apply to forward tracks"};
257-
Configurable<bool> fUseRemoteZShift{"cfgUseRemoteZShift", true, "Enable getting Zshift from ccdb"};
257+
Configurable<bool> fUseRemoteZShift{"cfgUseRemoteZShift", false, "Enable getting Zshift from ccdb"};
258258
Configurable<float> fManualZShift{"cfgManualZShift", 0.f, "Manual value for the Zshift for muons."};
259259
Configurable<std::string> fConfigGrpMagPathRun2{"grpmagPathRun2", "GLO/GRP/GRP", "CCDB path of the GRPObject (Usage for Run 2)"};
260260
} fConfigCCDB;
@@ -1584,7 +1584,9 @@ struct TableMaker {
15841584
auto* fZShift = fCCDB->getForTimeStamp<std::vector<float>>(fConfigCCDB.fZShiftPath, bcs.begin().timestamp());
15851585
if (fZShift != nullptr && !fZShift->empty()) {
15861586
VarManager::SetZShift((*fZShift)[0]);
1587-
}
1587+
} else {
1588+
LOG(fatal) << "Could not retrieve Z-shift value from CCDB";
1589+
}
15881590
} else {
15891591
VarManager::SetZShift(fConfigCCDB.fManualZShift.value);
15901592
}

0 commit comments

Comments
 (0)