use max_events to stop iteration before broken event.
unfortunately need to use an internal counter. EventGetter.event_counter and cannot refer to event.header.event_counter anymore, since the new header.event_counter of the next possibly broken event is not available yet. And the last header.event_counter is not available to the EventGetter anymore.
unfortunately need to use an internal counter.
EventGetter.event_counter
and cannot refer toevent.header.event_counter
anymore, since the newheader.event_counter
of the next possibly broken event is not available yet. And the lastheader.event_counter
is not available to the EventGetter anymore.This results in an ugly
in
self.previous()