//------------------------------------------------------------------------------ StatusCode StopperAlg::execute() { //------------------------------------------------------------------------------ MsgStream log( msgSvc(), name() ); static int count = 0; if ( ++count >= m_stopcount ) { log << MSG::INFO << "scheduling a event processing stop...." << endmsg; IEventProcessor* evt = svc<IEventProcessor>("ApplicationMgr"); if (evt->stopRun().isFailure()) { log << MSG::ERROR << "unable to issue a stopRun to the EventProcessor" << endmsg; return StatusCode::FAILURE; } evt->release(); } return StatusCode::SUCCESS; }