Commit dd5e716e authored by Marco Clemencic's avatar Marco Clemencic

Merge branch 'protect_msgs' into 'master'

Protect messages in event loop

See merge request !1100
parents a6f0ec87 6980b97d
Pipeline #1779914 passed with stages
in 31 minutes and 57 seconds
...@@ -47,8 +47,10 @@ StatusCode IncidentProcAlg::execute() { ...@@ -47,8 +47,10 @@ StatusCode IncidentProcAlg::execute() {
const EventContext& context = Gaudi::Hive::currentContext(); const EventContext& context = Gaudi::Hive::currentContext();
auto incPack = m_incSvc->getIncidents( &context ); auto incPack = m_incSvc->getIncidents( &context );
MsgStream log( msgSvc(), name() ); MsgStream log( msgSvc(), name() );
if ( msgLevel( MSG::DEBUG ) ) {
log << MSG::DEBUG << " Number of Incidents to process = " << incPack.incidents.size() log << MSG::DEBUG << " Number of Incidents to process = " << incPack.incidents.size()
<< " Context= " << Gaudi::Hive::currentContext() << endmsg; << " Context= " << Gaudi::Hive::currentContext() << endmsg;
}
while ( incPack.incidents.size() ) { while ( incPack.incidents.size() ) {
if ( incPack.incidents.size() != incPack.listeners.size() ) { if ( incPack.incidents.size() != incPack.listeners.size() ) {
log << MSG::WARNING << " Size of fired incidents and listeners do not match!" << endmsg; log << MSG::WARNING << " Size of fired incidents and listeners do not match!" << endmsg;
...@@ -57,7 +59,10 @@ StatusCode IncidentProcAlg::execute() { ...@@ -57,7 +59,10 @@ StatusCode IncidentProcAlg::execute() {
auto& inc = incPack.incidents.at( t ); auto& inc = incPack.incidents.at( t );
auto& lis = incPack.listeners.at( t ); auto& lis = incPack.listeners.at( t );
for ( auto& l : lis ) { for ( auto& l : lis ) {
log << MSG::DEBUG << "Calling '" << getListenerName( l ) << "' for incident [" << inc->type() << "]" << endmsg; if ( msgLevel( MSG::DEBUG ) ) {
log << MSG::DEBUG << "Calling '" << getListenerName( l ) << "' for incident [" << inc->type() << "]"
<< endmsg;
}
// handle exceptions if they occur // handle exceptions if they occur
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment