2 #include "GaudiKernel/MsgStream.h"
3 #include "GaudiKernel/IMessageSvc.h"
4 #include "GaudiKernel/GaudiException.h"
9 :
Auditor(name, pSvcLocator), m_error(0), m_fatal(0) {
11 declareProperty(
"Abort", m_abort =
false,
12 "Abort job upon illegal Algorithm return code");
13 declareProperty(
"Throw", m_throw =
false,
14 "Throw GaudiException upon illegal Algorithm return code");
28 log <<
MSG::INFO <<
"Both \"Throw\" and \"Abort\" options have been set."
29 <<
" Abort takes precedence." <<
endmsg;
41 std::ostringstream os;
42 os <<
"Illegal Return Code: Algorithm " << alg->
name()
43 <<
" reported an ERROR, but returned a StatusCode \"" << sc <<
"\"";
44 os << std::endl <<
"Error policy described in "
45 <<
"https://twiki.cern.ch/twiki/bin/view/AtlasComputing/ReportingErrors";
59 std::ostringstream os;
60 os <<
"Illegal Return Code: Algorithm " << alg->
name()
61 <<
" reported a FATAL, but returned a StatusCode \"" << sc <<
"\"";
62 os << std::endl <<
"Error policy described in "
63 <<
"https://twiki.cern.ch/twiki/bin/view/AtlasComputing/ReportingErrors";
89 <<
" instances where an Algorithm::execute() produced an ERROR "
90 <<
"but returned a SUCCESS:" << std::endl;
93 log <<
i.first <<
": " <<
i.second << std::endl;
102 <<
" instances where an Algorithm::execute() produced a FATAL "
103 <<
"but returned a SUCCESS:" << std::endl;
106 log <<
i.first <<
": " <<
i.second << std::endl;
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
std::map< std::string, int > m_algMap[2]
Monitors the cpu time usage of each algorithm.
virtual void beforeExecute(INamedInterface *alg)
virtual StatusCode finalize()
virtual const std::string & name() const =0
Retrieve the name of the instance.
void incrMap(const std::string &algName, int level)
auto end(reverse_wrapper< T > &w)
This class is used for returning status codes from appropriate routines.
virtual int messageCount(MSG::Level level) const =0
Get the number of messages issued at a particular level.
#define DECLARE_COMPONENT(type)
bool isRecoverable() const
IInterface compliant class extending IInterface with the name() method.
virtual void afterExecute(INamedInterface *alg, const StatusCode &)
virtual StatusCode initialize()
const std::string & name() const override
Base class from which all concrete auditor classes should be derived.