@@ -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) {
@@ -977,11 +989,18 @@ DataProcessorSpec specifyFairMQDeviceOutputProxy(char const* name,
977989 if (channelName != outputChannelName) {
978990 continue ;
979991 }
992+
993+ uint32_t runNumber = 0 ;
994+ try {
995+ runNumber = strtoul (device->fConfig ->GetProperty <std::string>(" runNumber" , " " ).c_str (), nullptr , 10 );
996+ } catch (...) {
997+ }
980998 DataHeader dh;
981999 dh.dataOrigin = " DPL" ;
9821000 dh.dataDescription = " EOS" ;
9831001 dh.subSpecification = 0 ;
9841002 dh.payloadSize = 0 ;
1003+ dh.runNumber = runNumber;
9851004 dh.payloadSerializationMethod = o2::header::gSerializationMethodNone ;
9861005 dh.tfCounter = 0 ;
9871006 dh.firstTForbit = 0 ;
@@ -1091,12 +1110,18 @@ DataProcessorSpec specifyFairMQDeviceMultiOutputProxy(char const* name,
10911110 if (!checkChannel (channelName)) {
10921111 continue ;
10931112 }
1113+ uint32_t runNumber = 0 ;
1114+ try {
1115+ runNumber = strtoul (device->fConfig ->GetProperty <std::string>(" runNumber" , " " ).c_str (), nullptr , 10 );
1116+ } catch (...) {
1117+ }
10941118 DataHeader dh;
10951119 dh.dataOrigin = " DPL" ;
10961120 dh.dataDescription = " EOS" ;
10971121 dh.subSpecification = 0 ;
10981122 dh.payloadSize = 0 ;
10991123 dh.payloadSerializationMethod = o2::header::gSerializationMethodNone ;
1124+ dh.runNumber = runNumber;
11001125 dh.tfCounter = 0 ;
11011126 dh.firstTForbit = 0 ;
11021127 SourceInfoHeader sih;
0 commit comments