libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
Stopping processors

Description

Processors that stop processing when a given event is received.

Functions

template<typename EventList, typename Downstream>
auto tcspc::stop (std::string message_prefix, Downstream downstream)
 Create a processor that ends the stream when a given event type is received.
template<typename EventList, typename Exception = std::runtime_error, typename Downstream>
auto tcspc::stop_with_error (std::string message_prefix, Downstream downstream)
 Create a processor that ends the stream with an error when a given event type is received.

Function Documentation

◆ stop()

template<typename EventList, typename Downstream>
auto tcspc::stop ( std::string message_prefix,
Downstream downstream )

Create a processor that ends the stream when a given event type is received.

See also
tcspc::stop_with_error()
Template Parameters
EventListevent types that should cause stream to end
Downstreamdownstream processor type
Parameters
message_prefixerror message prefix
downstreamdownstream processor
Returns
processor
Events handled
  • Types in EventList: flush downstream and throw tcspc::end_of_processing
  • Types not in EventList: pass through with no action
  • Flush: pass through with no action

◆ stop_with_error()

template<typename EventList, typename Exception = std::runtime_error, typename Downstream>
auto tcspc::stop_with_error ( std::string message_prefix,
Downstream downstream )

Create a processor that ends the stream with an error when a given event type is received.

See also
tcspc::stop()
Template Parameters
EventListevent types that should cause stream to end
Exceptionexception type to use (must be constructible from std::string)
Downstreamdownstream processor type
Parameters
message_prefixerror message prefix
downstreamdownstream processor
Returns
processor
Events handled
  • Types in EventList: throw Exception
  • Types not in EventList: pass through with no action
  • Flush: pass through with no action