BLAlarm Class Reference

#include <BLAlarm.hh>

List of all members.


Detailed Description

class BLAlarm implements an alarm clock.

used to prevent an infinite tracking loop from hanging an entire job.

NOTE: all functions are inline, so no .cc file is needed.

Static Public Member Functions

static void clear ()
 clear will clear any alarm.
static void set (int seconds)
 set() sets an alarm in the future. Implicitly clears any previous alarm.
static void init ()
 init() will setup the signal handler Must be called before set().

Static Private Member Functions

static void sighandler (int sig)
 sighandler() handles the alarm signal


Member Function Documentation

static void BLAlarm::clear (  )  [inline, static]

clear will clear any alarm.

Referenced by BLManager::EndOfEventAction().

00047 { alarm(0); }

static void BLAlarm::set ( int  seconds  )  [inline, static]

set() sets an alarm in the future. Implicitly clears any previous alarm.

Referenced by BLManager::BeginOfEventAction().

00051 { alarm(seconds); }

static void BLAlarm::init (  )  [inline, static]

init() will setup the signal handler Must be called before set().

References sighandler().

Referenced by BLManager::BLManager().

00055 { signal(SIGALRM,sighandler); }

static void BLAlarm::sighandler ( int  sig  )  [inline, static, private]

sighandler() handles the alarm signal

Referenced by init().

00059                                         { 
00060                 G4Exception("BLAlarm","Alarm Signal",FatalException,
00061                         "SIGALRM fired, cannot be recovered");
00062         }


The documentation for this class was generated from the following file:
g4beamline