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

AthROOTErrorHandlerSvc: Replaces ROOT's standard error handler in order to detect Problematic ROOT issues such as stale file handles and read failures. More...

Functions

void ErrorHandler ATLAS_NOT_THREAD_SAFE (Int_t level, Bool_t abort, const char *location, const char *message)

Variables

AthROOTErrorHandlerSvcsvc
ErrorHandlerFunc_t oldHandler

Detailed Description

AthROOTErrorHandlerSvc: Replaces ROOT's standard error handler in order to detect Problematic ROOT issues such as stale file handles and read failures.

Author: Will Buttinger

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void ErrorHandler Handler::ATLAS_NOT_THREAD_SAFE ( Int_t level,
Bool_t abort,
const char * location,
const char * message )

Definition at line 13 of file AthROOTErrorHandlerSvc.cxx.

13 {
14 if (svc) { // should always be set by now
15 if(svc->m_catchLevel <= level) {
16 std::ostringstream oss;
17 oss << "AthROOTErrorHandlerSvc detected ROOT message >= CatchLevel "
18 << svc->m_catchLevel << " (" << level << "): " << location << " : " << message;
19 throw std::runtime_error(oss.str());
20 }
21 const auto itr = svc->m_throwSources.find(location);
22 if(itr!=svc->m_throwSources.end() && itr->second <= level) {
23 std::ostringstream oss;
24 oss << "AthROOTErrorHandlerSvc detected ROOT message from Throw Sources : "
25 << location << " (level=" << level << ") : " << message;
26 throw std::runtime_error(oss.str());
27 }
28 }
29 //now pass on to old handler
30 if(oldHandler) oldHandler( level, abort, location, message );
31 }
Gaudi::Property< std::map< std::string, int > > m_throwSources
AthROOTErrorHandlerSvc * svc
ErrorHandlerFunc_t oldHandler

Variable Documentation

◆ oldHandler

ErrorHandlerFunc_t Handler::oldHandler

Definition at line 11 of file AthROOTErrorHandlerSvc.cxx.

◆ svc

AthROOTErrorHandlerSvc* Handler::svc

Definition at line 10 of file AthROOTErrorHandlerSvc.cxx.