8 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) ) 9 #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) ) 11 #define DEBMSG ON_DEBUG debug() 12 #define VERMSG ON_VERBOSE verbose() 20 return iNamed ? iNamed->
name() : s_unknown;
40 log <<
MSG::DEBUG <<
" Number of Incidents to process = " << incPack.incidents.size()
42 while ( incPack.incidents.size() ) {
43 if ( incPack.incidents.size() != incPack.listeners.size() ) {
46 for (
size_t t = 0; t < incPack.incidents.size(); t++ ) {
47 auto& inc = incPack.incidents.at( t );
48 auto& lis = incPack.listeners.at( t );
49 for (
auto&
l : lis ) {
50 log <<
MSG::DEBUG <<
"Calling '" << getListenerName(
l ) <<
"' for incident [" << inc->type() <<
"]" <<
endmsg;
56 error() <<
"Exception with tag=" << exc.
tag()
62 error() <<
"Standard std::exception is caught" 66 }
catch ( ... ) {
error() <<
"UNKNOWN Exception is caught handling incident" << inc->type() <<
endmsg; }
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...
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual IIncidentSvc::IncidentPack getIncidents(const EventContext *ctx)=0
virtual const std::string & tag() const
name tag for the exception, or exception type
constexpr static const auto SUCCESS
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
This class represents an entry point to all the event specific data.
StatusCode initialize() override
StatusCode finalize() override
virtual const std::string & name() const =0
Retrieve the name of the instance.
#define DECLARE_COMPONENT(type)
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
The interface implemented by any class wanting to listen to Incidents.
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
This class is used for returning status codes from appropriate routines.
IncidentProcAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor(s)
SmartIF< IIncidentSvc > m_incSvc
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
GAUDI_API const EventContext & currentContext()
StatusCode execute() override
Alias for backward compatibility.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
const std::string & name() const override
The identifying name of the algorithm object.