libtcspc.Count¶
- final class libtcspc.Count(event_type, access_tag)[source]¶
Bases:
NodeProcessor that counts events of a given type, passing every event through.
The running count can be retrieved at any time during execution via the
CountAccessretrieved from theExecutionContextusingaccess_tag. The counter is incremented before each matching event is forwarded, so an observer reading the count immediately after the Nth matching event sees the value N.- Parameters:
event_type (EventType) – The event type whose occurrences are counted. Other event types are forwarded but not counted.
access_tag (AccessTag) – Tag used to retrieve a
CountAccessfrom theExecutionContextat runtime.
Notes
Events handled:
Events matching
event_type: increment counter, then pass through.All other event types: pass through unchanged.
End of input: pass through.
See also
- tcspc::count()
The underlying C++ factory function.