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

Description

Event types.

Events are pieces of data passed from processor to processor.

Events in libtcspc are typically plain C++ structs with public data members of simple types. Processors that operate on different event types do so by static polymorphism, so event types do not need to derive from any class.

Event types and templates are named with the suffix _event. There is no formal event concept: event types are normally move-constructible (essential, so that they can flow between processors, but tcspc::never_event is an exception) and often also copyable (required by some processors and the testing facilities).

By convention, events provided by libtcspc additionally support operator== and operator<<, but those are required only by facilities that explicitly use them, notably tcspc::capture_output() (for unit testing).

For simple events that carry small amounts of data, plain C++ structs are preferred. Events should have value semantics (as opposed to reference semantics) whenever it is reasonable.

Events that carry large amounts of data (such as histograms and arrays thereof) do so using the tcspc::bucket type in order to allow zero-copy transfer to various destinations. Bare tcspc::bucket instances are also used as events when an array of elementary events (or raw bytes) is produced in a single batch (such as when reading from a file or explicitly collecting for the purpose of buffering).

Topics

 Core event types
 General-purpose events.
 Device event types
 Vendor-specific raw binary records generated by hardware.
 Time tag and TCSPC event types
 Logical events translated from raw device events.
 Timing modeling event types
 Events conveying real-valued models of timings and event sequences.
 Binning event types
 Events for binning data for histogramming.
 Histogram event types
 Events carrying histograms and arrays of histograms.
 Testing event types
 Events used for unit testing of generic processors.