CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes
TkStateMachine Class Reference

#include <TkStateMachine.h>

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 14 of file TkStateMachine.h.

Member Function Documentation

bool TkStateMachine::alreadyCalibrated ( ) const
inline

Definition at line 16 of file TkStateMachine.h.

References myStatus, ready, and updating.

bool TkStateMachine::isCalibrating ( ) const
inline
bool TkStateMachine::isReady ( ) const
inline

Definition at line 26 of file TkStateMachine.h.

References myStatus, and ready.

26 { return myStatus == ready; }
StatusType myStatus
bool TkStateMachine::isStuck ( ) const
inline

Definition at line 27 of file TkStateMachine.h.

References myStatus, and stuck.

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

Definition at line 19 of file TkStateMachine.h.

References myStatus, and ready.

void TkStateMachine::setStatus ( StatusType  in)
inline

Definition at line 24 of file TkStateMachine.h.

References recoMuon::in, and myStatus.

void TkStateMachine::setStuck ( )
inline

Definition at line 22 of file TkStateMachine.h.

References myStatus, and stuck.

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

Definition at line 17 of file TkStateMachine.h.

References myStatus.

17 { return myStatus; }
StatusType myStatus
std::string TkStateMachine::statusName ( )
inline

Definition at line 31 of file TkStateMachine.h.

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

31  {
32  if (myStatus == ready)
33  return "Ready";
34  if (myStatus == calibrating)
35  return "Calibrating";
36  if (myStatus == updating)
37  return "Updating";
38  if (myStatus == stuck)
39  return "Stuck";
40  return "Unknown Status";
41  }
StatusType myStatus

Member Data Documentation

StatusType TkStateMachine::myStatus