libtcspc.Prepend¶
- final class libtcspc.Prepend(event, *, event_type=None)[source]¶
Bases:
NodePass-through processor that inserts an event at the start of the stream.
All events are passed through unchanged. Before the first event is passed through, the given
eventis emitted once.- Parameters:
event (EventInstance or Param[EventInstance]) – The event value to emit before the first passed-through event. A concrete
EventInstance(construct it viaEventType.value(), for exampleDetectionEvent().value(abstime=0, channel=0)) is baked into the generated code. AParambinds the event value at execution time;event_typemust then be given.event_type (EventType or None, keyword-only) – The type of the inserted event. Required if and only if
eventis aParam. For a concreteEventInstanceit is inferred and, if given, must equal the event’s type.
Notes
Events handled:
All event types: pass through. Before the first one,
eventis emitted.End of input: pass through.
When
eventis aParam, scalar, raw-bytes, bucket, and array event types are all supported.See also
- tcspc::prepend()
The underlying C++ factory function.
AppendInsert an event at the end of the stream instead.