Geant4 10.7.0
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(int)>
 
using frame_func_t = std::function< G4String(const char *)>
 
using signal_set_t = std::set< int >
 

Static Public Member Functions

static void Handler (int, siginfo_t *, void *)
 
static void Message (int, siginfo_t *, std::ostream &)
 
static void ExitAction (int)
 
static int Enable (const std::string &)
 
static int Enable (const signal_set_t &=DefaultSignals())
 
static int Disable (signal_set_t={})
 
static int GetSignal (const std::string &)
 
static std::string Description (int)
 
template<typename FuncT >
static void AddExitAction (FuncT &&)
 
template<size_t Depth, size_t Offset = 0, typename FuncT = frame_func_t>
static std::array< G4ResultOf_t< FuncT(const char *)>, Depth > GetMangled (FuncT &&func=FrameFunctor())
 
template<size_t Depth, 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 726 of file G4Backtrace.hh.

Member Typedef Documentation

◆ exit_action_t

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

Definition at line 736 of file G4Backtrace.hh.

◆ frame_func_t

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

Definition at line 737 of file G4Backtrace.hh.

◆ sigaction_t

Definition at line 735 of file G4Backtrace.hh.

◆ siginfo_t

Definition at line 734 of file G4Backtrace.hh.

◆ signal_set_t

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

Definition at line 738 of file G4Backtrace.hh.

Member Function Documentation

◆ AddExitAction()

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

Definition at line 764 of file G4Backtrace.hh.

765 {}

◆ DefaultSignals()

static signal_set_t & G4Backtrace::DefaultSignals ( )
inlinestatic

Definition at line 795 of file G4Backtrace.hh.

796 {
797 static signal_set_t _instance = {};
798 return _instance;
799 }
std::set< int > signal_set_t
Definition: G4Backtrace.hh:738

◆ Description()

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

Definition at line 761 of file G4Backtrace.hh.

761{ return std::string{}; }

◆ Disable()

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

Definition at line 759 of file G4Backtrace.hh.

759{}) { return 0; }

◆ Enable() [1/2]

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

Definition at line 758 of file G4Backtrace.hh.

758{ return 0; }

◆ Enable() [2/2]

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

Definition at line 757 of file G4Backtrace.hh.

757{ return 0; }

Referenced by G4RunManagerKernel::G4RunManagerKernel().

◆ ExitAction()

static void G4Backtrace::ExitAction ( int  )
inlinestatic

Definition at line 756 of file G4Backtrace.hh.

756{}

◆ FrameFunctor()

static frame_func_t & G4Backtrace::FrameFunctor ( )
inlinestatic

Definition at line 788 of file G4Backtrace.hh.

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

◆ GetData()

static actions & G4Backtrace::GetData ( )
inlinestatic

Definition at line 801 of file G4Backtrace.hh.

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

◆ GetDemangled()

template<size_t Depth, 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 778 of file G4Backtrace.hh.

780 {
781 using type = G4ResultOf_t<FuncT(const char*)>;
782 auto ret = std::array<type, Depth>{};
783 ret.fill(func(""));
784 return ret;
785 }
typename std::result_of< FuncT >::type G4ResultOf_t
Definition: G4Backtrace.hh:103

◆ GetMangled()

template<size_t Depth, 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 768 of file G4Backtrace.hh.

770 {
771 using type = G4ResultOf_t<FuncT(const char*)>;
772 auto ret = std::array<type, Depth>{};
773 ret.fill(func(""));
774 return ret;
775 }

◆ GetSignal()

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

Definition at line 760 of file G4Backtrace.hh.

760{ return -1; }

◆ Handler()

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

Definition at line 754 of file G4Backtrace.hh.

754{}

◆ Message()

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

Definition at line 755 of file G4Backtrace.hh.

755{}

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