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

Description

Processors for collecting statistics.

Functions

template<typename Event, typename Downstream>
auto tcspc::count (access_tracker< count_access > &&tracker, Downstream downstream)
 Create a processor that counts events of a given type.

Function Documentation

◆ count()

template<typename Event, typename Downstream>
auto tcspc::count ( access_tracker< count_access > && tracker,
Downstream downstream )

Create a processor that counts events of a given type.

The count can be retrieved through a tcspc::count_access retrieved from the tcspc::context from which tracker was obtained.

Note that the count is incremented before the events of type Event are sent to the downstream processor. This means that the event will be counted even if it subsequently results in an error or end-of-stream in a downstream processor.

Template Parameters
Eventtype of event to count
Downstreamdownstream processor type (usually deduced)
Parameters
trackeraccess tracker for later access of the count result
downstreamdownstream processor
Returns
processor
Events handled
  • Event: increment the count; pass through
  • All other types: pass through with no action
  • Flush: pass through with no action