MinimalEventLoopMgr.cpp
Go to the documentation of this file.
1 #define GAUDIKERNEL_MINIMALEVENTLOOPMGR_CPP
2 
3 #include "GaudiKernel/SmartIF.h"
4 #include "GaudiKernel/MsgStream.h"
5 #include "GaudiKernel/IAlgorithm.h"
6 #include "GaudiKernel/IAlgManager.h"
7 #include "GaudiKernel/TypeNameString.h"
8 #include "GaudiKernel/GaudiException.h"
9 #include "GaudiKernel/ThreadGaudi.h"
10 #include "GaudiKernel/Incident.h"
11 #include "GaudiKernel/IIncidentListener.h"
12 #include "GaudiKernel/IIncidentSvc.h"
13 #include "GaudiKernel/AppReturnCode.h"
14 
15 #include "GaudiKernel/MinimalEventLoopMgr.h"
16 
17 #include <algorithm>
18 
19 namespace {
20  class AbortEventListener: public implements1<IIncidentListener> {
21  public:
22  AbortEventListener(bool &flag, std::string &source):m_flag(flag),
23  m_source(source){
24  addRef(); // Initial count set to 1
25  }
26  ~AbortEventListener() override = default;
28  void handle(const Incident& i) override {
29  if (i.type() == IncidentType::AbortEvent) {
30  m_flag = true;
31  m_source = i.source();
32  }
33  }
34 
35  private:
37  bool &m_flag;
39  std::string &m_source;
40  };
41 }
42 
43 #define ON_DEBUG if (UNLIKELY(outputLevel() <= MSG::DEBUG))
44 #define ON_VERBOSE if (UNLIKELY(outputLevel() <= MSG::VERBOSE))
45 
46 #define DEBMSG ON_DEBUG debug()
47 #define VERMSG ON_VERBOSE verbose()
48 
49 //--------------------------------------------------------------------------------------------
50 // Standard Constructor
51 //--------------------------------------------------------------------------------------------
52 MinimalEventLoopMgr::MinimalEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc)
53  : base_class(nam, svcLoc), m_appMgrUI(svcLoc)
54 {
55  declareProperty("TopAlg", m_topAlgNames );
56  declareProperty("OutStream", m_outStreamNames );
57  declareProperty("OutStreamType", m_outStreamType = "OutputStream");
60 }
61 
62 //--------------------------------------------------------------------------------------------
63 // implementation of IAppMgrUI::initialize
64 //--------------------------------------------------------------------------------------------
66 
67  if ( !m_appMgrUI ) return StatusCode::FAILURE;
68 
70  if ( !sc.isSuccess() ) {
71  error() << "Failed to initialize Service Base class." << endmsg;
72  return StatusCode::FAILURE;
73  }
74 
75  auto prpMgr = serviceLocator()->as<IProperty>();
76  if ( !prpMgr ) {
77  error() << "Error retrieving AppMgr interface IProperty." << endmsg;
78  return StatusCode::FAILURE;
79  }
80  if ( m_topAlgNames.value().empty() ) {
81  setProperty(prpMgr->getProperty("TopAlg")).ignore();
82  }
83  if ( m_outStreamNames.value().empty() ) {
84  setProperty(prpMgr->getProperty("OutStream")).ignore();
85  }
86 
87  // Get the references to the services that are needed by the ApplicationMgr itself
88  m_incidentSvc = serviceLocator()->service("IncidentSvc");
89  if( !m_incidentSvc ) {
90  fatal() << "Error retrieving IncidentSvc." << endmsg;
91  return StatusCode::FAILURE;
92  }
93 
94  m_abortEventListener = new AbortEventListener(m_abortEvent,m_abortEventSource);
96 
97  // The state is changed at this moment to allow decodeXXXX() to do something
99 
100  //--------------------------------------------------------------------------------------------
101  // Create output streams. Do not initialize them yet.
102  // The state is updated temporarily in order to enable the handler, which
103  // is also triggered by a change to the "OutputStream" Property.
104  //--------------------------------------------------------------------------------------------
105  sc = decodeOutStreams();
106  if ( !sc.isSuccess() ) {
107  error() << "Failed to initialize Output streams." << endmsg;
109  return sc;
110  }
111  //--------------------------------------------------------------------------------------------
112  // Create all needed Top Algorithms. Do not initialize them yet.
113  // The state is updated temporarily in order to enable the handler, which
114  // is also triggered by a change to the "TopAlg" Property.
115  //--------------------------------------------------------------------------------------------
116  sc = decodeTopAlgs();
117  if ( !sc.isSuccess() ) {
118  error() << "Failed to initialize Top Algorithms streams." << endmsg;
120  return sc;
121  }
122 
123  // Initialize all the new TopAlgs. In fact Algorithms are protected against getting
124  // initialized twice.
125  for (auto& ita : m_topAlgList ) {
126  sc = ita->sysInitialize();
127  if( !sc.isSuccess() ) {
128  error() << "Unable to initialize Algorithm: " << ita->name() << endmsg;
129  return sc;
130  }
131  }
132  for (auto& ita : m_outStreamList ) {
133  sc = ita->sysInitialize();
134  if( !sc.isSuccess() ) {
135  error() << "Unable to initialize Output Stream: " << ita->name() << endmsg;
136  return sc;
137  }
138  }
139 
140  return StatusCode::SUCCESS;
141 }
142 //--------------------------------------------------------------------------------------------
143 // implementation of IAppMgrUI::start
144 //--------------------------------------------------------------------------------------------
146 
148  if ( ! sc.isSuccess() ) return sc;
149 
150  // Start all the new TopAlgs. In fact Algorithms are protected against getting
151  // started twice.
152  for (auto& ita : m_topAlgList) {
153  sc = ita->sysStart();
154  if( !sc.isSuccess() ) {
155  error() << "Unable to start Algorithm: " << ita->name() << endmsg;
156  return sc;
157  }
158  }
159  for (auto& ita : m_outStreamList ) {
160  sc = ita->sysStart();
161  if( !sc.isSuccess() ) {
162  error() << "Unable to start Output Stream: " << ita->name() << endmsg;
163  return sc;
164  }
165  }
166  return StatusCode::SUCCESS;
167 }
168 //--------------------------------------------------------------------------------------------
169 // implementation of IAppMgrUI::stop
170 //--------------------------------------------------------------------------------------------
172 
174 
175  // Stop all the TopAlgs. In fact Algorithms are protected against getting
176  // stopped twice.
177  for (auto & ita : m_topAlgList ) {
178  sc = ita->sysStop();
179  if( !sc.isSuccess() ) {
180  error() << "Unable to stop Algorithm: " << ita->name() << endmsg;
181  return sc;
182  }
183  }
184  for (auto &ita : m_outStreamList ) {
185  sc = ita->sysStop();
186  if( !sc.isSuccess() ) {
187  error() << "Unable to stop Output Stream: " << ita->name() << endmsg;
188  return sc;
189  }
190  }
191 
192  return Service::stop();
193 }
194 
195 //--------------------------------------------------------------------------------------------
196 // implementation of IService::reinitialize
197 //--------------------------------------------------------------------------------------------
200 
201  // Reinitialize all the TopAlgs.
202  for (auto& ita : m_topAlgList) {
203  sc = ita->sysReinitialize();
204  if( !sc.isSuccess() ) {
205  error() << "Unable to reinitialize Algorithm: " << ita->name() << endmsg;
206  return sc;
207  }
208  }
209  for (auto &ita : m_outStreamList ) {
210  sc = ita->sysReinitialize();
211  if( !sc.isSuccess() ) {
212  error() << "Unable to reinitialize Output Stream: " << ita->name() << endmsg;
213  return sc;
214  }
215  }
216 
217  return sc;
218 }
219 //--------------------------------------------------------------------------------------------
220 // implementation of IService::restart
221 //--------------------------------------------------------------------------------------------
224 
225  // Restart all the TopAlgs.
226  for (auto& ita : m_topAlgList ) {
227  sc = ita->sysRestart();
228  if( !sc.isSuccess() ) {
229  error() << "Unable to restart Algorithm: " << ita->name() << endmsg;
230  return sc;
231  }
232  }
233  for (auto& ita : m_outStreamList ) {
234  sc = ita->sysRestart();
235  if( !sc.isSuccess() ) {
236  error() << "Unable to restart Output Stream: " << ita->name() << endmsg;
237  return sc;
238  }
239  }
240 
241  return sc;
242 }
243 
244 //--------------------------------------------------------------------------------------------
245 // implementation of IService::finalize
246 //--------------------------------------------------------------------------------------------
250  // Call the finalize() method of all top algorithms
251  for (auto& ita : m_topAlgList ) {
252  sc = ita->sysFinalize();
253  if( !sc.isSuccess() ) {
254  scRet = StatusCode::FAILURE;
255  warning() << "Finalization of algorithm " << ita->name() << " failed" << endmsg;
256  }
257  }
258  // Call the finalize() method of all Output streams
259  for (auto &ita : m_outStreamList) {
260  sc = ita->sysFinalize();
261  if( !sc.isSuccess() ) {
262  scRet = StatusCode::FAILURE;
263  warning() << "Finalization of algorithm " << ita->name() << " failed" << endmsg;
264  }
265  }
266  // release all top algorithms
267  auto algMan = serviceLocator()->as<IAlgManager>();
268  for (auto &ita : m_topAlgList ) {
269  if (algMan->removeAlgorithm(ita).isFailure()) {
270  scRet = StatusCode::FAILURE;
271  warning() << "Problems removing Algorithm " << ita->name() << endmsg;
272  }
273  }
274  m_topAlgList.clear();
275  m_outStreamList.clear();
276  if ( sc.isSuccess() ) m_state = FINALIZED;
277 
280 
282  m_appMgrUI.reset();
283 
284  sc = Service::finalize();
285 
286  if (sc.isFailure()) {
287  scRet = StatusCode::FAILURE;
288  error() << "Problems finalizing Service base class" << endmsg;
289  }
290 
291  return scRet;
292 }
293 
294 //--------------------------------------------------------------------------------------------
295 // implementation of IAppMgrUI::nextEvent
296 //--------------------------------------------------------------------------------------------
298  error() << "This method cannot be called on an object of type "
299  << System::typeinfoName(typeid(*this)) << endmsg;
300  return StatusCode::FAILURE;
301 }
302 
303 //--------------------------------------------------------------------------------------------
304 // IEventProcessing::executeRun
305 //--------------------------------------------------------------------------------------------
307  StatusCode sc;
308  bool eventfailed = false;
309 
310  // Call the beginRun() method of all top algorithms
311  for (auto& ita : m_topAlgList ) {
312  sc = ita->sysBeginRun();
313  if (!sc.isSuccess()) {
314  warning() << "beginRun() of algorithm " << ita->name() << " failed" << endmsg;
315  eventfailed = true;
316  }
317  }
318 
319  // Call now the nextEvent(...)
320  sc = nextEvent(maxevt);
321  if (!sc.isSuccess()) eventfailed = true;
322 
323  // Call the endRun() method of all top algorithms
324  for (auto& ita : m_topAlgList) {
325  sc = ita->sysEndRun();
326  if (!sc.isSuccess()) {
327  warning() << "endRun() of algorithm " << ita->name() << " failed" << endmsg;
328  eventfailed = true;
329  }
330  }
331 
332  return eventfailed ? StatusCode::FAILURE : StatusCode::SUCCESS;
333 }
334 
335 namespace {
338  class RetCodeGuard {
339  public:
340  inline RetCodeGuard(const SmartIF<IProperty> &appmgr, int retcode):
341  m_appmgr(appmgr), m_retcode(retcode) {}
342  inline void ignore() {
343  m_retcode = Gaudi::ReturnCode::Success;
344  }
345  inline ~RetCodeGuard() {
346  if (UNLIKELY(Gaudi::ReturnCode::Success != m_retcode)) {
347  Gaudi::setAppReturnCode(m_appmgr, m_retcode);
348  }
349  }
350  private:
351  SmartIF<IProperty> m_appmgr;
352  int m_retcode;
353  };
354 }
355 //--------------------------------------------------------------------------------------------
356 // Implementation of IEventProcessor::executeEvent(void* par)
357 //--------------------------------------------------------------------------------------------
359  bool eventfailed = false;
360 
361  // Call the resetExecuted() method of ALL "known" algorithms
362  // (before we were reseting only the topalgs)
363  auto algMan = serviceLocator()->as<IAlgManager>();
364  if (LIKELY(algMan.isValid())) {
365  const auto& allAlgs = algMan->getAlgorithms();
366  std::for_each( std::begin(allAlgs), std::end(allAlgs),
367  [](IAlgorithm* alg) {
368  if (LIKELY(alg!=nullptr)) alg->resetExecuted();
369  } );
370  }
371 
372  // Get the IProperty interface of the ApplicationMgr to pass it to RetCodeGuard
373  const auto appmgr = serviceLocator()->as<IProperty>();
374  // Call the execute() method of all top algorithms
375  for (auto& ita : m_topAlgList ) {
377  try {
378  if (UNLIKELY(m_abortEvent)) {
379  DEBMSG << "AbortEvent incident fired by "
381  m_abortEvent = false;
382  sc.ignore();
383  break;
384  }
385  RetCodeGuard rcg(appmgr, Gaudi::ReturnCode::UnhandledException);
386  sc = ita->sysExecute();
387  rcg.ignore(); // disarm the guard
388  } catch ( const GaudiException& Exception ) {
389  fatal() << ".executeEvent(): Exception with tag=" << Exception.tag()
390  << " thrown by " << ita->name() << endmsg;
391  error() << Exception << endmsg;
392  } catch ( const std::exception& Exception ) {
393  fatal() << ".executeEvent(): Standard std::exception thrown by "
394  << ita->name() << endmsg;
395  error() << Exception.what() << endmsg;
396  } catch(...) {
397  fatal() << ".executeEvent(): UNKNOWN Exception thrown by "
398  << ita->name() << endmsg;
399  }
400 
401  if (UNLIKELY(!sc.isSuccess())) {
402  warning() << "Execution of algorithm " << ita->name() << " failed" << endmsg;
403  eventfailed = true;
404  }
405  }
406 
407  // ensure that the abortEvent flag is cleared before the next event
408  if (UNLIKELY(m_abortEvent)) {
409  DEBMSG << "AbortEvent incident fired by " << m_abortEventSource << endmsg;
410  m_abortEvent = false;
411  }
412 
413  // Call the execute() method of all output streams
414  for (auto& ito : m_outStreamList) {
415  ito->resetExecuted();
416  StatusCode sc;
417  sc = ito->sysExecute();
418  if (UNLIKELY(!sc.isSuccess())) {
419  warning() << "Execution of output stream " << ito->name() << " failed" << endmsg;
420  eventfailed = true;
421  }
422  }
423 
424  // Check if there was an error processing current event
425  if (UNLIKELY(eventfailed)){
426  error() << "Error processing event loop." << endmsg;
427  return StatusCode(StatusCode::FAILURE,true);
428  }
429  return StatusCode(StatusCode::SUCCESS,true);
430 }
431 //--------------------------------------------------------------------------------------------
432 // Implementation of IEventProcessor::stopRun()
433 //--------------------------------------------------------------------------------------------
435  // Set the application return code
436  auto appmgr = serviceLocator()->as<IProperty>();
438  error() << "Could not set return code of the application ("
440  }
441  m_scheduledStop = true;
442  return StatusCode::SUCCESS;
443 }
444 
445 //--------------------------------------------------------------------------------------------
446 // Top algorithm List handler
447 //--------------------------------------------------------------------------------------------
449  if ( !(decodeTopAlgs( )).isSuccess() ) {
450  throw GaudiException("Failed to initialize Top Algorithms streams.",
451  "MinimalEventLoopMgr::topAlgHandler",
453  }
454 }
455 
456 //--------------------------------------------------------------------------------------------
457 // decodeTopAlgNameList & topAlgNameListHandler
458 //--------------------------------------------------------------------------------------------
461  if ( CONFIGURED == m_state || INITIALIZED == m_state ) {
462  auto algMan = serviceLocator()->as<IAlgManager>();
463  if ( algMan ) {
464  // Reset the existing Top Algorithm List
465  m_topAlgList.clear( );
466  m_topAlgList.reserve( m_topAlgNames.value().size() );
467  for (const auto& it : m_topAlgNames.value( )) {
469  // Got the type and name. Now creating the algorithm, avoiding duplicate creation.
470  std::string item_name = item.name() + getGaudiThreadIDfromName(name());
471  const bool CREATE = false;
472  SmartIF<IAlgorithm> alg = algMan->algorithm(item_name, CREATE);
473  if (alg) {
474  DEBMSG << "Top Algorithm " << item_name << " already exists" << endmsg;
475  }
476  else {
477  DEBMSG << "Creating Top Algorithm " << item.type() << " with name " << item_name << endmsg;
478  IAlgorithm *ialg = nullptr;
479  StatusCode sc1 = algMan->createAlgorithm(item.type(), item_name, ialg);
480  if( !sc1.isSuccess() ) {
481  error() << "Unable to create Top Algorithm " << item.type() << " with name " << item_name << endmsg;
482  return sc1;
483  }
484  alg = ialg; // manage reference counting
485  }
486  m_topAlgList.push_back(alg);
487  }
488  return sc;
489  }
490  sc = StatusCode::FAILURE;
491  }
492  return sc;
493 }
494 
495 //--------------------------------------------------------------------------------------------
496 // Output stream List handler
497 //--------------------------------------------------------------------------------------------
499  if ( !(decodeOutStreams( )).isSuccess() ) {
500  throw GaudiException("Failed to initialize output streams.",
501  "MinimalEventLoopMgr::outStreamHandler",
503  }
504 }
505 
506 //--------------------------------------------------------------------------------------------
507 // decodeOutStreamNameList & outStreamNameListHandler
508 //--------------------------------------------------------------------------------------------
511  if ( CONFIGURED == m_state || INITIALIZED == m_state ) {
512  auto algMan = serviceLocator()->as<IAlgManager>();
513  if ( algMan ) {
514  // Reset the existing Top Algorithm List
515  m_outStreamList.clear();
516  for (const auto& it : m_outStreamNames.value( ) ) {
518  DEBMSG << "Creating " << m_outStreamType << it << endmsg;
519  const bool CREATE = false;
520  SmartIF<IAlgorithm> os = algMan->algorithm( item, CREATE );
521  if (os) {
522  DEBMSG << "Output Stream " << item.name() << " already exists" << endmsg;
523  } else {
524  DEBMSG << "Creating Output Stream " << it << endmsg;
525  IAlgorithm* ios = 0;
526  StatusCode sc1 = algMan->createAlgorithm( item.type(), item.name(), ios );
527  if( !sc1.isSuccess() ) {
528  error() << "Unable to create Output Stream " << it << endmsg;
529  return sc1;
530  }
531  os = ios; // manage reference counting
532  }
533  m_outStreamList.push_back( os );
534  }
535  return sc;
536  }
537  sc = StatusCode::FAILURE;
538  }
539  return sc;
540 }
541 
542 
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
StatusCode initialize() override
Definition: Service.cpp:62
Base class used to implement the interfaces.
Definition: implements.h:8
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
Definition: ThreadGaudi.cpp:26
virtual StatusCode stopRun()
implementation of IEventProcessor::stopRun( )
const std::string & type() const
Access to the incident type.
Definition: Incident.h:34
bool m_scheduledStop
Scheduled stop of event processing.
StatusCode finalize() override
Definition: Service.cpp:187
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
StatusCode start() override
Definition: Service.cpp:146
virtual StatusCode initialize()
implementation of IService::initialize
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:40
auto begin(reverse_wrapper< T > &w)
Definition: reverse.h:45
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
virtual StatusCode nextEvent(int maxevt)
implementation of IEventProcessor::nextEvent
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:27
virtual StatusCode start()
implementation of IService::start
void outStreamHandler(Property &p)
Output stream List handler.
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.
StatusCode decodeTopAlgs()
decodeTopAlgNameList & topAlgNameListHandler
virtual void resetExecuted()=0
Reset the Algorithm executed state for the current event.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
const std::string AbortEvent
Stop processing the current event and pass to te next one.
Definition: Incident.h:66
constexpr int ScheduledStop
Definition: AppReturnCode.h:25
State m_state
State of the object.
constexpr int UnhandledException
Definition: AppReturnCode.h:27
std::string m_abortEventSource
Source of the AbortEvent incident.
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
virtual StatusCode executeEvent(void *par)
implementation of IEventProcessor::executeEvent(void* par)
auto end(reverse_wrapper< T > &w)
Definition: reverse.h:47
unsigned long addRef() override
Reference Interface instance.
Definition: implements.h:43
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:222
bool PyHelper() setProperty(IInterface *p, char *name, char *value)
Definition: Bootstrap.cpp:255
virtual const std::string & tag() const
name tag for the exception, or exception type
void topAlgHandler(Property &p)
Top algorithm List handler.
StatusCode stop() override
Definition: Service.cpp:140
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
Definition: AppReturnCode.h:50
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:19
const TYPE & value() const
explicit conversion
Definition: Property.h:341
virtual StatusCode reinitialize()
implementation of IService::reinitialize
virtual StatusCode stop()
implementation of IService::stop
tuple retcode
Definition: gaudirun.py:479
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
virtual StatusCode executeRun(int maxevt)
implementation of IEventProcessor::executeRun( )
ListAlg m_outStreamList
List of output streams.
virtual StatusCode restart()
implementation of IService::restart
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
virtual StatusCode finalize()
implementation of IService::finalize
const std::string & type() const
Base class for all Incidents (computing events).
Definition: Incident.h:16
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
tuple item
print s1,s2
Definition: ana.py:146
virtual void declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
Definition: Property.cpp:71
std::string m_outStreamType
Out Stream type.
#define UNLIKELY(x)
Definition: Kernel.h:126
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
virtual void removeListener(IIncidentListener *lis, const std::string &type="")=0
Remove listener.
const std::string & name() const
StringArrayProperty m_topAlgNames
List of top level algorithms names.
#define LIKELY(x)
Definition: Kernel.h:125
#define DEBMSG
StatusCode decodeOutStreams()
decodeOutStreamNameList & outStreamNameListHandler
void ignore() const
Definition: StatusCode.h:108
constexpr int Success
Definition: AppReturnCode.h:16
The IProperty is the basic interface for all components which have properties that can be set or get...
Definition: IProperty.h:21
list i
Definition: ana.py:128
StringArrayProperty m_outStreamNames
List of output stream names.
MinimalEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
ListAlg m_topAlgList
List of top level algorithms.
bool m_abortEvent
Flag signalling that the event being processedhas to be aborted (skip all following top algs)...