#include <AlarmHandler.h>
Public Types | |
enum | ALARM_LEVEL { OKAY, WARNING, ERROR, FATAL } |
Public Member Functions | |
AlarmHandler () | |
AlarmHandler (xdaq::Application *) | |
AlarmHandler (xdaq::Application *, boost::shared_ptr< SharedResources >) | |
void | clearAllAlarms () |
Logger & | getLogger () const |
void | localDebug (const std::string &message) const |
virtual void | moveToFailedState (xcept::Exception &) |
virtual void | notifySentinel (const ALARM_LEVEL, xcept::Exception &) |
virtual void | raiseAlarm (const std::string name, const ALARM_LEVEL, xcept::Exception &) |
virtual void | revokeAlarm (const std::string name) |
virtual | ~AlarmHandler () |
Private Member Functions | |
bool | raiseAlarm (const std::string name, const std::string level, xcept::Exception &) |
Private Attributes | |
xdata::InfoSpace * | alarmInfoSpace_ |
xdaq::Application * | app_ |
boost::mutex | mutex_ |
boost::shared_ptr < SharedResources > | sharedResources_ |
Helper class to handle sentinel alarming
Definition at line 30 of file AlarmHandler.h.
Enumerator | |
---|---|
OKAY | |
WARNING | |
ERROR | |
FATAL |
Definition at line 35 of file AlarmHandler.h.
|
inline |
Definition at line 38 of file AlarmHandler.h.
|
explicit |
stor::AlarmHandler::AlarmHandler | ( | xdaq::Application * | , |
boost::shared_ptr< SharedResources > | |||
) |
|
inlinevirtual |
Definition at line 50 of file AlarmHandler.h.
void stor::AlarmHandler::clearAllAlarms | ( | ) |
Revokes all sentinel alarms
Definition at line 191 of file AlarmHandler.cc.
References alarmInfoSpace_, app_, and mutex_.
|
inline |
void stor::AlarmHandler::localDebug | ( | const std::string & | message | ) | const |
Write message to a file in /tmp (last resort when everything else fails)
Definition at line 247 of file AlarmHandler.cc.
References f, alignmentValidation::fname, dbtoconf::out, sharedResources_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by moveToFailedState().
|
virtual |
Add a Failed state-machine event to the command queue
Definition at line 209 of file AlarmHandler.cc.
References alignCSCRings::e, cppFunctionSkipper::exception, edm::hlt::Exception, edm::hlt::Fail, FATAL, localDebug(), notifySentinel(), seconds(), sharedResources_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
virtual |
Notifies the sentinel
Definition at line 98 of file AlarmHandler.cc.
References dqm::qstatus::ERROR, and dqm::qstatus::WARNING.
Referenced by moveToFailedState().
|
virtual |
Raises a sentinel alarm
Definition at line 59 of file AlarmHandler.cc.
References dqm::qstatus::ERROR, and dqm::qstatus::WARNING.
|
private |
|
virtual |
Revokes a sentinel alarm
Definition at line 165 of file AlarmHandler.cc.
References edm::hlt::Exception, and mergeVDriftHistosByStation::name.
|
private |
Definition at line 110 of file AlarmHandler.h.
Referenced by clearAllAlarms().
|
private |
Definition at line 108 of file AlarmHandler.h.
Referenced by clearAllAlarms(), and getLogger().
|
mutableprivate |
Definition at line 112 of file AlarmHandler.h.
Referenced by clearAllAlarms().
|
private |
Definition at line 109 of file AlarmHandler.h.
Referenced by localDebug(), and moveToFailedState().