libtcspc.RecordLast¶
- final class libtcspc.RecordLast(event_type, access_tag)[source]¶
Bases:
NodeProcessor that remembers the last event of a given type.
A copy of the last event of type
event_typethat passed through can be retrieved at any time during execution via theRecordLastAccessorretrieved from theExecutionContextusingaccess_tag. It isNoneuntil an event of that type has been observed.- Parameters:
event_type (EventType) – The event type to remember. Must be an event type that supports value conversion (so that the recorded event can be delivered to Python as an
EventInstance).access_tag (AccessTag) – Tag used to retrieve a
RecordLastAccessorfrom theExecutionContextat runtime.
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.
RecordLastAccessorRuntime accessor providing
get().