libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
tcspc::bh_spc600_4096ch_event Struct Reference

Description

Binary record interpretation for raw events from SPC-600/630 in 4096-channel mode.

Public Member Functions

constexpr auto adc_value () const noexcept -> u16np
 Read the ADC value (i.e., difference time) if this event represents a photon.
constexpr auto gap_flag () const noexcept -> bool
 Read the 'gap' (data lost) flag.
auto gap_flag (bool gap) noexcept -> bh_spc600_4096ch_event &
 Set or clear the gap flag of this event.
constexpr auto invalid_flag () const noexcept -> bool
 Read the 'invalid' flag.
constexpr auto macrotime () const noexcept -> u32np
 Read the macrotime counter value (no rollover correction).
constexpr auto macrotime_overflow_flag () const noexcept -> bool
 Read the 'macrotime overflow' flag.
constexpr auto routing_signals () const noexcept -> u8np
 Read the routing signals (usually the detector channel) if this event represents a photon.

Static Public Member Functions

static constexpr auto is_multiple_macrotime_overflow () noexcept -> bool
 Determine if this event represents multiple macrotime overflows.
static constexpr auto make_invalid_photon (u32np macrotime, u16np adc_value, bool macrotime_overflow=false) -> bh_spc600_4096ch_event
 Make an event representing an invalid photon event.
static constexpr auto make_photon (u32np macrotime, u16np adc_value, u8np route, bool macrotime_overflow=false) -> bh_spc600_4096ch_event
 Make an event representing a valid photon event.
static constexpr auto marker_bits () noexcept -> u8np
 Read the marker bits (mask) if this event represents markers.
static constexpr auto marker_flag () noexcept -> bool
 Read the 'marker' flag.
static constexpr auto multiple_macrotime_overflow_count () noexcept -> u32np
 Read the macrotime overflow count if this event represents multiple macrotime overflows.

Public Attributes

std::array< std::byte, 6 > bytes
 Bytes of the 48-bit raw device event.

Static Public Attributes

static constexpr bool has_markers = false
 Whether this event type can represent marker events.
static constexpr u32 macrotime_overflow_period = 1 << 24
 The macrotime overflow period of this event type.

Friends

auto operator<< (std::ostream &strm, bh_spc600_4096ch_event const &e) -> std::ostream &
 Stream insertion operator.
auto operator== (bh_spc600_4096ch_event const &lhs, bh_spc600_4096ch_event const &rhs) noexcept -> bool=default
 Equality comparison operator.

Member Function Documentation

◆ gap_flag()

auto tcspc::bh_spc600_4096ch_event::gap_flag ( bool gap) -> bh_spc600_4096ch_event &
inlinenoexcept

Set or clear the gap flag of this event.

All other bits are unaffected.

Parameters
gapif true, set the gap bit; otherwise clear
Returns
event

◆ make_invalid_photon()

constexpr auto tcspc::bh_spc600_4096ch_event::make_invalid_photon ( u32np macrotime,
u16np adc_value,
bool macrotime_overflow = false ) -> bh_spc600_4096ch_event
inlinestaticconstexpr

Make an event representing an invalid photon event.

The gap flag is cleared.

Parameters
macrotimethe photon macrotime; 0 to 16,777,215
adc_valuethe photon ADC value (microtime); 0 to 4095
macrotime_overflowwhether to set the macrotime overflow flag
Returns
event

◆ make_photon()

constexpr auto tcspc::bh_spc600_4096ch_event::make_photon ( u32np macrotime,
u16np adc_value,
u8np route,
bool macrotime_overflow = false ) -> bh_spc600_4096ch_event
inlinestaticconstexpr

Make an event representing a valid photon event.

The gap flag is cleared.

Parameters
macrotimethe photon macrotime; 0 to 16,777,215
adc_valuethe photon ADC value (microtime); 0 to 4095
routethe routing signals (channel); 0 to 255
macrotime_overflowwhether to set the macrotime overflow flag
Returns
event

The documentation for this struct was generated from the following file: