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.

14 { ready = 1, calibrating = 2, updating = 3, stuck = 4 };

Member Function Documentation

◆ alreadyCalibrated()

bool TkStateMachine::alreadyCalibrated ( ) const
inline

Definition at line 16 of file TkStateMachine.h.

16 { return (myStatus == updating || myStatus == ready); }

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.

26 { return myStatus == ready; }

References myStatus, and ready.

◆ isStuck()

bool TkStateMachine::isStuck ( ) const
inline

Definition at line 27 of file TkStateMachine.h.

27 { return myStatus == stuck; }

References myStatus, and stuck.

◆ isUpdating()

bool TkStateMachine::isUpdating ( ) const
inline

◆ setCalibrating()

void TkStateMachine::setCalibrating ( )
inline

◆ setReady()

void TkStateMachine::setReady ( )
inline

Definition at line 19 of file TkStateMachine.h.

19 { myStatus = ready; }

References myStatus, and ready.

◆ setStatus()

void TkStateMachine::setStatus ( StatusType  in)
inline

Definition at line 24 of file TkStateMachine.h.

24 { myStatus = in; }

References recoMuon::in, and myStatus.

◆ setStuck()

void TkStateMachine::setStuck ( )
inline

Definition at line 22 of file TkStateMachine.h.

22 { myStatus = stuck; }

References myStatus, and stuck.

◆ setUpdating()

void TkStateMachine::setUpdating ( )
inline

◆ status()

StatusType TkStateMachine::status ( ) const
inline

Definition at line 17 of file TkStateMachine.h.

17 { return myStatus; }

References myStatus.

◆ statusName()

std::string TkStateMachine::statusName ( )
inline

Definition at line 31 of file TkStateMachine.h.

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  }

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

Member Data Documentation

◆ myStatus

StatusType TkStateMachine::myStatus
TkStateMachine::myStatus
StatusType myStatus
Definition: TkStateMachine.h:44
TkStateMachine::stuck
Definition: TkStateMachine.h:14
TkStateMachine::calibrating
Definition: TkStateMachine.h:14
recoMuon::in
Definition: RecoMuonEnumerators.h:6
TkStateMachine::ready
Definition: TkStateMachine.h:14
TkStateMachine::updating
Definition: TkStateMachine.h:14