Skip to content

Commit a45e041

Browse files
authored
Merge f25a84e into sapling-pr-archive-ktf
2 parents a7b4cd9 + f25a84e commit a45e041

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Framework/Core/src/ExternalFairMQDeviceProxy.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,15 +510,16 @@ InjectorFunction dplModelAdaptor(std::vector<OutputSpec> const& filterSpecs, DPL
510510
LOG(error) << "unexpected nullptr found. Skipping message pair.";
511511
continue;
512512
}
513-
const auto dh = o2::header::get<DataHeader*>(parts.At(msgidx)->GetData());
513+
auto* header = parts.At(msgidx)->GetData();
514+
const auto dh = o2::header::get<DataHeader*>(header);
514515
if (!dh) {
515516
LOG(error) << "data on input " << msgidx << " does not follow the O2 data model, DataHeader missing";
516517
if (msgidx > 0) {
517518
--msgidx;
518519
}
519520
continue;
520521
}
521-
auto dph = o2::header::get<DataProcessingHeader*>(parts.At(msgidx)->GetData());
522+
auto dph = o2::header::get<DataProcessingHeader*>(header);
522523
if (!dph) {
523524
LOG(error) << "data on input " << msgidx << " does not follow the O2 data model, DataProcessingHeader missing";
524525
continue;
@@ -533,7 +534,7 @@ InjectorFunction dplModelAdaptor(std::vector<OutputSpec> const& filterSpecs, DPL
533534
timingInfo.runNumber = dh->runNumber;
534535
timingInfo.tfCounter = dh->tfCounter;
535536
LOG(debug) << msgidx << ": " << DataSpecUtils::describe(OutputSpec{dh->dataOrigin, dh->dataDescription, dh->subSpecification}) << " part " << dh->splitPayloadIndex << " of " << dh->splitPayloadParts << " payload " << parts.At(msgidx + 1)->GetSize();
536-
if (dh->runNumber == 0 || dh->tfCounter == 0 || (fmqRunNumber > 0 && fmqRunNumber != dh->runNumber)) {
537+
if (dh->runNumber == 0 || (dh->tfCounter == 0 && o2::header::get<SourceInfoHeader*>(header) == nullptr) || (fmqRunNumber > 0 && fmqRunNumber != dh->runNumber)) {
537538
LOG(error) << "INVALID runNumber / tfCounter: runNumber " << dh->runNumber
538539
<< ", tfCounter " << dh->tfCounter << ", FMQ runNumber " << fmqRunNumber
539540
<< " for msgidx " << msgidx << ": " << DataSpecUtils::describe(OutputSpec{dh->dataOrigin, dh->dataDescription, dh->subSpecification}) << " part " << dh->splitPayloadIndex << " of " << dh->splitPayloadParts << " payload " << parts.At(msgidx + 1)->GetSize();

0 commit comments

Comments
 (0)