diff --git a/Detectors/Raw/TFReaderDD/src/TFReaderSpec.cxx b/Detectors/Raw/TFReaderDD/src/TFReaderSpec.cxx index ef59d94b26048..07a62a7fd4a58 100644 --- a/Detectors/Raw/TFReaderDD/src/TFReaderSpec.cxx +++ b/Detectors/Raw/TFReaderDD/src/TFReaderSpec.cxx @@ -327,7 +327,12 @@ void TFReaderSpec::stopProcessing(o2f::ProcessingContext& ctx) auto device = ctx.services().get().device(); o2f::SourceInfoHeader exitHdr; exitHdr.state = o2f::InputChannelState::Completed; - const auto exitStack = o2h::Stack(o2h::DataHeader(o2h::gDataDescriptionInfo, o2h::gDataOriginAny, 0, 0), o2f::DataProcessingHeader(), exitHdr); + o2h::DataHeader dh = o2h::DataHeader(o2h::gDataDescriptionInfo, o2h::gDataOriginAny, 0, 0); + try { + dh.runNumber = strtoul(device->fConfig->GetProperty("runNumber", "").c_str(), nullptr, 10); + } catch (...) { + } + const auto exitStack = o2h::Stack(dh, o2f::DataProcessingHeader(), exitHdr); auto fmqFactory = device->GetChannel(mInput.rawChannelConfig, 0).Transport(); auto hdEOSMessage = fmqFactory->CreateMessage(exitStack.size(), fair::mq::Alignment{64}); auto plEOSMessage = fmqFactory->CreateMessage(0, fair::mq::Alignment{64}); diff --git a/Detectors/Raw/src/RawFileReaderWorkflow.cxx b/Detectors/Raw/src/RawFileReaderWorkflow.cxx index 46f7ba2a5c7f1..a7313f3154ac2 100644 --- a/Detectors/Raw/src/RawFileReaderWorkflow.cxx +++ b/Detectors/Raw/src/RawFileReaderWorkflow.cxx @@ -347,7 +347,12 @@ void RawReaderSpecs::run(o2f::ProcessingContext& ctx) if (!mRawChannelName.empty()) { // send endOfStream message to raw channel o2f::SourceInfoHeader exitHdr; exitHdr.state = o2f::InputChannelState::Completed; - const auto exitStack = o2::header::Stack(o2h::DataHeader(o2h::gDataDescriptionInfo, o2h::gDataOriginAny, 0, 0), o2f::DataProcessingHeader(), exitHdr); + o2h::DataHeader dh = o2h::DataHeader(o2h::gDataDescriptionInfo, o2h::gDataOriginAny, 0, 0); + try { + dh.runNumber = strtoul(device->fConfig->GetProperty("runNumber", "").c_str(), nullptr, 10); + } catch (...) { + } + const auto exitStack = o2::header::Stack(dh, o2f::DataProcessingHeader(), exitHdr); auto fmqFactory = device->GetChannel(mRawChannelName, 0).Transport(); auto hdEOSMessage = fmqFactory->CreateMessage(exitStack.size(), fair::mq::Alignment{64}); auto plEOSMessage = fmqFactory->CreateMessage(0, fair::mq::Alignment{64});