ATLAS Offline Software
Loading...
Searching...
No Matches
Athena Namespace Reference

Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc.h and will be non-nullptr in case the GaudiSvc/AthenaKernel shared libraries have been loaded. More...

Namespaces

namespace  detail
namespace  details
namespace  DsoUtils
namespace  Options
namespace  Units

Classes

struct  BitTraits
 Describe the bit features of an integral type T. More...
class  Callback1
class  Callback1Rep
class  CallbackImpF11
class  Chrono
 Exception-safe IChronoSvc caller. More...
class  ConditionsCleanerSvc
 Facade class for conditions garbage collection. More...
class  CondObjDeleter
 Deletion object for conditions payloads. More...
class  DataBucketBranch
class  DBLock
 Common database lock. More...
class  DebugAids
 Utilities for debugging support. More...
class  DelayedConditionsCleanerSvc
 Clean conditions containers after a delay. More...
class  DelayedConditionsCleanerSvcProps
class  DvThinningHdlr
 Handle DataProxy holding DataVector. More...
struct  get_thinning_handler
 metafunction to automagically dispatch on the type of a container and fetch the right thinning handler More...
class  IConditionsCleanerSvc
 Interface for doing garbage collection of conditions objects. More...
class  IdcThinningHdlr
 Handle DataProxy holding IdentifiableContainer This class defines a (type-safe) protocol to pack and unpack thinned IdentifiableContainer. More...
class  IInputRename
 Interface to retrieve input rename map. More...
class  IMessageSvcHolder
 get a IMessageSvc* on 1st use (if not set) and release it on ~ More...
struct  InputRenameEntry
 Type of the input rename map: sgkey_t -> sgkey_t. More...
class  IRCUObject
 Base object class for RCU-style synchronization for Athena. More...
class  IRCUSvc
 Interface for RCU service. More...
class  ISlimmingHdlr
 This class defines a protocol to slim objects (removing parts of that object) More...
class  IThinningHdlr
 This class defines a protocol to pack and unpack thinned collections. More...
class  LeafCnv
class  NtupleCnvSvc
class  RCUObject
 Wrapper object controlled by RCU synchonization. More...
struct  RCUObjectGraceSets
class  RCURead
 Helper to read data from a RCUObject. More...
class  RCUReadQuiesce
 Helper to read data from a RCUObject. More...
class  RCUSvc
 Service to allow cleaning up RCU objects at the EndEvent. More...
class  RCUUpdate
 Helper to update data in a RCUObject. More...
class  RCUUpdater
 Implementation of Updater for RCUSvc. More...
class  RecyclableDataObject
 Helper for recycling objects from event to event. More...
class  RecyclableDataQueue
 Holder for recyclable objects. More...
class  RootAsciiDumperAlg
class  RootAsciiDumperAlgHandle
class  RootBranchAddress
 A simple class to hold the buffer of a TBranch from a TTree. More...
class  RootCnv
 This class provides the abstract converter to translate an object to/from its persistent ROOT representation. More...
class  RootCnvSvc
 This class provides the interface between Athena and RootSvc. More...
class  RootConnection
 This class provides the implementation of Athena::RootConnection class, similar to Gaudi IDataConnection. More...
class  RootGlobalsRestore
 state of a few global resources from ROOT and restores their initial value upon d-tor call. More...
class  ROOTMessageFilterSvc
 Service for filtering "ROOT messages" in Athena. More...
class  RootNtupleEventContext
 ROOT specific event selector context. More...
class  RootNtupleEventSelector
 Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend. More...
class  RootNtupleOutputMetadataTool
 This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool. More...
class  RootNtupleOutputStream
 algorithm that marks for write data objects in SG More...
class  RootOutputStreamTool
 This is the AthenaRoot version of AthenaServices/AthenaOutputStreamTool. More...
class  RootSvc
 This class provides the interface to the ROOT software. More...
class  SharedLibrary
 Shared library services. More...
class  SharedLibraryError
 Error in a shared library operation. More...
class  Signal
 Utilities for handling signals and fatal errors. More...
struct  StatusCategory
class  StdThinningHdlr
 Handle DataProxy holding std::vector<T> This class defines a (type-safe) protocol to pack and unpack thinned DataVector. More...
class  ThinningCacheTool
 Create ThinningCache for a given stream. More...
class  Timeout
 Singleton to access the timeout flag. More...
class  TimeoutMaster
 Class to modify timeout flag. More...
class  ToolLock
 RAII helper for acquiring the lock of an ILockableTool. More...
struct  TPCnvType
struct  TPCnvVers
class  xAODBranchAddress
 A simple class to do the retrieve from TEvent. More...
class  xAODCnv
class  xAODCnvSvc
class  xAODEventContext
 event selector context ... just holds reference back to the selector More...
class  xAODEventSelector
 Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend. More...

Typedefs

using InputRenameMap_t = SG::SGKeyMap<InputRenameEntry>
typedef void(* DummyHandlerType) (int)
 Dummy handler type for standard signal() function.
typedef RootNtupleEventContext::FileNames_t FileNames_t

Enumerations

enum class  Status : StatusCode::code_t { TIMEOUT = 10 , MISSING_DATA = 11 }
 Athena specific StatusCode values. More...

Functions

std::string typeinfoName (const std::type_info &ti)
 Convert a type_info to a demangled string.
IMessageSvc * getMessageSvc (bool quiet=false)
IMessageSvc * getMessageSvc (const Options::CreateOptions o, bool quiet=false)
void reportMessage (IMessageSvc *ims, const std::string &source, int type, const std::string &message)
 Wrappers for some of the IMessageSvc methods These can be used from libraries without explicit Gaudi dependency via weak linking.
int outputLevel (const IMessageSvc *ims, const std::string &source)
void setOutputLevel (IMessageSvc *ims, const std::string &source, int level)
int ubsan_boost_suppress ()
StatusCode ROOTMessageFilterSvc::initialize ATLAS_NOT_THREAD_SAFE (void)
 Return the file descriptor #fataldump() uses for output.
template<class T1, class T2>
Callback1Rep< T1 > * CreateCallback (void(*function)(T1, T2), const T2 &fill_2)
void DebugAids::stacktraceLine ATLAS_NOT_THREAD_SAFE (IOFD fd, unsigned long addr)
 Write out stack trace line to FD.
void DebugAids::setStackTraceAddr2Line ATLAS_NOT_THREAD_SAFE (const char *path)
void DebugAids::stacktrace ATLAS_NOT_THREAD_SAFE (IOFD fd)
 Produce a stack trace.
void SharedLibrary::path ATLAS_NOT_THREAD_SAFE (const std::string &path)
void Signal::handleQuit ATLAS_NOT_THREAD_SAFE (QuitHook hook)
void Signal::handleFatal ATLAS_NOT_THREAD_SAFE (const char *applicationName, IOFD fd, FatalHook hook, FatalReturn mainreturn, unsigned options)
 Install default handler for fatal signals.
void Signal::quit ATLAS_NOT_THREAD_SAFE (int sig, siginfo_t *info, void *x)
 The quit signal handler.
bool Signal::fatalDump ATLAS_NOT_THREAD_SAFE (int sig, siginfo_t *info, void *extra, IOFD fd, unsigned options)

Variables

std::atomic< bool > getMessageSvcQuiet
 Set this to force off the warning messages from getMessageSvc (in unit tests, for example).
int ubsan_boost_suppress_ = ubsan_boost_suppress()

Detailed Description

Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc.h and will be non-nullptr in case the GaudiSvc/AthenaKernel shared libraries have been loaded.

Typedef Documentation

◆ DummyHandlerType

typedef void(* Athena::DummyHandlerType) (int)

Dummy handler type for standard signal() function.

Definition at line 109 of file SealSignal.cxx.

◆ FileNames_t

◆ InputRenameMap_t

Enumeration Type Documentation

◆ Status

enum class Athena::Status : StatusCode::code_t
strong

Athena specific StatusCode values.

These can be used in place of Gaudi's StatusCode::XYZ if additional information should be returned. Some of these codes will result in special treatment of the event (e.g. sending them to the debug stream in the HLT).

Only generic return codes should be defined here. Algorithm-specific return values should be encoded in separate enums in the respective packages.

Enumerator
TIMEOUT 

Timeout during event processing.

MISSING_DATA 

Missing/corrupted input data.

Definition at line 22 of file AthStatusCode.h.

22 : StatusCode::code_t {
23 TIMEOUT = 10,
24 MISSING_DATA = 11
25};
@ TIMEOUT
Timeout during event processing.
@ MISSING_DATA
Missing/corrupted input data.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/9]

void Signal::handleFatal Athena::ATLAS_NOT_THREAD_SAFE ( const char * applicationName,
IOFD fd,
FatalHook hook,
FatalReturn mainreturn,
unsigned options )

Install default handler for fatal signals.

This method installs a handler for fatal signals such as floating point exceptions, illegal instructions, and memory violations. The behaviour is more precisely determined by options, a bitwise or of the option constants defined in the class declaration.

applicationName sets the application name to be used to report the signal in #fatalDump(). fd sets the file descriptor to which the fatal signal message is written; by default this will be the standard error output. hook sets the pre-exit application hook to invoke, mainreturn sets the hook to return to back to the application "main loop" (i.e. ignore the signal by jumping out of the signal back to the somewhere higher up in the application).

Options left to default values will not change the current state. This allows one to re-install signal handlers without disturbing already registered information. Use this to restore handlers after some other library has meddled with the handlers.

This installs #fatal() as the handler for fatal signals and on Windows for otherwise unhandled fatal structured exceptions. If #FATAL_ON_QUIT is included in options, quitting related signals (see #quit()) are also considered fatal. If #FATAL_ON_INT is set, SIGINT is considered fatal—but see also #fatal() documentation. If #USR1_DUMP_CORE is set, DebugAids::coredump is registered as a handler for SIGUSR1 (please note the security risks of this option in its documentation).

A multi-threaded application should call this method in each thread. (FIXME: Calling this in one thread and blocking signals in others won't work on Linux, and in any case will probably produce nonsense stack traces (unless stacktrace can be fixed to dump the stacks of all the threads). Since the handler is always the same, I am not sure it will make the slightest difference which thread catches the signals, and on the other hand, it is best to dump the problems in the faulting thread if possible.)

Definition at line 646 of file SealSignal.cxx.

651{
652 // FIXME: Provide means to install handlers for fatal signals that
653 // an application has requested and app was supposed to register a
654 // handler before making the request? (So that if the app handler
655 // is not installed for some reason, an internal error hook can
656 // run?) Such fatal signals include:
657 // - SIGPIPE: read or write to broken pipe; child died
658 // (read or write to socket with ASYNC io?)
659 // - SIGLOST: lost a resource (e.g., lock on nfs server reboot)
660 // - SIGALRM: interval timer elapsed
661 // - SIGUSR1, SIGUSR2
662 // - SIGPOLL: pollable streams device events
663 // - SIGIO: i/o possible (from async i/o)
664 // - SIGVTALRM: virtual timer expired
665 // - SIGPROF: profiling timer expired
666 // - SIGRTMIN - SIGRTMAX: POSIX real-time signals
667 //
668 // Some of these the application should probably just #block()
669 // (e.g. SIGPIPE). Some of them the app should block and then
670 // wait or poll for events (SIGPOLL, SIGIO, possibly SIGALRM, the
671 // real-time signals if they are used).
672
673 static const int hups [] = {
674#ifdef SIGHUP
675 SIGHUP, // hang up (lost terminal or process group leader)
676#endif
677#ifdef SIGTERM
678 SIGTERM, // terminate (e.g. system going down)
679#endif
680#ifdef SIGQUIT
681 SIGQUIT, /* user request to quit and leave debuggable
682 state (from quit key on controlling
683 terminal) */
684
685#endif
686 -1
687 };
688
689 static int fatals [] = {
690#ifdef SIGFPE
691 SIGFPE, // arithmetic exception
692#endif
693#ifdef SIGILL
694 SIGILL, // illegal instruction
695#endif
696#ifdef SIGSEGV
697 SIGSEGV, // illegal address
698#endif
699#ifdef SIGBUS
700 SIGBUS, // hardware exception
701#endif
702#ifdef SIGIOT
703 SIGIOT, /* IOT trap. Before SIGABRT so that if SIGIOT
704 == SIGABRT then SIGABRT overrides SIGIOT;
705 SIGABRT is in ISO C and POSIX.1, SIGIOT is
706 not. */
707#endif
708#ifdef SIGABRT
709 SIGABRT, // abort
710
711#endif
712#ifdef SIGTRAP
713 SIGTRAP, // trace/breakpoint reached
714#endif
715#ifdef SIGEMT
716 SIGEMT, // emulation trap (may be used by profiler?)
717#endif
718#ifdef SIGSYS
719 SIGSYS, // invalid system call
720#endif
721#ifdef SIGXCPU
722 SIGXCPU, // cpu time limit exceeded
723#endif
724#ifdef SIGXFSZ
725 SIGXFSZ, // file size limit exceeded
726#endif
727 -1
728 };
729
730 // Make sure `strsignal' is properly initialised.
731 name (1);
732
733 // Remember app name if specified
734 if (applicationName && *applicationName)
735 s_applicationName = applicationName;
736
737 // Automatically initialise s_fatalFd on first access
738 if (s_fatalFd == IOFD_INVALID)
739 s_fatalFd = STDERR_HANDLE;
740
741 // Remember the fatal output fd if defined
742 if (fd != IOFD_INVALID)
743 s_fatalFd = fd;
744
745 // Now that we know the fd, setup a callback for dumping shared
746 // libraries via #SignalDumpLibs. This avoids having to allocate
747 // memory for the callback implementation in the middle of a fatal
748 // signal, and on the other hand avoids a global object which
749 // might not be initialised yet.
750 delete SignalDumpCallback;
751 SignalDumpCallback = new SharedLibrary::InfoHandler
752 (CreateCallback (&SignalDumpLibs, s_fatalFd));
753
754 // Remember the hooks if specified
755 if (hook)
756 s_fatalHook = hook;
757
758 if (mainreturn)
759 s_fatalReturn = mainreturn;
760
761 // Remember the new options
762 s_fatalOptions = options;
763
764 // Signal::fatal() requires this, otherwise weird things can happen.
765 // Programs not wanting to return to main should set FATAL_AUTO_EXIT.
766 assert (s_fatalReturn || (s_fatalOptions & FATAL_AUTO_EXIT));
767
768 // Install signal handlers.
769 if (options & FATAL_ON_QUIT)
770 for (unsigned sig = 0; hups [sig] != -1; ++sig)
771 handle (hups [sig], fatal);
772
773 for (unsigned sig = 0; fatals [sig] != -1; ++sig)
774 handle (fatals [sig], fatal);
775
776#ifdef SIGINT
777 // interrupt key from controlling terminal
778 if (options & FATAL_ON_INT)
779 handle (SIGINT, fatal);
780#endif
781
782#ifdef SIGUSR1
783 // program-defined signals SIGUSR1 and SIGUSR2
784 if (options & USR1_DUMP_CORE)
785 handle (SIGUSR1, (HandlerType) DebugAids::coredump);
786#endif
787
788#ifdef _WIN32
789 SetUnhandledExceptionFilter (&SEHFatal);
790#endif
791}
#define IOFD_INVALID
Invalid channel descriptor constant.
Definition SealCommon.h:20
#define STDERR_HANDLE
Definition SealDebug.h:34
static void coredump(int sig,...)
Drop a core dump and continue.
Callback1< const LibraryInfo & > InfoHandler
Callback1Rep< T1 > * CreateCallback(void(*function)(T1, T2), const T2 &fill_2)

◆ ATLAS_NOT_THREAD_SAFE() [2/9]

void DebugAids::setStackTraceAddr2Line Athena::ATLAS_NOT_THREAD_SAFE ( const char * path)

Definition at line 582 of file SealDebug.cxx.

583{
584 addr2LinePath = path;
585}

◆ ATLAS_NOT_THREAD_SAFE() [3/9]

void SharedLibrary::path Athena::ATLAS_NOT_THREAD_SAFE ( const std::string & path)

Definition at line 156 of file SealSharedLib.cxx.

157{
158 /* Do not free `var'; most implementations of `putenv' use the
159 string without copying it. On systems where `putenv' copies,
160 you'll see leaks from this routine. It would be possible to
161 check for this, but only by killing cross-compilation.
162
163 NB: `HAVE_COPYING_PUTENV' will never be set as we are not
164 checking for it :-) */
165
166 const char *pathvar = PATH;
167 if (pathvar) {
168 setenv(pathvar, path.c_str(),1);
169 }
170}
#define PATH
Definition SealCommon.h:161

◆ ATLAS_NOT_THREAD_SAFE() [4/9]

bool Signal::fatalDump Athena::ATLAS_NOT_THREAD_SAFE ( int sig,
siginfo_t * info,
void * extra,
IOFD fd,
unsigned options )

Definition at line 1515 of file SealSignal.cxx.

1518{
1519 const unsigned int buf_size = sizeof (buf);
1520 bool haveCore = false;
1521 if (sig < 0)
1522 {
1523 sig = -sig;
1524 haveCore = true;
1525 }
1526
1527 if (options & FATAL_DUMP_SIG)
1528 {
1529 MYWRITE (fd, "\n", 1);
1530 if (s_applicationName)
1531 {
1532 MYWRITE (fd, s_applicationName,
1533 STDC::strlen (s_applicationName));
1534 MYWRITE (fd, " ", 1);
1535 }
1536
1537 MYWRITE (fd, buf,
1538 snprintf (buf, SIGNAL_MESSAGE_BUFSIZE, "(pid=%ld ppid=%ld) received fatal signal %d"
1539 " (%.100s)%s\n",
1540 (long) ProcessInfo__pid (), (long) ProcessInfo__ppid (), // wlav :: -> __ (x2)
1541 sig, name (sig), haveCore ? " (core dumped)" : ""));
1542
1543 MYWRITE (fd, buf, snprintf(buf, buf_size, "signal context:\n"));
1544 dumpInfo (fd, buf, buf_size, sig, info);
1545 }
1546
1547 unsigned long sp = 0;
1548 if (options & FATAL_DUMP_CONTEXT)
1549 sp = dumpContext (fd, buf, buf_size, extra);
1550
1551 if (options & FATAL_DUMP_STACK)
1552 {
1553 MYWRITE (fd, buf, snprintf(buf, buf_size, "\nstack trace:\n"));
1554 if (s_lastSP) {
1555 MYWRITE (fd, buf, snprintf(buf, buf_size, "\n(backtrace failed; raw dump follows)\n"));
1556 MYWRITE (fd, buf, snprintf(buf, buf_size, "%016lx:", s_lastSP.load()));
1557 dumpMemory (fd, buf, buf_size, reinterpret_cast<void*>(s_lastSP.load()), 1024);
1558 MYWRITE (fd, buf, snprintf(buf, buf_size, "\n\n"));
1559 }
1560 else {
1561 s_lastSP = sp;
1562 DebugAids::stacktrace (fd);
1563 }
1564 s_lastSP = 0;
1565 }
1566
1567 if (options & FATAL_DUMP_LIBS)
1568 {
1569 MYWRITE (fd, buf, snprintf(buf, buf_size, "\nshared libraries present:\n"));
1570 try { SharedLibrary::loaded (*SignalDumpCallback); }
1571 catch (...) { ; }
1572 }
1573
1574 return true;
1575}
#define MYWRITE(fd, data, n)
Definition SealDebug.h:44
static void loaded(InfoHandler &handler)
Iterate and provide information about all currently loaded shared libraries.

◆ ATLAS_NOT_THREAD_SAFE() [5/9]

bool Signal::fatalDump Athena::ATLAS_NOT_THREAD_SAFE ( int sig,
siginfo_t * info,
void * x )

The quit signal handler.

The fatal signal handler.

This is the handler installed by #handleQuit(). Please use #handleQuit() and this method instead of installing your own handlers with #handle().

This handler first invokes the application hook if one was given to #handleQuit(). If the hook returns true, the signal handler for this signal (number sig) is reset to its default handler, and the signal is re-raised. This causes the program to exit via the signal and have a the correct exit status.

The application should do whatever is necessary for a graceful shutdown. Note however that this signal may arrive asynchronously at any time, hence it probably isn't safe to allocate memory, use the standard output streams, and so forth. What you can do is to set a flag, return false to return back to your application, detect the flag setting and drain your current event loop, and then quit. But do note that if #FATAL_AUTO_EXIT was set in call to #handleFatal(), #fatal() will call #quit() which in turn calls the application hook. Thus the hook should make sure it returns true if the application has crashed as noted in the documentation for <<QuitHook>>.

This is the handler installed by #handleFatal(). Please use #handleFatal() and this method instead of installing your handlers with #handle(). You should be able use the handler options to specify all the control you need.

The first thing this handler does is to reinstall itself for the benefit of platforms with single-delivery signals. Immediately after that it unblocks the delivery of that signal again, in case the signal handler itself gets in trouble. The next step is to check if the current crash level (the recursion of calls to #fatal(), see #fatalLevel()) exceeds the predefined limit of 4; if so, we give up and let the application die with this this signal. The handler then determines whether the signal is fatal: everything except SIGINT is, and SIGINT is fatal if #FATAL_ON_INT was set. If the signal is fatal, crash indicator is set (see #crashed()).

If this is not a nested fatal signal, the signal is fatal, and #FATAL_DUMP_CORE is set, the handler tries dump a core file. Then the handler will either attempt to quit or to return to the main program depending on #FATAL_AUTO_EXIT option setting. If it is set or this is a nested fatal signal, the handler will attempt to exit as follows: the application hook (or #fatalDump() in its absence) is invoked. If the hook returns true, #quit() is called; otherwise the signal handler will return (and crash or get an infinite sequence of fatal signals). Note that if an application hook is registered, #fataldump() is not called by default; the application hook must invoke it itself to get the dump.

If #FATAL_AUTO_EXIT is not set, the application must have registered a main return hook, which will be invoked. The hook must not return, but do a siglongjmp back to the main program (it should not throw unless all code is built with options that allow exceptions to be thrown from signal handlers). Note that the fatal signal may be asynchronous and may have arisen in code left in unsafe state, so returning back to the main program may not buy you much. It may make sense for a few things like rogue null pointer dereferences or floating point exceptions.

An interactive application using a main return hook should do something like this when the sigsetjmp in the main loop returns:

  • disable "main loop entered" status
  • inform the user about the fatal error (e.g. with a popup); the popup window should be precreated for best stability
  • reset any locks the application holds, especially for user interface, including status bars, wait icons etc.
  • suggest to run a debugger against the program right there
  • in a windowing system ungrab pointer, keyboard and the server
  • unblock the signal via #block(sig, false) as the operating system may think the signal is still being processed
  • add an idle processor to re-return the "main loop entered" once all pending event queue events have been drained
  • go onto processing gui events

Using a main return will most likely leak memory like a sieve, but in balance, the application just got a fatal signal and the leak is unlikely to be the greatest concern.

Definition at line 817 of file SealSignal.cxx.

818{
819 // Quit if no hook has been registered: we are coming in via
820 // FATAL_AUTO_EXIT in fatal and the application did not call
821 // handleQuit.
822 if (! s_quitHook || (*s_quitHook) (sig, info, x))
823 {
824 // Reactivate the default signal handling behaviour for this
825 // signal, which is to terminate the application one way or
826 // the other. Then exit through the signal. This makes the
827 // process exit status correct.
828 revert (sig);
829 raise (sig);
830 }
831}
#define x

◆ ATLAS_NOT_THREAD_SAFE() [6/9]

void DebugAids::stacktrace Athena::ATLAS_NOT_THREAD_SAFE ( IOFD fd)

Produce a stack trace.

Prints the current stack trace to file descriptor fd or if the default invalid descriptor, the currently registered stack trace descriptor as registered with #stacktraceFd(). Avoids unnecessary memory allocation so it should be safe to call this function even in dire situations. On some systems the implementation always outputs to the standard error and has no means for redirection. On these systems an attempt is made to redirect standard error momentarily elsewhere and then redirect standard error to the desired file descriptor, invoke the output, and redirect standard error back to its original location. If the redirection fails or the system has no stack tracing support, no stack trace is produced.

Definition at line 637 of file SealDebug.cxx.

638{
639 if (fd == IOFD_INVALID)
640 fd = stacktraceFd();
641
642 std::cerr.flush ();
643 fflush (stderr);
644
645#ifdef _WIN32
646 // FIXME: Autoload all these functions so users don't need to
647 // link in imagehlp.dll.
648 if (! SymInitialize (GetCurrentProcess (), NULL, TRUE))
649 {
650 MYWRITELIT (fd, ("failed to dump stack trace:"
651 " cannot get symbolic information\n"));
652 return;
653 }
654
655 union SYMBUFFER {
656 IMAGEHLP_SYMBOL sym;
657 BYTE buffer [ sizeof (IMAGEHLP_SYMBOL) + 512 ];
658 };
659
660 unsigned level = 0;
661 CONTEXT context;
662 STACKFRAME frame;
663 SYMBUFFER symbol;
664 IMAGEHLP_MODULE module;
665 char modulename [MAX_PATH];
666 DWORD section;
667 DWORD offset;
668 const int buf_size = 2*40+6; // ample for two 128+ bit numbers
669 char buf [buf_size];
670 // DWORD exceptargs [] = { (DWORD) &context };
671
672 // FIXME: XP 64-bit adds: RtlCaptureContext (&context);
673 // This is documented to *not* work, but apparently it does.
674 context.ContextFlags = CONTEXT_FULL;
675 if (! GetThreadContext (GetCurrentThread (), &context))
676 return;
677
678 // LPTOP_LEVEL_EXCEPTION_FILTER oldseh
679 // = SetUnhandledExceptionFilter (&GrabExceptionContext);
680 // RaiseException (0, 0, 1, exceptargs);
681 // SetUnhandledExceptionFilter (oldseh);
682
683 memset (&module, 0, sizeof (module));
684 memset (&frame, 0, sizeof (frame));
685
686 module.SizeOfStruct = sizeof (module);
687
688 frame.AddrPC.Offset = context.Eip;
689 frame.AddrPC.Mode = AddrModeFlat;
690 frame.AddrStack.Offset = context.Esp;
691 frame.AddrStack.Mode = AddrModeFlat;
692 frame.AddrFrame.Offset = context.Ebp;
693 frame.AddrFrame.Mode = AddrModeFlat;
694
695 while (true)
696 {
697 if (! StackWalk (IMAGE_FILE_MACHINE_I386,
698 GetCurrentProcess (),
699 GetCurrentThread (),
700 &frame,
701 &context,
702 NULL,
703 SymFunctionTableAccess,
704 SymGetModuleBase,
705 NULL)
706 || frame.AddrFrame.Offset == 0)
707 break;
708
709 // FIXME: Throw away everything above stacktrace? Keep looping
710 // below until the name includes something we understand?
711
712 // Print stack frame too? If we know how many arguments there
713 // are (from demangling function name -- see below, could count
714 // commas), args are: *((ULONG *)frame.AddrFrame.Offset+2+ARG).
715 MYWRITE (fd, buf, snprintf (buf, buf_size, "(%2u) 0x%08lx 0x%08lx ",
716 level, frame.AddrPC.Offset,
717 frame.AddrFrame.Offset));
718
719 memset (&symbol, 0, sizeof (symbol));
720 symbol.sym.SizeOfStruct = sizeof (symbol);
721 symbol.sym.MaxNameLength = sizeof (symbol) - sizeof (symbol.sym);
722
723 offset = 0;
724 if (SymGetSymFromAddr (GetCurrentProcess (), frame.AddrPC.Offset,
725 &offset, &symbol.sym))
726 {
727 // FIXME: Demangle name with:
728 // UnDecorateSymbolName (name, undecname, sizeof (undecname),
729 // UNDNAME_COMPLETE
730 // | UNDNAME_NO_THISTYPE
731 // | UNDNAME_NO_SPECIAL_SYMS
732 // | UNDNAME_NO_MEMBER_TYPE
733 // | UNDNAME_NO_MS_KEYWORDS
734 // | UNDNAME_NO_ACCESS_SPECIFIERS);
735 MYWRITE (fd, symbol.sym.Name, STDC::strlen (symbol.sym.Name));
736 MYWRITE (fd, buf, snprintf (buf, buf_size, " + %lx", offset));
737
738 if (SymGetModuleInfo (GetCurrentProcess(), frame.AddrPC.Offset,
739 &module))
740 {
741 MYWRITELIT (fd, " [");
742 MYWRITE (fd, module.ImageName,
743 STDC::strlen (module.ImageName));
744 MYWRITELIT (fd, "]");
745 }
746 }
747 else
748 {
749 GetLogicalAddress ((PVOID) frame.AddrPC.Offset,
750 modulename, sizeof (modulename),
751 section, offset);
752 MYWRITE (fd, buf, snprintf (buf, buf_size, "%04lx:%08lx [", section, offset));
753 MYWRITE (fd, modulename, STDC::strlen (modulename));
754 MYWRITELIT (fd, "]");
755 }
756 MYWRITELIT (fd, "\n");
757 ++level;
758 }
759 SymCleanup (GetCurrentProcess ());
760
761#elif (HAVE_U_STACK_TRACE || HAVE_XL_TRBK) // hp-ux, aix
762 // FIXME: deal with inability to duplicate the file handle
763 int stderrfd = dup (STDERR_FILENO);
764 if (stderrfd == -1)
765 return;
766
767 int newfd = dup2 (fd, STDERR_FILENO);
768 if (newfd == -1)
769 {
770 close (stderrfd);
771 return;
772 }
773
774# if HAVE_U_STACK_TRACE // hp-ux
775 U_STACK_TRACE ();
776# elif HAVE_XL_TRBK // aix
777 xl__trbk ();
778# else
779# error "oops, you shouldn't have gotten here!"
780# endif
781
782 fflush (stderr);
783 dup2 (stderrfd, STDERR_FILENO);
784 close (newfd);
785#elif HAVE_LINUX_UNWIND_BACKTRACE
786 CxxUtils::backtraceByUnwind (stacktraceLine, fd);
787
788#elif HAVE_BACKTRACE_SYMBOLS_FD && HAVE_DLADDR // linux
789 // we could have used backtrace_symbols_fd, except its output
790 // format is pretty bad, so recode that here :-(
791 void *trace [MAX_BACKTRACE_DEPTH];
792 int depth = backtrace (trace, MAX_BACKTRACE_DEPTH);
793
794 for (int n = 0; n < depth; ++n/*, nbufs = 0*/)
795 {
796 unsigned long addr = (unsigned long) trace [n];
797 stacktraceLine (fd, addr);
798 }
799
800#elif HAVE_EXCPT_H && HAVE_PDSC_H && HAVE_RLD_INTERFACE_H // tru64
801 // Tru64 stack walk. Uses the exception handling library and the
802 // run-time linker's core functions (loader(5)). FIXME: Tru64
803 // should have _RLD_DLADDR like IRIX below. Verify and update.
804
805 const int buffer_size = 100 + BitTraits<unsigned long>::HexDigits * 2 + 11;
806 char buffer [buffer_size];
807 sigcontext context;
808 int rc = 0;
809
810 exc_capture_context (&context);
811 while (!rc && context.sc_pc)
812 {
813 // FIXME: Elf32?
814 pdsc_crd *func, *base, *crd
815 = exc_remote_lookup_function_entry(0, 0, context.sc_pc, 0, &func, &base);
816 Elf32_Addr addr = PDSC_CRD_BEGIN_ADDRESS(base, func);
817 // const char *name = _rld_address_to_name(addr);
818 const char *name = "<unknown function>";
819 snprintf (buffer, buffer_size, " 0x%012lx %.100s + 0x%lx\n",
820 context.sc_pc, name, context.sc_pc - addr);
821 write (fd, buffer, STDC::strlen(buffer));
822 rc = exc_virtual_unwind(0, &context);
823 }
824
825#elif HAVE_EXCEPTION_H && defined __sgi // irix
826 // IRIX stack walk -- like Tru64 but with a little different names.
827 // NB: The guard above is to protect against unrelated <exception.h>
828 // provided by some compilers (e.g. KCC 4.0f).
829 // NB: libexc.h has trace_back_stack and trace_back_stack_and_print
830 // but their output isn't pretty and nowhere as complete as ours.
831 char buffer [340];
832 sigcontext context;
833
834 exc_setjmp (&context);
835 while (context.sc_pc >= 4)
836 {
837 // Do two lookups, one using exception handling tables and
838 // another using _RLD_DLADDR, and use the one with a smaller
839 // offset. For signal handlers we seem to get things wrong:
840 // _sigtramp's exception range is huge while based on Dl_info
841 // the offset is small -- but both supposedly describe the
842 // same thing. Go figure.
843 char *name = 0;
844 const char *libname = 0;
845 const char *symname = 0;
846 Elf32_Addr offset = ~0L;
847
848 // Do the exception/dwarf lookup
849 Elf32_Addr pc = context.sc_pc;
850 Dwarf_Fde fde = find_fde_name (&pc, &name);
851 Dwarf_Addr low_pc = context.sc_pc;
852 Dwarf_Unsigned udummy;
853 Dwarf_Signed sdummy;
854 Dwarf_Ptr pdummy;
855 Dwarf_Off odummy;
856 Dwarf_Error err;
857
858 symname = name;
859
860 // Determine offset using exception descriptor range information.
861 if (dwarf_get_fde_range (fde, &low_pc, &udummy, &pdummy, &udummy,
862 &odummy, &sdummy, &odummy, &err) == DW_DLV_OK)
863 offset = context.sc_pc - low_pc;
864
865 // Now do a dladdr() lookup. If the found symbol has the same
866 // address, trust the more accurate offset from dladdr();
867 // ignore the looked up mangled symbol name and prefer the
868 // demangled name produced by find_fde_name(). If we find a
869 // smaller offset, trust the dynamic symbol as well. Always
870 // trust the library name even if we can't match it with an
871 // exact symbol.
872 Elf32_Addr addr = context.sc_pc;
873 Dl_info info;
874
875 if (_rld_new_interface (_RLD_DLADDR, addr, &info))
876 {
877 if (info.dli_fname && info.dli_fname [0])
878 libname = info.dli_fname;
879
880 Elf32_Addr symaddr = (Elf32_Addr) info.dli_saddr;
881 if (symaddr == low_pc)
882 offset = addr - symaddr;
883 else if (info.dli_sname
884 && info.dli_sname [0]
885 && addr - symaddr < offset)
886 {
887 offset = addr - symaddr;
888 symname = info.dli_sname;
889 }
890 }
891
892 // Print out the result
893 if (libname && symname)
894 write (fd, buffer, snprintf
895 (buffer, buffer_size, " 0x%012lx %.100s + 0x%lx [%.200s]\n",
896 addr, symname, offset, libname));
897 else if (symname)
898 write (fd, buffer, snprintf
899 (buffer, buffer_size, " 0x%012lx %.100s + 0x%lx\n",
900 addr, symname, offset));
901 else
902 write (fd, buffer, snprintf
903 (buffer, buffer_size, " 0x%012lx <unknown function>\n", addr));
904
905 // Free name from find_fde_name().
906 free (name);
907
908 // Check for termination. exc_unwind() sets context.sc_pc to
909 // 0 or an error (< 4). However it seems we can't unwind
910 // through signal stack frames though this is not mentioned in
911 // the docs; it seems that for those we need to check for
912 // changed pc after find_fde_name(). That seems to indicate
913 // end of the post-signal stack frame. (FIXME: Figure out how
914 // to unwind through signal stack frame, e.g. perhaps using
915 // sigcontext_t's old pc? Or perhaps we can keep on going
916 // down without doing the symbol lookup?)
917 if (pc != context.sc_pc)
918 break;
919
920 exc_unwind (&context, fde);
921 }
922
923#elif defined PROG_PSTACK // solaris
924# ifdef PROG_CXXFILT
925# define CXXFILTER " | " PROG_CXXFILT
926# else
927# define CXXFILTER
928# endif
929 // 64 should more than plenty for a space and a pid.
930 const int buffer_size = sizeof(PROG_PSTACK) + 1 + BitTraits<unsigned long>::Digits
931 + 3 + sizeof(PROG_CXXFILT) + BitTraits<int>::Digits + 1;
932 char buffer [buffer_size];
933 snprintf (buffer, buffer_size, "%s %lu%s 1>&%d", PROG_PSTACK, (unsigned long) getpid (),
934 "" CXXFILTER, fd);
935 system (buffer);
936# undef CXXFILTER
937
938#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
939 // FIXME: Check for _Unwind*, compilers other than GCC support this API
940 _Unwind_Backtrace (unwindWalkStack, &fd);
941#endif
942
943 // FIXME: mpatrol has some generic unix unwind code.
944 // FIXME: from unix faq: ask debugger to dump stack trace
945 // with something like:
946 // - gdb: echo "thread apply all where\nwhere\ndetach" | gdb $prog $pid
947 // - dbx: echo "where\ndetach" | dbx -a $program_path $pid
948 // - dbx (aix): echo "where\ndetach" | dbx -p $program_path $pid
949}
void section(const std::string &sec)
#define MYWRITELIT(fd, str)
Definition exctrace.cxx:35
std::string depth
tag string for intendation
Definition fastadd.cxx:46
std::string base
Definition hcg.cxx:81
list backtrace
Definition check_log.py:58

◆ ATLAS_NOT_THREAD_SAFE() [7/9]

void DebugAids::stacktraceLine Athena::ATLAS_NOT_THREAD_SAFE ( IOFD fd,
unsigned long addr )

Write out stack trace line to FD.

IP is the instruction pointer. (sss)

Definition at line 332 of file SealDebug.cxx.

334{
335 iovec bufs [7];
336 int nbufs = 0;
337 const int addrbuf_size = 5 + BitTraits<unsigned long>::HexDigits;
338 char addrbuf [addrbuf_size];
339
340#if HAVE_BACKTRACE_SYMBOLS_FD && HAVE_DLADDR
341 const int diffbuf_size = 15 + BitTraits<unsigned long>::HexDigits;
342 char diffbuf [diffbuf_size];
343 static const char trailer [] = "]\n";
344 Dl_info info;
345
346 char dembuf[ LINE_MAX ];
347 char line[ LINE_MAX ];
348 const int relbuf_size = 7 + BitTraits<unsigned long>::HexDigits;
349 char relbuf [relbuf_size];
350
351 if (dladdr ((void*)addr, &info) && info.dli_fname && info.dli_fname[0])
352 {
353 const char *libname = info.dli_fname;
354
355 unsigned long symaddr = (unsigned long) info.dli_saddr;
356 bool gte = (addr >= symaddr);
357 unsigned long diff = (gte ? addr - symaddr : symaddr - addr);
358
359 // RS start
360 int length = 0;
361
362 // difference of two pointers
363 unsigned long libaddr = (unsigned long) info.dli_fbase;
364 unsigned long relative_address = (addr >= libaddr) ? addr - libaddr : libaddr - addr;
365 // ELF executables are usually not relocatable, and on 64-bit platforms
366 // are usually loaded starting at 0x400000. In that case, we should _not_
367 // subtract the base address. But clang15 by default appears to produce
368 // position-independent executables (PIE) by default. In that case,
369 // we do need to subtract the offset.
370 // I'm not sure how to reliably tell the difference short of parsing
371 // the object headers. For now, just assume that something
372 // that doesn't have .so in the name and is loaded at 0x400000
373 // is not relocatable. This is not really portable, though.
374 if (strstr (info.dli_fname, ".so") == 0 && libaddr == 0x400000)
375 relative_address = addr;
376
377 // need popen for addr2line ...
378 int pfd;
379 pid_t child_pid;
380 const char* symname = dembuf;
381 size_t demlen = 0;
382
383 // did we find valid entry ?
384 size_t len = strlen(info.dli_fname);
385 if ( len > 0 && len + 80 < LINE_MAX)
386 {
387 if (getenv ("LD_PRELOAD"))
388 unsetenv ("LD_PRELOAD");
389
390 if ( addr2LinePath == "/usr/bin/eu-addr2line" )
391 {
392 snprintf (line, LINE_MAX, "%s -f -e %s %p | /usr/bin/c++filt | /usr/bin/tr \\\\012 \\\\040 ",
393 addr2LinePath.c_str(),
394 info.dli_fname,
395 (void*)relative_address);
396 }
397 else
398 {
399 snprintf (line, LINE_MAX, "%s -f -C -e %s %p",
400 addr2LinePath.c_str(),
401 info.dli_fname,
402 (void*)relative_address);
403 }
404
405 pfd = stacktracePopenFD( line, child_pid );
406
407 length = 1;
408 line[0] = ' ';
409
410 // did we succeed to open the pipe?
411 if ( pfd >= 0 )
412 {
413 demlen = stacktraceReadline (pfd, dembuf, sizeof(dembuf));
414
415 length = stacktraceReadline (pfd, line+1, sizeof(line)-1);
416 if (length >= 0) ++length;
417
418 int stat = stacktracePcloseFD (pfd, child_pid);
419
420 // don't print anything, if nothing is found
421 if ( stat || line[1] == '?' || length < 0)
422 {
423 line[1] = '\0';
424 length = 0;
425 }
426
427 if ( stat || demlen <= 0 || dembuf[0] == '?') {
428 symname = info.dli_sname;
429 if (!symname) symname = "???";
430 demlen = strlen (symname);
431 }
432
433 }
434 }
435 // RS end
436
437 bufs [nbufs].iov_base = addrbuf;
438 bufs [nbufs].iov_len = snprintf (addrbuf, addrbuf_size, " 0x%08lx ", addr);
439 ++nbufs;
440
441 bufs [nbufs].iov_base = (void *) symname; // discard const
442 bufs [nbufs].iov_len = demlen;
443 ++nbufs;
444
445 // RS start
446 bufs [nbufs].iov_base = line;
447 bufs [nbufs].iov_len = length;
448 ++nbufs;
449 // RS end
450
451 bufs [nbufs].iov_base = diffbuf;
452 bufs [nbufs].iov_len = snprintf (diffbuf, diffbuf_size, " %c 0x%lx [",
453 gte ? '+' : '-', diff);
454 ++nbufs;
455
456 bufs [nbufs].iov_base = (void *) libname; // discard const
457 bufs [nbufs].iov_len = strlen (libname);
458 ++nbufs;
459
460 // RS start
461 bufs [nbufs].iov_base = relbuf;
462 bufs [nbufs].iov_len = snprintf( relbuf, relbuf_size, " D[%p]", (void*)relative_address );
463 ++nbufs;
464 // RS end
465
466 bufs [nbufs].iov_base = (void *) trailer; // discard const
467 bufs [nbufs].iov_len = 2;
468 ++nbufs;
469
470 }
471 else
472#endif
473 {
474 bufs [nbufs].iov_base = addrbuf;
475 bufs [nbufs].iov_len = snprintf (addrbuf, addrbuf_size, " 0x%08lx ", addr);
476 ++nbufs;
477
478 bufs [nbufs].iov_base = (void *) "<unknown function>\n"; //no const
479 bufs [nbufs].iov_len = 19;
480 ++nbufs;
481 }
482
483 writev (fd, bufs, nbufs);
484}
double length(const pvec &v)
int32_t pid_t
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition Jet.cxx:631

◆ ATLAS_NOT_THREAD_SAFE() [8/9]

void Signal::handleQuit Athena::ATLAS_NOT_THREAD_SAFE ( QuitHook hook)

Definition at line 581 of file SealSignal.cxx.

582{
583 static int hups [] = {
584#ifdef SIGHUP
585 // hang up (lost terminal or process group leader)
586 SIGHUP,
587#endif
588#ifdef SIGTERM
589 // terminate (e.g. system going down)
590 SIGTERM,
591#endif
592#ifdef SIGQUIT
593 // user request to quit and leave debuggable state (from quit
594 // key on controlling terminal)
595 SIGQUIT,
596#endif
597 -1
598 };
599
600 if (hook)
601 s_quitHook = hook;
602
603 for (unsigned sig = 0; hups [sig] != -1; ++sig)
604 handle (hups [sig], quit);
605}

◆ ATLAS_NOT_THREAD_SAFE() [9/9]

bool Signal::crashed Athena::ATLAS_NOT_THREAD_SAFE ( void )

Return the file descriptor #fataldump() uses for output.

Return the crash status indicator: true if a fatal signal has been received since the program started.

Return the depth to which #fatal() is currently recursively entered, or zero if #fatal() is not currently active.

Return the current application quit signal hook.

Return the current fatal signal handling options.

Return the application fatal signal return hook.

Return the application fatal signal hook.

Registered through #handleFatal().

Registered through #handleFatal().

See also
#fatal()

Registered through #handleFatal().

See also
#fatal().

Set on invocation to #handleFatal().

Registered through #handleQuit().

Use this method in application fatal hook to decide which operations are safe to perform. For example, if the attempts to notify the user result in further signals, it is best to avoid such attempts at deeper recursion levels. Currently #fatal() ceases to call the application's hooks and forces termination if the nesting level reaches 4.

Set if #fatal() is entered with a fatal signal.

Definition at line 103 of file ROOTMessageFilterSvc.cxx.

103 {
104
105 // Print the received configuration.
106 ATH_MSG_DEBUG("Using: " << m_suppressionRules);
107
108 // Extend the global list of suppression rules with the ones configured on
109 // this service.
110 for (const auto& rule : m_suppressionRules.value()) {
111 s_data.m_suppressionRules.insert({
112 std::regex{std::get<0>(rule)}, // locationPattern
113 std::regex{std::get<1>(rule)}, // messagePattern
114 std::get<2>(rule), // severity
115 std::hash<std::string>{}(std::get<0>(rule) + std::get<1>(rule) +
116 std::to_string(std::get<2>(rule))) // hash
117 });
118 }
119
120 // Set up our own error handler, while remembering the original one. But only
121 // if we have not set it up already.
122 if (!s_data.m_errorHandler) {
123 s_data.m_errorHandler = ::SetErrorHandler(::errorHandler);
124 }
125
126 // Return gracefully.
127 return StatusCode::SUCCESS;
128}
#define ATH_MSG_DEBUG(x)

◆ CreateCallback()

template<class T1, class T2>
Callback1Rep< T1 > * Athena::CreateCallback ( void(* function )(T1, T2),
const T2 & fill_2 )
inline

Definition at line 136 of file SealSharedLib.h.

138{ return new CallbackImpF11<T1,T2> (function, fill_2); }

◆ getMessageSvc() [1/2]

IMessageSvc * Athena::getMessageSvc ( bool quiet = false)

Definition at line 20 of file getMessageSvc.cxx.

20{ return getMessageSvc( Options::Lazy, quiet ); }
IMessageSvc * getMessageSvc(bool quiet=false)

◆ getMessageSvc() [2/2]

IMessageSvc * Athena::getMessageSvc ( const Options::CreateOptions o,
bool quiet = false )

Definition at line 21 of file getMessageSvc.cxx.

21 {
22
23 // We cache the MessageSvc, but only once it has been found. This ensures that an
24 // early call to this method (before MessageSvc is available) does not prevent
25 // from finding it in subsequent calls. The limited use of ServiceHandle for this
26 // purpose should be thread-safe:
27 static ServiceHandle<IMessageSvc> msgSvc ATLAS_THREAD_SAFE ("MessageSvc", "getMessageSvc");
28
29 IMessageSvc* svc = nullptr;
30 try {
31 svc = msgSvc.get();
32 if (svc) {
33 svc->addRef(); // even if cached, maintain correct ref-count
34 return svc;
35 }
36
37 const bool warn = !(quiet || Athena::getMessageSvcQuiet);
38 if ( ((opt==Athena::Options::Lazy && !Gaudi::svcLocator()->existsService("MessageSvc")) ||
39 msgSvc.retrieve().isFailure()) && warn ) {
40 std::cerr << "Athena::getMessageSvc: WARNING MessageSvc not found, will use std::cout" << std::endl;
41 }
42 svc = msgSvc.get();
43 }
44 catch (const GaudiException& e)
45 {
46 std::cerr << "Athena::getMessageSvc: WARNING Got Gaudi exception " << e
47 << "; will use std::out" << std::endl;
48 return nullptr;
49 }
50
51
52 return svc;
53}
#define ATLAS_THREAD_SAFE
std::atomic< bool > getMessageSvcQuiet
Set this to force off the warning messages from getMessageSvc (in unit tests, for example).
AthROOTErrorHandlerSvc * svc
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ outputLevel()

int Athena::outputLevel ( const IMessageSvc * ims,
const std::string & source )

Definition at line 60 of file getMessageSvc.cxx.

60 {
61 if (ims) return ims->outputLevel(source);
62 else return MSG::INFO;
63}

◆ reportMessage()

void Athena::reportMessage ( IMessageSvc * ims,
const std::string & source,
int type,
const std::string & message )

Wrappers for some of the IMessageSvc methods These can be used from libraries without explicit Gaudi dependency via weak linking.

(see e.g. TrigConf::MsgStream in TrigConfBase)

DO NOT MODIFY THE SIGNATURE OF THESE METHODS WITHOUT UPDATING THE TRIGCONF SIDE !!!

Definition at line 56 of file getMessageSvc.cxx.

56 {
57 if (ims) ims->reportMessage(source, type, message);
58}

◆ setOutputLevel()

void Athena::setOutputLevel ( IMessageSvc * ims,
const std::string & source,
int level )

Definition at line 65 of file getMessageSvc.cxx.

65 {
66 if(ims) ims->setOutputLevel(source, level);
67}

◆ typeinfoName()

std::string Athena::typeinfoName ( const std::type_info & ti)

Convert a type_info to a demangled string.

Parameters
tiThe type_info to convert.

A wrapper around System::typeinfoName. Moved out-of-line so that this header does not need to depend on System.h.

Definition at line 23 of file AthenaKernel/src/ClassName.cxx.

24{
25 return System::typeinfoName (ti);
26}

◆ ubsan_boost_suppress()

int Athena::ubsan_boost_suppress ( )

Definition at line 21 of file ubsan_boost_suppress.cxx.

22{
23 // See <https://svn.boost.org/trac/boost/ticket/11632>
24 CxxUtils::ubsan_suppress ([]() { boost::format("%1%") % "asd"; });
25 return 0;
26}
void ubsan_suppress(void(*func)())
Helper for suppressing ubsan warnings.

Variable Documentation

◆ getMessageSvcQuiet

std::atomic< bool > Athena::getMessageSvcQuiet
extern

Set this to force off the warning messages from getMessageSvc (in unit tests, for example).

Definition at line 18 of file getMessageSvc.cxx.

◆ ubsan_boost_suppress_

int Athena::ubsan_boost_suppress_ = ubsan_boost_suppress()

Definition at line 29 of file ubsan_boost_suppress.cxx.