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

Description

Processors for finding pairs of detection events.

Functions

template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_all (arg::start_channel< typename DataTypes::channel_type > start_channel, std::array< typename DataTypes::channel_type, NStopChannels > stop_channels, arg::time_window< typename DataTypes::abstime_type > time_window, Downstream downstream)
 Create a processor that generates all ordered pairs of detection events within a time window.
template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_all_between (arg::start_channel< typename DataTypes::channel_type > start_channel, std::array< typename DataTypes::channel_type, NStopChannels > stop_channels, arg::time_window< typename DataTypes::abstime_type > time_window, Downstream downstream)
 Create a processor that generates ordered pairs of detection events within a time window, pairing only the last eligible start event with each stop event.
template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_one (arg::start_channel< typename DataTypes::channel_type > start_channel, std::array< typename DataTypes::channel_type, NStopChannels > stop_channels, arg::time_window< typename DataTypes::abstime_type > time_window, Downstream downstream)
 Create a processor that generates ordered pairs of detection events within a time window, pairing only the first eligible stop event with each start event.
template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_one_between (arg::start_channel< typename DataTypes::channel_type > start_channel, std::array< typename DataTypes::channel_type, NStopChannels > stop_channels, arg::time_window< typename DataTypes::abstime_type > time_window, Downstream downstream)
 Create a processor that generates ordered pairs of detection events within a time window, pairing only a start event with a stop event such that no start events, or stop events on the same channel, occur in between.

Function Documentation

◆ pair_all()

template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_all ( arg::start_channel< typename DataTypes::channel_type > start_channel,
std::array< typename DataTypes::channel_type, NStopChannels > stop_channels,
arg::time_window< typename DataTypes::abstime_type > time_window,
Downstream downstream )

Create a processor that generates all ordered pairs of detection events within a time window.

All events are passed through.

Just before a tcspc::detection_event whose channel is one of the stop channels (a stop event) is passed through, std::array<detection_event<DataTypes>, 2> is emitted, pairing the stop event with every preceding tcspc::detection_event on the start channel that is within time_window of the stop event.

Template Parameters
NStopChannelsnumber of stop channels
DataTypesdata type set specifying abstime_type and channel_type
Downstreamdownstream processor type (usually deduced)
Parameters
start_channelthe start channel number
stop_channelsthe stop channel numbers
time_windowthe maximum abstime separation between start and stop detection events
downstreamdownstream processor
Returns
processor
Events handled
  • tcspc::detection_event<DT>: emit (as tcspc::std::array<detection_event<DataTypes>, 2>) any pairs where the current event serves as the stop event; pass through
  • All other types: pass through with no action
  • Flush: pass through with no action

◆ pair_all_between()

template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_all_between ( arg::start_channel< typename DataTypes::channel_type > start_channel,
std::array< typename DataTypes::channel_type, NStopChannels > stop_channels,
arg::time_window< typename DataTypes::abstime_type > time_window,
Downstream downstream )

Create a processor that generates ordered pairs of detection events within a time window, pairing only the last eligible start event with each stop event.

All events are passed through.

Just before a tcspc::detection_event whose channel is one of the stop channels (a stop event) is passed through, std::array<detection_event<DataTypes>, 2> is emitted, pairing the stop event with the most recent tcspc::detection_event on the start channel, if there is one within time_window of the stop event.

Template Parameters
NStopChannelsnumber of stop channels
DataTypesdata type set specifying abstime_type and channel_type
Downstreamdownstream processor type (usually deduced)
Parameters
start_channelthe start channel number
stop_channelsthe stop channel numbers
time_windowthe maximum abstime separation between start and stop detection events
downstreamdownstream processor
Returns
processor
Events handled
  • tcspc::detection_event<DT>: emit (as tcspc::std::array<detection_event<DataTypes>, 2>), if any, the pair where the current event serves as the stop event; pass through
  • All other types: pass through with no action
  • Flush: pass through with no action

◆ pair_one()

template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_one ( arg::start_channel< typename DataTypes::channel_type > start_channel,
std::array< typename DataTypes::channel_type, NStopChannels > stop_channels,
arg::time_window< typename DataTypes::abstime_type > time_window,
Downstream downstream )

Create a processor that generates ordered pairs of detection events within a time window, pairing only the first eligible stop event with each start event.

All events are passed through.

Just before a tcspc::detection_event whose channel is one of the stop channels (a stop event) is passed through, std::array<detection_event<DataTypes>, 2> is emitted, pairing the stop event with every preceding tcspc::detection_event on the start channel that is within time_window of the stop event and more recent than the previous stop event on the same channel.

Template Parameters
NStopChannelsnumber of stop channels
DataTypesdata type set specifying abstime_type and channel_type
Downstreamdownstream processor type (usually deduced)
Parameters
start_channelthe start channel number
stop_channelsthe stop channel numbers
time_windowthe maximum abstime separation between start and stop detection events
downstreamdownstream processor
Returns
processor
Events handled
  • tcspc::detection_event<DT>: emit (as tcspc::std::array<detection_event<DataTypes>, 2>) any pairs where the current event serves as the stop event; pass through
  • All other types: pass through with no action
  • Flush: pass through with no action

◆ pair_one_between()

template<std::size_t NStopChannels, typename DataTypes = default_data_types, typename Downstream>
auto tcspc::pair_one_between ( arg::start_channel< typename DataTypes::channel_type > start_channel,
std::array< typename DataTypes::channel_type, NStopChannels > stop_channels,
arg::time_window< typename DataTypes::abstime_type > time_window,
Downstream downstream )

Create a processor that generates ordered pairs of detection events within a time window, pairing only a start event with a stop event such that no start events, or stop events on the same channel, occur in between.

All events are passed through.

Just before a tcspc::detection_event whose channel is one of the stop channels (a stop event) is passed through, std::array<detection_event<DataTypes>, 2> is emitted, pairing the stop event with the most recent tcspc::detection_event on the start channel, if there is one within time_window of the stop event and more recent than the previous stop event on the same channel.

Template Parameters
NStopChannelsnumber of stop channels
DataTypesdata type set specifying abstime_type and channel_type
Downstreamdownstream processor type (usually deduced)
Parameters
start_channelthe start channel number
stop_channelsthe stop channel numbers
time_windowthe maximum abstime separation between start and stop detection events
downstreamdownstream processor
Returns
processor
Events handled
  • tcspc::detection_event<DT>: emit (as tcspc::std::array<detection_event<DataTypes>, 2>), if any, the pair where the current event serves as the stop event; pass through
  • All other types: pass through with no action
  • Flush: pass through with no action