libtcspc.Append

final class libtcspc.Append(event, *, event_type=None)[source]

Bases: Node

Pass-through processor that inserts an event at the end of the stream.

All events are passed through unchanged. Upon flush, the given event is emitted before the flush is propagated.

Parameters:
  • event (EventInstance or Param[EventInstance]) – The event value to emit at flush. A concrete EventInstance (construct it via EventType.value(), for example DetectionEvent().value(abstime=0, channel=0)) is baked into the generated code. A Param binds the event value at execution time; event_type must then be given.

  • event_type (EventType or None, keyword-only) – The type of the inserted event. Required if and only if event is a Param. For a concrete EventInstance it is inferred and, if given, must equal the event’s type.

Notes

Events handled:

  • All event types: pass through.

  • End of input: emit event, then pass through the flush.

The event is only appended on a normal flush; if processing is ended by a downstream processor raising end-of-processing, this processor has no effect.

When event is a Param, scalar, raw-bytes, bucket, and array event types are all supported.

See also

tcspc::append()

The underlying C++ factory function.

Prepend

Insert an event at the start of the stream instead.