|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Processors for histogramming.
Topics | |
| Binning processors | |
| Processors for binning data for histogramming. | |
Functions | |
| template<histogram_policy Policy = histogram_policy::default_policy, typename ResetEvent = never_event, typename DataTypes = default_data_types, typename Downstream> | |
| auto | tcspc::histogram (arg::num_bins< std::size_t > num_bins, arg::max_per_bin< typename DataTypes::bin_type > max_per_bin, std::shared_ptr< bucket_source< typename DataTypes::bin_type > > buffer_provider, Downstream downstream) |
| Create a processor that collects a histogram. | |
| template<histogram_policy Policy = histogram_policy::default_policy, typename ResetEvent = never_event, typename DataTypes = default_data_types, typename Downstream> | |
| auto | tcspc::scan_histograms (arg::num_elements< std::size_t > num_elements, arg::num_bins< std::size_t > num_bins, arg::max_per_bin< typename DataTypes::bin_type > max_per_bin, std::shared_ptr< bucket_source< typename DataTypes::bin_type > > buffer_provider, Downstream downstream) |
| Create a processor that scans over an array of histograms, updating each with the received bin increment clusters. | |
| auto tcspc::histogram | ( | arg::num_bins< std::size_t > | num_bins, |
| arg::max_per_bin< typename DataTypes::bin_type > | max_per_bin, | ||
| std::shared_ptr< bucket_source< typename DataTypes::bin_type > > | buffer_provider, | ||
| Downstream | downstream ) |
Create a processor that collects a histogram.
The processor fills a histogram (held in a tcspc::bucket<DataTypes::bin_type> provided by buffer_provider) by incrementing the bin given by each incoming tcspc::bin_increment_event.
A round of accumulation is ended by resetting, for example by receiving a ResetEvent. After a reset, the histogram is replaced with a new bucket and a new round is started.
The value of Policy can modify behavior and specify what happens when a histogram bin overflows; see tcspc::histogram_policy for details.
The result is emitted in 2 ways:
Policy contains tcspc::histogram_policy::emit_concluding_events), a tcspc::concluding_histogram_event<DataTypes> is emitted upon each reset. This event carries a bucket with extractable storage.| Policy | policy specifying behavior of the processor |
| ResetEvent | type of event causing a new round to start |
| DataTypes | data type set specifying bin_index_type and bin_type |
| Downstream | downstream processor type (usually deduced) |
| num_bins | number of bins in the histogram (must match the bin mapper used upstream) |
| max_per_bin | maximum value allowed in each bin |
| buffer_provider | bucket source providing series of buffers (a new bucket is used after every reset) |
| downstream | downstream processor |
| auto tcspc::scan_histograms | ( | arg::num_elements< std::size_t > | num_elements, |
| arg::num_bins< std::size_t > | num_bins, | ||
| arg::max_per_bin< typename DataTypes::bin_type > | max_per_bin, | ||
| std::shared_ptr< bucket_source< typename DataTypes::bin_type > > | buffer_provider, | ||
| Downstream | downstream ) |
Create a processor that scans over an array of histograms, updating each with the received bin increment clusters.
The processor fills an array of histograms (held in a tcspc::bucket<DataTypes::bin_type> provided by buffer_provider) by sequentially visiting its elements (each a histogram) on each incoming tcspc::bin_increment_cluster_event. One such iteration over the array is termed a scan. After a scan, the processor returns to the first element of the array and continues to add increments (by default adding to the previous scans).
A round consisting of multiple scans is ended by resetting, for example by receiving a ResetEvent. After a reset, the histogram array is replaced with a new bucket and a new round is started, in which handling of subsequent bin increment clusters begins at the first element of the array.
The value of Policy can modify behavior (including disabling the accumulating behavior) and specify what happens when a histogram bin overflows; see tcspc::histogram_policy for details.
The result is emitted in 3 ways:
Policy contains tcspc::histogram_policy::emit_concluding_events), a tcspc::concluding_histogram_array_event<DataTypes> is emitted upon each reset, but only after rolling back any incomplete scan, such that every element of the array contains counts from the same number of scans. This event carries a bucket with extractable storage.| Policy | policy specifying behavior of the processor |
| ResetEvent | type of event causing a new round to start |
| DataTypes | data type set specifying bin_index_type and bin_type |
| Downstream | downstream processor type (usually deduced) |
| num_elements | the number of elements (each a histogram) in the array |
| num_bins | the number of bins in each histogram (must match the bin mapper used upstream) |
| max_per_bin | maximum value allowed in each bin |
| buffer_provider | bucket source providing series of buffers for each histogram array |
| downstream | downstream processor |