|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Processors for data validation.
Functions | |
| template<typename Event0, typename Event1, typename Downstream> | |
| auto | tcspc::check_alternating (Downstream downstream) |
| Create a processor that checks that events of two types appear in alternation. | |
| template<typename DataTypes = default_data_types, bool RequireStrictlyIncreasing = false, typename Downstream> | |
| auto | tcspc::check_monotonic (Downstream downstream) |
| Create a processor that checks that abstime is monotonically increasing or nondecreasing. | |
| auto tcspc::check_alternating | ( | Downstream | downstream | ) |
Create a processor that checks that events of two types appear in alternation.
The processor passes through all events. It examines events of types Event0 and Event1, and checks that they alternate, starting with Event0. If a violation is detected, a tcspc::warning_event is emitted just before the offending event.
| Event0 | event type expected first |
| Event1 | event type expected second |
| Downstream | downstream processor type (usually deduced) |
| downstream | downstream processor |
| auto tcspc::check_monotonic | ( | Downstream | downstream | ) |
Create a processor that checks that abstime is monotonically increasing or nondecreasing.
The processor passes through time-tagged events and checks that their abstime is monotonic (that is, increasing or non-decreasing). The event's abstime field type must match DataTypes::abstime_type. If a violation is detected, a tcspc::warning_event is emitted just before the offending event.
Checking abstime monotonicity is often a good way to detect gross issues in the data, such as reading data in an incorrect format or using text mode to read binary data.
| DataTypes | data type set specifying abstime_type |
| RequireStrictlyIncreasing | if true, issue warning also on equal abstime |
| Downstream | downstream processor type (usually deduced) |
| downstream | downstream processor |