File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ class TimesliceIndex
133133 OldestOutputInfo updateOldestPossibleOutput ();
134134 [[nodiscard]] InputChannelInfo const & getChannelInfo (ChannelIndex channel) const ;
135135
136+ // Reset the TimesliceIndex to its initial state
137+ auto reset () -> void;
138+
136139 private:
137140 // / @return the oldest slot possible so that we can eventually override it.
138141 // / This is the timeslices for all the in flight parts.
Original file line number Diff line number Diff line change @@ -509,6 +509,7 @@ o2::framework::ServiceSpec CommonServices::decongestionSpec()
509509 decongestion->lastTimeslice = oldestPossibleOutput.timeslice .value ; },
510510 .stop = [](ServiceRegistryRef services, void * service) {
511511 auto * decongestion = (DecongestionService*)service;
512+ services.get <TimesliceIndex>().reset ();
512513 decongestion->nextEnumerationTimeslice = 0 ;
513514 decongestion->nextEnumerationTimesliceRewinded = false ;
514515 decongestion->lastTimeslice = 0 ;
Original file line number Diff line number Diff line change @@ -205,4 +205,19 @@ InputChannelInfo const& TimesliceIndex::getChannelInfo(ChannelIndex channel) con
205205 return mChannels [channel.value ];
206206}
207207
208+ auto TimesliceIndex::reset () -> void
209+ {
210+ mOldestPossibleInput = {
211+ .timeslice = {0 },
212+ // / The actual channel id of the oldest input.
213+ .channel = {ChannelIndex::INVALID}};
214+ mOldestPossibleOutput = {
215+ .timeslice = {0 },
216+ .channel = {ChannelIndex::INVALID},
217+ .slot = {(size_t )-1 }};
218+ for (auto & channel : mChannels ) {
219+ channel.oldestForChannel = {0 };
220+ }
221+ }
222+
208223} // namespace o2::framework
You can’t perform that action at this time.
0 commit comments