![]() |
ATLAS Offline Software
|
Algorithm to monitor event timeouts. More...
#include <TimeoutAlg.h>
Public Member Functions | |
| virtual StatusCode | initialize () override |
| Algorithm to monitor event timeouts. More... | |
| virtual StatusCode | execute (const EventContext &ctx) const override |
| virtual StatusCode | stop () override |
| virtual void | handle (const Incident &inc) override |
Protected Member Functions | |
| void | setTimeout (Timeout &instance) |
| Set timeout. More... | |
| void | resetTimeout (Timeout &instance) |
| Reset timeout. More... | |
Private Types | |
| using | clock_t = std::chrono::steady_clock |
Private Member Functions | |
| void | timeoutThread () |
| Watchdog thread. More... | |
| void | handleTimeout (EventContext::ContextID_t slot) |
| Handle timeout. More... | |
Private Attributes | |
| std::chrono::nanoseconds | m_timeout |
| Timeout property as duration. More... | |
| SG::SlotSpecificObj< clock_t::time_point > m_eventStartTime | ATLAS_THREAD_SAFE |
| Start time of each event per slot. More... | |
| std::thread m_thread | ATLAS_THREAD_SAFE |
| Watchdog thread. More... | |
| std::promise< void > | m_stop_thread |
| Signal to stop watchdog thread. More... | |
| std::atomic< bool > | m_stopped {false} |
| Has watchdog thread already been stopped? (to avoid setting future twice) More... | |
| std::mutex | m_handleMutex |
| Mutex for handleTimeout. More... | |
Properties | |
| Gaudi::Property< unsigned long long > | m_timeoutProp |
| Gaudi::Property< unsigned long long > | m_checkInterval |
| Gaudi::Property< bool > | m_dumpState |
| Gaudi::Property< bool > | m_abort |
Algorithm to monitor event timeouts.
Algorithm providing a watchdog thread for event timeouts.
This algorithm should run early on (ideally first) in the event sequence. It records the event start time and launches a watchdog thread that checks periodically if an event has timed out.
See the algorithm properties for possible actions on an event timeout.
Definition at line 35 of file TimeoutAlg.h.
|
private |
Definition at line 48 of file TimeoutAlg.h.
|
overridevirtual |
Definition at line 33 of file TimeoutAlg.cxx.
|
overridevirtual |
Definition at line 52 of file TimeoutAlg.cxx.
|
private |
|
overridevirtual |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
overridevirtual |
Definition at line 62 of file TimeoutAlg.cxx.
|
private |
|
mutableprivate |
Start time of each event per slot.
Definition at line 76 of file TimeoutAlg.h.
|
mutableprivate |
Watchdog thread.
Definition at line 79 of file TimeoutAlg.h.
|
private |
Definition at line 67 of file TimeoutAlg.h.
|
private |
Definition at line 61 of file TimeoutAlg.h.
|
private |
Definition at line 64 of file TimeoutAlg.h.
|
private |
Mutex for handleTimeout.
Definition at line 88 of file TimeoutAlg.h.
|
private |
Signal to stop watchdog thread.
Definition at line 82 of file TimeoutAlg.h.
|
private |
Has watchdog thread already been stopped? (to avoid setting future twice)
Definition at line 85 of file TimeoutAlg.h.
|
private |
Timeout property as duration.
Definition at line 73 of file TimeoutAlg.h.
|
private |
Definition at line 58 of file TimeoutAlg.h.
1.8.18