@@ -397,6 +397,11 @@ void injectMissingData(fair::mq::Device& device, fair::mq::Parts& parts, std::ve
397397 }
398398 std::string missing = " " ;
399399 bool showAlarm = false ;
400+ uint32_t runNumber = 0 ;
401+ try {
402+ runNumber = strtoul (device.fConfig ->GetProperty <std::string>(" runNumber" , " " ).c_str (), nullptr , 10 );
403+ } catch (...) {
404+ }
400405 for (auto mi : unmatchedDescriptions) {
401406 auto & spec = routes[mi].matcher ;
402407 missing += " " + DataSpecUtils::describe (spec);
@@ -412,6 +417,7 @@ void injectMissingData(fair::mq::Device& device, fair::mq::Parts& parts, std::ve
412417 dh.dataDescription = concrete.description ;
413418 dh.subSpecification = *subSpec;
414419 dh.payloadSize = 0 ;
420+ dh.runNumber = runNumber;
415421 dh.splitPayloadParts = 0 ;
416422 dh.splitPayloadIndex = 0 ;
417423 dh.payloadSerializationMethod = header::gSerializationMethodNone ;
@@ -623,6 +629,11 @@ InjectorFunction incrementalConverter(OutputSpec const& spec, o2::header::Serial
623629 auto timesliceId = std::make_shared<size_t >(startTime);
624630 return [timesliceId, spec, step, method](TimingInfo&, ServiceRegistryRef const & services, fair::mq::Parts& parts, ChannelRetriever channelRetriever, size_t newTimesliceId, bool &) {
625631 auto * device = services.get <RawDeviceService>().device ();
632+ uint32_t runNumber = 0 ;
633+ try {
634+ runNumber = strtoul (device->fConfig ->GetProperty <std::string>(" runNumber" , " " ).c_str (), nullptr , 10 );
635+ } catch (...) {
636+ }
626637 // We iterate on all the parts and we send them two by two,
627638 // adding the appropriate O2 header.
628639 for (int i = 0 ; i < parts.Size (); ++i) {
@@ -635,6 +646,7 @@ InjectorFunction incrementalConverter(OutputSpec const& spec, o2::header::Serial
635646 dh.dataDescription = matcher.description ;
636647 dh.subSpecification = matcher.subSpec ;
637648 dh.payloadSize = parts.At (i)->GetSize ();
649+ dh.runNumber = runNumber;
638650
639651 DataProcessingHeader dph{newTimesliceId, 0 };
640652 if (*timesliceId != newTimesliceId) {
@@ -1098,12 +1110,18 @@ DataProcessorSpec specifyFairMQDeviceMultiOutputProxy(char const* name,
10981110 if (!checkChannel (channelName)) {
10991111 continue ;
11001112 }
1113+ uint32_t runNumber = 0 ;
1114+ try {
1115+ runNumber = strtoul (device->fConfig ->GetProperty <std::string>(" runNumber" , " " ).c_str (), nullptr , 10 );
1116+ } catch (...) {
1117+ }
11011118 DataHeader dh;
11021119 dh.dataOrigin = " DPL" ;
11031120 dh.dataDescription = " EOS" ;
11041121 dh.subSpecification = 0 ;
11051122 dh.payloadSize = 0 ;
11061123 dh.payloadSerializationMethod = o2::header::gSerializationMethodNone ;
1124+ dh.runNumber = runNumber;
11071125 dh.tfCounter = 0 ;
11081126 dh.firstTForbit = 0 ;
11091127 SourceInfoHeader sih;
0 commit comments