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

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

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

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

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.
template<typename state_type, concepts::scalar scalar_t>
void operator() (const state_type &state, const stepping::config &, const char *message, const scalar_t dist)
 Inspector interface.
template<typename state_type, concepts::scalar scalar_t>
void operator() (const state_type &state, const stepping::config &, const char *message, const scalar_t, const std::size_t n_trials, const scalar_t step_scalor)
 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 stepping information from inside the stepper methods.

Detailed Description

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

Meant for debugging.

Constructor & Destructor Documentation

◆ print_inspector()

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

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

Parameters
otherInspector to copy.

Member Function Documentation

◆ operator()() [1/2]

template<typename state_type, concepts::scalar scalar_t>
void detray::stepping::print_inspector::operator() ( const state_type & state,
const stepping::config & ,
const char * message,
const scalar_t dist )

Inspector interface.

Gathers detailed information during stepping

Parameters
stateStepper state to inspect.
messageMessage to record.
distDistance to the next constraint.

◆ operator()() [2/2]

template<typename state_type, concepts::scalar scalar_t>
void detray::stepping::print_inspector::operator() ( const state_type & state,
const stepping::config & ,
const char * message,
const scalar_t ,
const std::size_t n_trials,
const scalar_t step_scalor )

Inspector interface.

Gathers detailed information during stepping

Parameters
stateStepper state to inspect.
messageMessage to record.
n_trialsNumber of trials performed.
step_scalorStep scaling factor.

◆ operator=() [1/2]

print_inspector & detray::stepping::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::stepping::print_inspector::operator= ( print_inspector && other)
default

Move assignemten operator.

Parameters
otherInspector to move from.
Returns
This inspector.

◆ to_string()

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