libtcspc.RecordLast

final class libtcspc.RecordLast(event_type, access_tag)[source]

Bases: Node

Processor that remembers the last event of a given type.

A copy of the last event of type event_type that passed through can be retrieved at any time during execution via the RecordLastAccessor retrieved from the ExecutionContext using access_tag. It is None until an event of that type has been observed.

Parameters:

Notes

Events handled:

  • Events matching event_type: retain a copy, then pass through.

  • All other event types: pass through unchanged.

  • End of input: pass through.

Bucket-carrying event types (such as HistogramEvent) are supported; recording deep-copies the event, including its bucket data.

See also

tcspc::record_last()

The underlying C++ factory function.

RecordLastAccessor

Runtime accessor providing get().