Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StalledEventMonitor.h
Go to the documentation of this file.
1 /*
2  * StalledEventMonitor.h
3  *
4  * Created on: Apr 19, 2010
5  * Author: Marco Clemencic
6  */
7 
8 #ifndef STALLEDEVENTMONITOR_H_
9 #define STALLEDEVENTMONITOR_H_
10 
11 // Include files
13 #include "GaudiKernel/Service.h"
14 #include <memory>
15 
16 // Forward declarations
17 class WatchdogThread;
18 class IIncidentSvc;
19 
29 class StalledEventMonitor : public extends<Service, IIncidentListener> {
30 public:
32  using extends::extends;
33 
36  StatusCode initialize() override;
37 
39  StatusCode start() override;
40 
42  void handle( const Incident& /* incident */ ) override;
43 
45  StatusCode stop() override;
46 
48  StatusCode finalize() override;
49 
50 private:
52  this, "EventTimeout", 600, "Number of seconds allowed to process a single event (0 to disable the check)."};
53  Gaudi::Property<int> m_maxTimeoutCount{this, "MaxTimeoutCount", 0,
54  "Number timeouts before aborting the execution (0 means never abort)."};
55  Gaudi::Property<bool> m_stackTrace{this, "StackTrace", false, "Whether to print the stack-trace on timeout."};
56 
59 
62 };
63 
64 #endif // STALLEDEVENTMONITOR_H_
StatusCode stop() override
Stop the watchdog thread (after the event loop).
Implementation of property with value of concrete type.
Definition: Property.h:352
Gaudi::Property< unsigned int > m_eventTimeout
std::unique_ptr< WatchdogThread > m_watchdog
Pointer to the watchdog thread that checks for the event timeout.
void handle(const Incident &) override
Notify the watchdog thread for a new event.
Gaudi::Property< bool > m_stackTrace
StatusCode start() override
Start the watchdog thread (before entering the event loop).
Service that monitor the time taken by processing of single events using a separate thread...
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to the incident service.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode initialize() override
Initialization of the service.
Simple class for asynchronous check of time-out.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Base class for all Incidents (computing events).
Definition: Incident.h:17
StatusCode finalize() override
Finalization of the service.
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
Gaudi::Property< int > m_maxTimeoutCount