Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CalibTracker
SiStripAPVAnalysis
interface
TkStateMachine.h
Go to the documentation of this file.
1
#ifndef Tracker_TkFiniteStateMachine_h
2
#define Tracker_TkFiniteStateMachine_h
3
4
#include <string>
12
class
TkStateMachine
{
13
public
:
14
15
enum
StatusType
{
ready
=1,
calibrating
=2,
updating
=3,
stuck
=4};
16
17
bool
alreadyCalibrated
()
const
{
return
(
myStatus
==
updating
||
myStatus
==
ready
);}
18
StatusType
status
()
const
{
return
myStatus
;}
19
20
void
setReady
() {
myStatus
=
ready
;}
21
void
setUpdating
() {
myStatus
=
updating
;}
22
void
setCalibrating
() {
myStatus
=
calibrating
;}
23
void
setStuck
() {
myStatus
=
stuck
;}
24
25
void
setStatus
(
StatusType
in
) {
myStatus
=
in
;}
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
44
StatusType
myStatus
;
45
46
};
47
48
#endif
49
50
TkStateMachine
Definition:
TkStateMachine.h:12
TkStateMachine::calibrating
Definition:
TkStateMachine.h:15
TkStateMachine::status
StatusType status() const
Definition:
TkStateMachine.h:18
TkStateMachine::setStatus
void setStatus(StatusType in)
Definition:
TkStateMachine.h:25
TkStateMachine::isStuck
bool isStuck() const
Definition:
TkStateMachine.h:28
TkStateMachine::setStuck
void setStuck()
Definition:
TkStateMachine.h:23
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
TkStateMachine::alreadyCalibrated
bool alreadyCalibrated() const
Definition:
TkStateMachine.h:17
TkStateMachine::setReady
void setReady()
Definition:
TkStateMachine.h:20
TkStateMachine::isUpdating
bool isUpdating() const
Definition:
TkStateMachine.h:29
TkStateMachine::setUpdating
void setUpdating()
Definition:
TkStateMachine.h:21
TkStateMachine::isReady
bool isReady() const
Definition:
TkStateMachine.h:27
TkStateMachine::statusName
std::string statusName()
Definition:
TkStateMachine.h:33
TkStateMachine::myStatus
StatusType myStatus
Definition:
TkStateMachine.h:44
TkStateMachine::isCalibrating
bool isCalibrating() const
Definition:
TkStateMachine.h:30
TkStateMachine::stuck
Definition:
TkStateMachine.h:15
TkStateMachine::updating
Definition:
TkStateMachine.h:15
TkStateMachine::setCalibrating
void setCalibrating()
Definition:
TkStateMachine.h:22
TkStateMachine::ready
Definition:
TkStateMachine.h:15
TkStateMachine::StatusType
StatusType
Definition:
TkStateMachine.h:15
Generated for CMSSW Reference Manual by
1.8.5