@@ -1817,15 +1817,26 @@ bool DataProcessingDevice::tryDispatchComputation(ServiceRegistryRef ref, std::v
18171817 // create messages) because the messages need to have the timeslice id into
18181818 // it.
18191819 auto prepareAllocatorForCurrentTimeSlice = [ref](TimesliceSlot i) -> void {
1820+ auto & dataProcessorContext = ref.get <DataProcessorContext>();
18201821 auto & relayer = ref.get <DataRelayer>();
18211822 auto & timingInfo = ref.get <TimingInfo>();
18221823 ZoneScopedN (" DataProcessingDevice::prepareForCurrentTimeslice" );
18231824 auto timeslice = relayer.getTimesliceForSlot (i);
1825+
18241826 timingInfo.timeslice = timeslice.value ;
18251827 timingInfo.tfCounter = relayer.getFirstTFCounterForSlot (i);
18261828 timingInfo.firstTForbit = relayer.getFirstTFOrbitForSlot (i);
18271829 timingInfo.runNumber = relayer.getRunNumberForSlot (i);
18281830 timingInfo.creation = relayer.getCreationTimeForSlot (i);
1831+ timingInfo.globalRunNumberChanged = dataProcessorContext.lastRunNumberProcessed <= timingInfo.runNumber ;
1832+ // We report wether or not this timing info refers to a new Run.
1833+ if (timingInfo.globalRunNumberChanged ) {
1834+ dataProcessorContext.lastRunNumberProcessed = timingInfo.runNumber ;
1835+ }
1836+ // FIXME: for now there is only one stream, however we
1837+ // should calculate this correctly once we finally get the
1838+ // the StreamContext in.
1839+ timingInfo.streamRunNumberChanged = timingInfo.globalRunNumberChanged ;
18291840 };
18301841
18311842 // When processing them, timers will have to be cleaned up
0 commit comments