MPulserCheck Class Reference
[Modules]

Inheritance diagram for MPulserCheck:

QModule QModule QBaseModule QBaseModule

List of all members.


Detailed Description

check for failure in heater pulses control system

Author:
sergio.didomizio@ge.infn.it Check presence of heater pulses in data and send an alert mail if pulser is missing. Bad Pulser condition is assumed if last pulser occurred earlier than the time specified by mean of config parameter CheckPeriod. Bad Pulser condition is removed as soon as pulser events appear again inside data. A mail is sent to the recipient list specified by mean of config parameter Recipients after the first pulser fault is detected. If config parameter ResendMail is set to false, no more alerts are sent, even if pulser failure is still present. If ResendMail is set to true a mail is sent periodically (based on cfg parameter ResendPeriod), only if at least one new pulser failure occurred during the last period. In order for this module to be effective, the environment variable APOLLO_PULSER must be set.


Public Member Functions

 MPulserCheck (QSequence *s)
 constructor: only initialize data members
 ~MPulserCheck ()
 destructor: do nothing
void Init ()
 init data members that depend on config file parameters and check for APOLLO_PULSER environmnent variable
QEventDo (QEvent *ev)
 compare time of current event with time of last detected heater pulse, and call NotifyFailure() method if time gap is too big. Do nothing if APOLLO_PULSER is not set
void Done ()
 Done method.
 MPulserCheck (QSequence *s)
 constructor: only initialize data members
 ~MPulserCheck ()
 destructor: do nothing
void Init ()
 init data members that depend on config file parameters and check for APOLLO_PULSER environmnent variable
QEventDo (QEvent *ev)
 compare time of current event with time of last detected heater pulse, and call NotifyFailure() method if time gap is too big. Do nothing if APOLLO_PULSER is not set
void Done ()
 Done method.

Private Member Functions

void ParseRecipients (const std::string &recipients)
 parse recipients list supplied in cfg file and fill list of recipients.
std::string CheckRecipient (std::string &recipient) const
 convert CurrentUser to user name
void NotifyFailure (time_t evTime)
 send alert mail
void ParseRecipients (const std::string &recipients)
 parse recipients list supplied in cfg file and fill list of recipients.
std::string CheckRecipient (std::string &recipient) const
 convert CurrentUser to user name
void NotifyFailure (time_t evTime)
 send alert mail

Private Attributes

time_t fLastPulserTime
time_t fLastMailTime
bool fSkipThisModule
time_t fCheckPeriod
 max time allowed without a pulser event
std::list< std::string > fRecipients
 list of alert mail recipients
bool fResendMail
 true if alert mail must be re-sent after first one i failure is still present
time_t fResendPeriod
 time in seconds after which another alert mail is sent

Member Function Documentation

void MPulserCheck::ParseRecipients ( const std::string &  recipients  )  [private]

parse recipients list supplied in cfg file and fill list of recipients.

Parameters:
recipients comma separated list of recipients

References CheckRecipient(), QBaseModule::Debug(), and fRecipients.

Referenced by Init().

void MPulserCheck::NotifyFailure ( time_t  evTime  )  [private]

void MPulserCheck::ParseRecipients ( const std::string &  recipients  )  [private]

parse recipients list supplied in cfg file and fill list of recipients.

Parameters:
recipients comma separated list of recipients

void MPulserCheck::NotifyFailure ( time_t  evTime  )  [private]

send alert mail

Parameters:
evTime unix time of last pulser failure detection


Member Data Documentation

unix time of last pulser event

Referenced by Do(), and NotifyFailure().

time_t MPulserCheck::fLastMailTime [private]

unix time of last sent mail

Referenced by NotifyFailure().

execution of this module will be skipped if environment variable APOLLO_PULSER is not set, since in that case it is normal to find no heater pulses

Referenced by Do(), and Init().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:03 2010 for CUORE Software by  doxygen 1.5.6