24 const std::string &name,
25 boost::posix_time::time_duration timeout,
26 bool stackTrace =
false,
28 bool autostart =
false):
33 m_stackTrace(stackTrace){}
34 virtual ~EventWatchdog() {}
57 if (m_stackTrace && gSystem) {
59 std::cerr <<
"=== Stalled event: current stack trace ===" << std::endl;
60 gSystem->StackTrace();
63 if (m_maxCount > 0 && m_counter >= m_maxCount) {
89 "Number of seconds allowed to process a single event (0 to disable the check).");
92 "Number timeouts before aborting the execution (0 means never abort).");
95 "Whether to print the stack-trace on timeout.");
112 new EventWatchdog(
msgSvc(),
119 std::string serviceName =
"IncidentSvc";
122 error() <<
"Cannot retrieve " << serviceName <<
endmsg;
125 debug() <<
"Register to the IncidentSvc" <<
endmsg;
129 <<
" instantiated with 0 time-out: no monitoring performed" <<
endmsg;
159 return base_class::finalize();