Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Backtrace Class Reference

#include <G4Backtrace.hh>

Classes

struct  actions
 
struct  fake_sigaction
 
struct  fake_siginfo
 

Public Types

using siginfo_t = fake_siginfo
 
using sigaction_t = fake_sigaction
 
using exit_action_t = std::function< void(G4int)>
 
using frame_func_t = std::function< G4String(const char *)>
 
using signal_set_t = std::set< G4int >
 

Static Public Member Functions

static void Handler (G4int, siginfo_t *, void *)
 
static void Message (G4int, siginfo_t *, std::ostream &)
 
static void ExitAction (G4int)
 
static G4int Enable (const std::string &)
 
static G4int Enable (const signal_set_t &=DefaultSignals())
 
static G4int Disable (signal_set_t={})
 
static G4int GetSignal (const std::string &)
 
static std::string Description (G4int)
 
template<typename FuncT >
static void AddExitAction (FuncT &&)
 
template<std::size_t Depth, std::size_t Offset = 0, typename FuncT = frame_func_t>
static std::array< G4ResultOf_t< FuncT, const char * >, Depth > GetMangled (FuncT &&func=FrameFunctor())
 
template<std::size_t Depth, std::size_t Offset = 0, typename FuncT = frame_func_t>
static std::array< G4ResultOf_t< FuncT, const char * >, Depth > GetDemangled (FuncT &&func=FrameFunctor())
 
static frame_func_tFrameFunctor ()
 
static signal_set_tDefaultSignals ()
 
static actionsGetData ()
 

Detailed Description

Definition at line 725 of file G4Backtrace.hh.

Member Typedef Documentation

◆ exit_action_t

using G4Backtrace::exit_action_t = std::function<void(G4int)>

Definition at line 735 of file G4Backtrace.hh.

◆ frame_func_t

using G4Backtrace::frame_func_t = std::function<G4String(const char*)>

Definition at line 736 of file G4Backtrace.hh.

◆ sigaction_t

Definition at line 734 of file G4Backtrace.hh.

◆ siginfo_t

Definition at line 733 of file G4Backtrace.hh.

◆ signal_set_t

using G4Backtrace::signal_set_t = std::set<G4int>

Definition at line 737 of file G4Backtrace.hh.

Member Function Documentation

◆ AddExitAction()

template<typename FuncT >
static void G4Backtrace::AddExitAction ( FuncT &&  )
inlinestatic

Definition at line 763 of file G4Backtrace.hh.

764 {}

◆ DefaultSignals()

static signal_set_t & G4Backtrace::DefaultSignals ( )
inlinestatic

Definition at line 794 of file G4Backtrace.hh.

795 {
796 static signal_set_t _instance = {};
797 return _instance;
798 }
std::set< G4int > signal_set_t
Definition: G4Backtrace.hh:737

◆ Description()

static std::string G4Backtrace::Description ( G4int  )
inlinestatic

Definition at line 760 of file G4Backtrace.hh.

760{ return std::string{}; }

◆ Disable()

static G4int G4Backtrace::Disable ( signal_set_t  = {})
inlinestatic

Definition at line 758 of file G4Backtrace.hh.

758{}) { return 0; }

◆ Enable() [1/2]

static G4int G4Backtrace::Enable ( const signal_set_t = DefaultSignals())
inlinestatic

Definition at line 757 of file G4Backtrace.hh.

757{ return 0; }

◆ Enable() [2/2]

static G4int G4Backtrace::Enable ( const std::string &  )
inlinestatic

Definition at line 756 of file G4Backtrace.hh.

756{ return 0; }

Referenced by G4RunManagerKernel::G4RunManagerKernel().

◆ ExitAction()

static void G4Backtrace::ExitAction ( G4int  )
inlinestatic

Definition at line 755 of file G4Backtrace.hh.

755{}

◆ FrameFunctor()

static frame_func_t & G4Backtrace::FrameFunctor ( )
inlinestatic

Definition at line 787 of file G4Backtrace.hh.

788 {
789 static frame_func_t _instance = [](const char* _s) { return G4String(_s); };
790 return _instance;
791 }
std::function< G4String(const char *)> frame_func_t
Definition: G4Backtrace.hh:736

◆ GetData()

static actions & G4Backtrace::GetData ( )
inlinestatic

Definition at line 800 of file G4Backtrace.hh.

801 {
802 static auto _instance = actions{};
803 return _instance;
804 }

◆ GetDemangled()

template<std::size_t Depth, std::size_t Offset = 0, typename FuncT = frame_func_t>
static std::array< G4ResultOf_t< FuncT, const char * >, Depth > G4Backtrace::GetDemangled ( FuncT &&  func = FrameFunctor())
inlinestatic

Definition at line 777 of file G4Backtrace.hh.

779 {
781 auto ret = std::array<type, Depth>{};
782 ret.fill(func(""));
783 return ret;
784 }
std::invoke_result_t< FuncT, ArgTypes... > G4ResultOf_t
Definition: G4Backtrace.hh:103

◆ GetMangled()

template<std::size_t Depth, std::size_t Offset = 0, typename FuncT = frame_func_t>
static std::array< G4ResultOf_t< FuncT, const char * >, Depth > G4Backtrace::GetMangled ( FuncT &&  func = FrameFunctor())
inlinestatic

Definition at line 767 of file G4Backtrace.hh.

769 {
771 auto ret = std::array<type, Depth>{};
772 ret.fill(func(""));
773 return ret;
774 }

◆ GetSignal()

static G4int G4Backtrace::GetSignal ( const std::string &  )
inlinestatic

Definition at line 759 of file G4Backtrace.hh.

759{ return -1; }

◆ Handler()

static void G4Backtrace::Handler ( G4int  ,
siginfo_t ,
void *   
)
inlinestatic

Definition at line 753 of file G4Backtrace.hh.

753{}

◆ Message()

static void G4Backtrace::Message ( G4int  ,
siginfo_t ,
std::ostream &   
)
inlinestatic

Definition at line 754 of file G4Backtrace.hh.

754{}

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