ATLAS Offline Software
|
Some weak symbol referencing magic... More...
Namespaces | |
AlgorithmTimerHandler | |
detail | |
details | |
DsoUtils | |
Options | |
Units | |
Classes | |
class | AlgorithmTimer |
Timer that invokes a user callback once the time is reached. More... | |
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 . This class defines a (type-safe) protocol to pack and unpack thinned 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... | |
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... | |
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 |
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 |
class | RootNtupleEventContext |
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 | ScopedTimer |
Helper class to create a "scoped cook timer" without having to declare the CookTimer itself within the scope (see CookTimer documentation) 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 |
class | xAODCnv |
class | xAODCnvSvc |
class | xAODEventContext |
class | xAODEventSelector |
Class implementing the GAUDI IEvtSelector interface using ROOT TTree as a backend. More... | |
Typedefs | |
typedef void(* | DummyHandlerType) (int) |
Dummy handler type for standard signal() function. More... | |
typedef RootNtupleEventContext::FileNames_t | FileNames_t |
Enumerations | |
enum | Status : StatusCode::code_t { Status::TIMEOUT = 10, Status::MISSING_DATA = 11 } |
Athena specific StatusCode values. More... | |
Functions | |
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. More... | |
int | outputLevel (const IMessageSvc *ims, const std::string &source) |
void | setOutputLevel (IMessageSvc *ims, const std::string &source, int level) |
int | ubsan_boost_suppress () |
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. More... | |
void DebugAids::setStackTraceAddr2Line | ATLAS_NOT_THREAD_SAFE (const char *path) |
void DebugAids::stacktrace | ATLAS_NOT_THREAD_SAFE (IOFD fd) |
Produce a stack trace. More... | |
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. More... | |
void Signal::quit | ATLAS_NOT_THREAD_SAFE (int sig, siginfo_t *info, void *x) |
The quit signal handler. More... | |
bool Signal::fatalDump | ATLAS_NOT_THREAD_SAFE (int sig, siginfo_t *info, void *extra, IOFD fd, unsigned options) |
IOFD Signal::handleFatalFd | ATLAS_NOT_THREAD_SAFE (void) |
Return the file descriptor #fataldump() uses for output. More... | |
Variables | |
std::atomic< bool > | getMessageSvcQuiet |
Set this to force off the warning messages from getMessageSvc (in unit tests, for example). More... | |
int | ubsan_boost_suppress_ = ubsan_boost_suppress() |
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 void(* Athena::DummyHandlerType) (int) |
Definition at line 213 of file RootNtupleEventSelector.cxx.
|
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.
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.
void DebugAids::setStackTraceAddr2Line Athena::ATLAS_NOT_THREAD_SAFE | ( | const char * | path | ) |
Definition at line 579 of file SealDebug.cxx.
void SharedLibrary::path Athena::ATLAS_NOT_THREAD_SAFE | ( | const std::string & | path | ) |
Definition at line 164 of file SealSharedLib.cxx.
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.
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:
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.
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 634 of file SealDebug.cxx.
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 328 of file SealDebug.cxx.
void Signal::handleQuit Athena::ATLAS_NOT_THREAD_SAFE | ( | QuitHook | hook | ) |
Definition at line 581 of file SealSignal.cxx.
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().
Registered through #handleFatal().
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 1580 of file SealSignal.cxx.
|
inline |
Definition at line 136 of file SealSharedLib.h.
IMessageSvc * Athena::getMessageSvc | ( | bool | quiet = false | ) |
Definition at line 20 of file getMessageSvc.cxx.
IMessageSvc * Athena::getMessageSvc | ( | const Options::CreateOptions | o, |
bool | quiet = false |
||
) |
Definition at line 21 of file getMessageSvc.cxx.
Definition at line 47 of file getMessageSvc.cxx.
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 43 of file getMessageSvc.cxx.
void Athena::setOutputLevel | ( | IMessageSvc * | ims, |
const std::string & | source, | ||
int | level | ||
) |
Definition at line 52 of file getMessageSvc.cxx.
int Athena::ubsan_boost_suppress | ( | ) |
Definition at line 21 of file ubsan_boost_suppress.cxx.
std::atomic< bool > Athena::getMessageSvcQuiet |
Set this to force off the warning messages from getMessageSvc (in unit tests, for example).
Definition at line 18 of file getMessageSvc.cxx.
int Athena::ubsan_boost_suppress_ = ubsan_boost_suppress() |
Definition at line 29 of file ubsan_boost_suppress.cxx.