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

◆ StatusType

Enumerator
ready 
calibrating 
updating 
stuck 

Definition at line 14 of file TkStateMachine.h.

Member Function Documentation

◆ alreadyCalibrated()

bool TkStateMachine::alreadyCalibrated ( ) const
inline

Definition at line 16 of file TkStateMachine.h.

References myStatus, ready, and updating.

◆ isCalibrating()

bool TkStateMachine::isCalibrating ( ) const
inline

◆ isReady()

bool TkStateMachine::isReady ( ) const
inline

Definition at line 26 of file TkStateMachine.h.

References myStatus, and ready.

26 { return myStatus == ready; }
StatusType myStatus

◆ isStuck()

bool TkStateMachine::isStuck ( ) const
inline

Definition at line 27 of file TkStateMachine.h.

References myStatus, and stuck.

27 { return myStatus == stuck; }
StatusType myStatus

◆ isUpdating()

bool TkStateMachine::isUpdating ( ) const
inline

◆ setCalibrating()

void TkStateMachine::setCalibrating ( )
inline

◆ setReady()

void TkStateMachine::setReady ( )
inline

Definition at line 19 of file TkStateMachine.h.

References myStatus, and ready.

◆ setStatus()

void TkStateMachine::setStatus ( StatusType  in)
inline

Definition at line 24 of file TkStateMachine.h.

References recoMuon::in, and myStatus.

◆ setStuck()

void TkStateMachine::setStuck ( )
inline

Definition at line 22 of file TkStateMachine.h.

References myStatus, and stuck.

◆ setUpdating()

void TkStateMachine::setUpdating ( )
inline

◆ status()

StatusType TkStateMachine::status ( ) const
inline

Definition at line 17 of file TkStateMachine.h.

References myStatus.

17 { return myStatus; }
StatusType myStatus

◆ statusName()

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

◆ myStatus

StatusType TkStateMachine::myStatus