You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOG(info) << "+++ Loaded parameter collection from file +++";
140
+
if (!paramCollection.retrieveParameters(mRespParamsV3, mReconstructionPass)) {
141
+
if (mFatalOnPassNotAvailable) {
142
+
LOG(fatal) << "Pass '" << mReconstructionPass << "' not available in the retrieved object from file";
143
+
} else {
144
+
LOG(warning) << "Pass '" << mReconstructionPass << "' not available in the retrieved object from file, fetching '" << mReconstructionPassDefault << "'";
145
+
if (!paramCollection.retrieveParameters(mRespParamsV3, mReconstructionPassDefault)) {
146
+
paramCollection.print();
147
+
LOG(fatal) << "Cannot get default pass for calibration " << mReconstructionPassDefault;
142
148
} else {
143
-
LOGF(warning, "Pass '%s' not available in the retrieved CCDB object", mReconstructionPass.data());
LOG(debug) << "Updating parametrization from path '" << mParametrizationPath << "' and timestamp " << mTimestamp;
225
-
if (!ccdb->templategetForTimeStamp<o2::tof::ParameterCollection>(mParametrizationPath, mTimestamp)->retrieveParameters(mRespParamsV3, mReconstructionPass)) {
226
-
if (mFatalOnPassNotAvailable) {
227
-
LOGF(fatal, "Pass '%s' not available in the retrieved CCDB object", mReconstructionPass.data());
245
+
LOG(info) << "Updating parametrization from path '" << mParametrizationPath << "' and timestamp " << mTimestamp << " and reconstruction pass '" << mReconstructionPass << "'";
246
+
if (mParamFileName.empty()) { // Not loading if parametrization from file
247
+
if (!ccdb->templategetForTimeStamp<o2::tof::ParameterCollection>(mParametrizationPath, mTimestamp)->retrieveParameters(mRespParamsV3, mReconstructionPass)) {
248
+
if (mFatalOnPassNotAvailable) {
249
+
LOGF(fatal, "Pass '%s' not available in the retrieved CCDB object", mReconstructionPass.data());
250
+
} else {
251
+
LOGF(warning, "Pass '%s' not available in the retrieved CCDB object, fetching '%s'", mReconstructionPass.data(), mReconstructionPassDefault.data());
252
+
if (!ccdb->templategetForTimeStamp<o2::tof::ParameterCollection>(mParametrizationPath, mTimestamp)->retrieveParameters(mRespParamsV3, mReconstructionPassDefault)) {
LOG(info) << " test getTimeShift neg: " << mRespParamsV3.getTimeShift(0, false);
231
287
}
232
288
return;
233
289
}
@@ -248,6 +304,7 @@ struct TOFCalibConfig {
248
304
std::string mParamFileName;
249
305
std::string mParametrizationPath;
250
306
std::string mReconstructionPass;
307
+
std::string mReconstructionPassDefault;
251
308
boolmLoadResponseFromCCDB;
252
309
boolmFatalOnPassNotAvailable;
253
310
boolmEnableTimeDependentResponse;
@@ -289,6 +346,7 @@ struct tofSignal {
289
346
Configurable<std::string> cfgParamFileName{"paramFileName", "", "Path to the parametrization object. If empty the parametrization is not taken from file"};
290
347
Configurable<std::string> cfgParametrizationPath{"parametrizationPath", "TOF/Calib/Params", "Path of the TOF parametrization on the CCDB or in the file, if the paramFileName is not empty"};
291
348
Configurable<std::string> cfgReconstructionPass{"reconstructionPass", "", {"Apass to use when fetching the calibration tables. Empty (default) does not check for any pass. Use `metadata` to fetch it from the AO2D metadata. Otherwise it will override the metadata."}};
349
+
Configurable<std::string> cfgReconstructionPassDefault{"reconstructionPassDefault", "unanchored", {"Default pass to get if the standard one is not found"}};
292
350
Configurable<bool> cfgLoadResponseFromCCDB{"loadResponseFromCCDB", false, "Flag to load the response from the CCDB"};
293
351
Configurable<bool> cfgFatalOnPassNotAvailable{"fatalOnPassNotAvailable", true, "Flag to throw a fatal if the pass is not available in the retrieved CCDB object"};
294
352
Configurable<bool> cfgEnableTimeDependentResponse{"enableTimeDependentResponse", false, "Flag to use the collision timestamp to fetch the PID Response"};
0 commit comments