CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TkStateMachine.h
Go to the documentation of this file.
1 #ifndef Tracker_TkFiniteStateMachine_h
2 #define Tracker_TkFiniteStateMachine_h
3 
4 #include <string>
13  public:
14 
16 
17  bool alreadyCalibrated() const {return (myStatus == updating || myStatus == ready);}
18  StatusType status() const {return myStatus;}
19 
20  void setReady() {myStatus = ready;}
23  void setStuck() {myStatus = stuck;}
24 
26 
27  bool isReady() const {return myStatus==ready;}
28  bool isStuck() const {return myStatus==stuck;}
29  bool isUpdating() const {return myStatus==updating;}
30  bool isCalibrating() const {return myStatus==calibrating;}
31 
32 
33  std::string statusName() {
34  if (myStatus == ready) return "Ready";
35  if (myStatus == calibrating) return "Calibrating";
36  if (myStatus == updating) return "Updating";
37  if (myStatus == stuck) return "Stuck";
38  return "Unknown Status";
39  }
40 
41 
42  public:
43 
45 
46 };
47 
48 #endif
49 
50 
StatusType status() const
void setStatus(StatusType in)
bool isStuck() const
bool alreadyCalibrated() const
bool isUpdating() const
bool isReady() const
std::string statusName()
StatusType myStatus
bool isCalibrating() const
void setCalibrating()