CMS 3D CMS Logo

Public Types | Public Member Functions | Public Attributes

TkStateMachine Class Reference

#include <TkStateMachine.h>

List of all members.

Public Types

enum  StatusType { ready = 1, calibrating = 2, updating = 3, stuck = 4 }

Public Member Functions

bool alreadyCalibrated () const
bool isCalibrating () const
bool isReady () const
bool isStuck () const
bool isUpdating () const
void setCalibrating ()
void setReady ()
void setStatus (StatusType in)
void setStuck ()
void setUpdating ()
StatusType status () const
std::string statusName ()

Public Attributes

StatusType myStatus

Detailed Description

Implement a state machine. Each of the ApvAnalysis component can be

Definition at line 12 of file TkStateMachine.h.


Member Enumeration Documentation

Enumerator:
ready 
calibrating 
updating 
stuck 

Definition at line 15 of file TkStateMachine.h.


Member Function Documentation

bool TkStateMachine::alreadyCalibrated ( ) const [inline]

Definition at line 17 of file TkStateMachine.h.

References myStatus, ready, and updating.

{return (myStatus == updating || myStatus == ready);}
bool TkStateMachine::isCalibrating ( ) const [inline]
bool TkStateMachine::isReady ( ) const [inline]

Definition at line 27 of file TkStateMachine.h.

References myStatus, and ready.

{return myStatus==ready;}
bool TkStateMachine::isStuck ( ) const [inline]

Definition at line 28 of file TkStateMachine.h.

References myStatus, and stuck.

{return myStatus==stuck;}
bool TkStateMachine::isUpdating ( ) const [inline]
void TkStateMachine::setCalibrating ( ) [inline]
void TkStateMachine::setReady ( ) [inline]

Definition at line 20 of file TkStateMachine.h.

References myStatus, and ready.

void TkStateMachine::setStatus ( StatusType  in) [inline]

Definition at line 25 of file TkStateMachine.h.

References recoMuon::in, and myStatus.

{myStatus = in;}
void TkStateMachine::setStuck ( ) [inline]

Definition at line 23 of file TkStateMachine.h.

References myStatus, and stuck.

void TkStateMachine::setUpdating ( ) [inline]
StatusType TkStateMachine::status ( ) const [inline]

Definition at line 18 of file TkStateMachine.h.

References myStatus.

{return myStatus;}
std::string TkStateMachine::statusName ( ) [inline]

Definition at line 33 of file TkStateMachine.h.

References calibrating, myStatus, ready, stuck, and updating.

                         {
    if (myStatus == ready) return "Ready";
    if (myStatus == calibrating) return "Calibrating";
    if (myStatus == updating) return "Updating";
    if (myStatus == stuck) return "Stuck";
    return "Unknown Status";
  }

Member Data Documentation