Skip to content

Commit 48c7605

Browse files
authored
DPL Analysis: improve error message when messages are malformed (#14040)
1 parent a8f7574 commit 48c7605

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Framework/AnalysisSupport/src/AODWriterHelpers.cxx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,19 +274,20 @@ AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter(ConfigContext const& ctx)
274274
LOG(error) << "Header not found";
275275
return;
276276
}
277-
if (!ref.payload) {
278-
LOG(error) << "Payload not found";
279-
return;
280-
}
281277
auto datah = o2::header::get<o2::header::DataHeader*>(ref.header);
282278
if (!datah) {
283279
LOG(error) << "No data header in stack";
284280
return;
285281
}
286282

283+
if (!ref.payload) {
284+
LOGP(error, "Payload not found for {}/{}/{}", datah->dataOrigin.as<std::string>(), datah->dataDescription.as<std::string>(), datah->subSpecification);
285+
return;
286+
}
287+
287288
auto objh = o2::header::get<o2::framework::OutputObjHeader*>(ref.header);
288289
if (!objh) {
289-
LOG(error) << "No output object header in stack";
290+
LOGP(error, "No output object header in stack of {}/{}/{}", datah->dataOrigin.as<std::string>(), datah->dataDescription.as<std::string>(), datah->subSpecification);
290291
return;
291292
}
292293

@@ -297,7 +298,7 @@ AlgorithmSpec AODWriterHelpers::getOutputObjHistWriter(ConfigContext const& ctx)
297298
tm.SetBufferOffset(0);
298299
tm.ResetMap();
299300
if (obj.kind == nullptr) {
300-
LOG(error) << "Cannot read class info from buffer.";
301+
LOGP(error, "Cannot read class info from buffer of {}/{}/{}", datah->dataOrigin.as<std::string>(), datah->dataDescription.as<std::string>(), datah->subSpecification);
301302
return;
302303
}
303304

0 commit comments

Comments
 (0)