ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::navigation::print_inspector Struct Reference

A navigation inspector that prints information about the current navigation state. More...

#include <detray/test/utils/inspectors.hpp>

Collaboration diagram for detray::navigation::print_inspector:
[legend]

Classes

struct  void_generator

Public Types

using const_view_type = dvector_view<const char>
 Const device view type for the debug stream.
using view_type = dvector_view<char>
 Mutable device view type for the debug stream.

Public Member Functions

 print_inspector ()=default
 Default constructor.
 print_inspector (const print_inspector &other)
 Copy constructor ensures that the string stream is set up identically.
 print_inspector (print_inspector &&other)=default
 Move constructor.
 ~print_inspector ()=default
 Default destructor.
template<typename state_type, typename message_generator_t = void_generator>
auto operator() (const state_type &state, const char *message, const message_generator_t &msg_gen={})
 Inspector interface.
template<typename state_type, concepts::point3D point3_t, concepts::vector3D vector3_t, typename message_generator_t = void_generator>
auto operator() (const state_type &state, const navigation::config &cfg, const point3_t &track_pos, const vector3_t &track_dir, const char *message, const message_generator_t &msg_gen={})
 Inspector interface.
print_inspector & operator= (const print_inspector &other)
 Copy assignemten operator ensures that the string stream is set up identically.
print_inspector & operator= (print_inspector &&other)=default
 Move assignemten operator.
std::string to_string () const

Public Attributes

std::stringstream debug_stream {}
 Gathers navigation information across navigator update calls.
std::string fata_error_msg {""}
 Special message that is collected if the navigator hits a fatal error.

Detailed Description

A navigation inspector that prints information about the current navigation state.

Meant for debugging.

Constructor & Destructor Documentation

◆ print_inspector() [1/2]

detray::navigation::print_inspector::print_inspector ( const print_inspector & other)

Copy constructor ensures that the string stream is set up identically.

Parameters
otherInspector to copy.

◆ print_inspector() [2/2]

detray::navigation::print_inspector::print_inspector ( print_inspector && other)
default

Move constructor.

Parameters
otherInspector to move from.

Member Function Documentation

◆ operator()() [1/2]

template<typename state_type, typename message_generator_t = void_generator>
auto detray::navigation::print_inspector::operator() ( const state_type & state,
const char * message,
const message_generator_t & msg_gen = {} )

Inspector interface.

Print basic state information

Parameters
stateNavigation state to inspect.
messageMessage to record.
msg_genOptional message generator.
Returns
No value.

◆ operator()() [2/2]

template<typename state_type, concepts::point3D point3_t, concepts::vector3D vector3_t, typename message_generator_t = void_generator>
auto detray::navigation::print_inspector::operator() ( const state_type & state,
const navigation::config & cfg,
const point3_t & track_pos,
const vector3_t & track_dir,
const char * message,
const message_generator_t & msg_gen = {} )

Inspector interface.

Gathers detailed information during navigation

Parameters
stateNavigation state to inspect.
cfgNavigation configuration.
track_posCurrent track position.
track_dirCurrent track direction.
messageMessage to record.
msg_genOptional message generator.
Returns
No value.

◆ operator=() [1/2]

print_inspector & detray::navigation::print_inspector::operator= ( const print_inspector & other)

Copy assignemten operator ensures that the string stream is set up identically.

Parameters
otherInspector to copy.
Returns
This inspector.

◆ operator=() [2/2]

print_inspector & detray::navigation::print_inspector::operator= ( print_inspector && other)
default

Move assignemten operator.

Parameters
otherInspector to move from.
Returns
This inspector.

◆ to_string()

std::string detray::navigation::print_inspector::to_string ( ) const
Returns
a string representation of the gathered information