Skip to content

Commit 4060a20

Browse files
ehellbardavidrohr
authored andcommitted
explicitly add CCDB to some CCDB fatal error strings
1 parent 1c4d839 commit 4060a20

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CCDB/include/CCDB/BasicCCDBManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ T* CCDBManagerInstance::getSpecificForRun(std::string const& path, int runNumber
333333
auto [start, stop] = getRunDuration(runNumber);
334334
if (start < 0 || stop < 0) {
335335
if (mFatalWhenNull) {
336-
reportFatal(std::string("Failed to get run duration for run ") + std::to_string(runNumber));
336+
reportFatal(std::string("Failed to get run duration for run ") + std::to_string(runNumber) + std::string(" from CCDB"));
337337
}
338338
return nullptr;
339339
}

Framework/CCDBSupport/src/CCDBHelpers.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ auto populateCacheWith(std::shared_ptr<CCDBFetcherHelper> const& helper,
219219
} else if (meta.defaultValue.get<int>() == 2) {
220220
timestampToUse = std::stoi(dtc.runNumber);
221221
} else {
222-
LOGP(fatal, "Undefined run-dependent option {} for spec {}/{}/{}", meta.defaultValue.get<int>(), concrete.origin.as<std::string>(), concrete.description.as<std::string>(), int(concrete.subSpec));
222+
LOGP(fatal, "Undefined ccdb-run-dependent option {} for spec {}/{}/{}", meta.defaultValue.get<int>(), concrete.origin.as<std::string>(), concrete.description.as<std::string>(), int(concrete.subSpec));
223223
}
224224
} else if (isPrefix(ccdbMetadataPrefix, meta.name)) {
225225
std::string key = meta.name.substr(ccdbMetadataPrefix.size());
@@ -252,7 +252,7 @@ auto populateCacheWith(std::shared_ptr<CCDBFetcherHelper> const& helper,
252252
LOGP(detail, "Loading {} for timestamp {}", path, timestampToUse);
253253
api.loadFileToMemory(v, path, metadata, timestampToUse, &headers, etag, helper->createdNotAfter, helper->createdNotBefore);
254254
if ((headers.count("Error") != 0) || (etag.empty() && v.empty())) {
255-
LOGP(fatal, "Unable to find object {}/{}", path, timestampToUse);
255+
LOGP(fatal, "Unable to find CCDB object {}/{}", path, timestampToUse);
256256
// FIXME: I should send a dummy message.
257257
continue;
258258
}
@@ -394,7 +394,7 @@ AlgorithmSpec CCDBHelpers::fetchFromCCDB()
394394
helper->lastCheckedTFCounterOrbReset = timingInfo.tfCounter;
395395
api.loadFileToMemory(v, path, metadata, timingInfo.creation, &headers, etag, helper->createdNotAfter, helper->createdNotBefore);
396396
if ((headers.count("Error") != 0) || (etag.empty() && v.empty())) {
397-
LOGP(fatal, "Unable to find object {}/{}", path, timingInfo.creation);
397+
LOGP(fatal, "Unable to find CCDB object {}/{}", path, timingInfo.creation);
398398
// FIXME: I should send a dummy message.
399399
return;
400400
}

Framework/Core/src/DataRefUtils.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void* DataRefUtils::decodeCCDB(DataRef const& ref, std::type_info const& tinfo)
9494
headerSize = *reinterpret_cast<const int*>(buff + dh->payloadSize - Offset);
9595
}
9696
if (headerSize < 0) {
97-
LOGP(fatal, "Anomalous flattened header size {} extracted", headerSize);
97+
LOGP(fatal, "Anomalous flattened header size {} extracted for CCDB object {}/{}", headerSize, dh->dataOrigin.as<std::string>(), dh->dataDescription.as<std::string>());
9898
}
9999
TMemFile memFile("name", const_cast<char*>(ref.payload), dh->payloadSize - headerSize, "READ");
100100
gErrorIgnoreLevel = previousErrorLevel;
@@ -128,7 +128,7 @@ std::map<std::string, std::string> DataRefUtils::extractCCDBHeaders(DataRef cons
128128
}
129129

130130
if (headerSize < 0) {
131-
LOGP(fatal, "Anomalous flattened header size {} extracted", headerSize);
131+
LOGP(fatal, "Anomalous flattened header size {} extracted for CCDB object {}/{}", headerSize, dh->dataOrigin.as<std::string>(), dh->dataDescription.as<std::string>());
132132
}
133133

134134
buff += dh->payloadSize - headerSize; // jump to the start of flattened header

0 commit comments

Comments
 (0)