Gaudi Framework, version v23r9
Home
Generated: Thu Jul 18 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiKernel
GaudiKernel
StateMachine.h
Go to the documentation of this file.
1
#ifndef GAUDIKERNEL_STATEMACHINE_H_
2
#define GAUDIKERNEL_STATEMACHINE_H_
3
4
#include "
GaudiKernel/GaudiException.h
"
5
6
namespace
Gaudi
{
7
namespace
StateMachine {
12
enum
State
{
13
OFFLINE
,
14
CONFIGURED
,
15
INITIALIZED
,
16
RUNNING
//,
17
//FINALIZED = CONFIGURED
18
};
19
23
enum
Transition
{
24
CONFIGURE
,
// OFFLINE -> CONFIGURED
25
INITIALIZE
,
// CONFIGURED -> INITIALIZED
26
START
,
// INITIALIZED -> RUNNING
27
STOP
,
// RUNNING -> INITIALIZED
28
FINALIZE
,
// INITIALIZED -> CONFIGURED
29
TERMINATE
// CONFIGURED -> OFFLINE
30
};
31
36
State
GAUDI_API
ChangeState
(
const
Transition
transition,
const
State
state
);
37
38
}
// namespace Gaudi
39
}
// namespace StateMachine
40
42
inline
std::ostream
&
operator <<
(
std::ostream
&
s
,
const
Gaudi::StateMachine::State
&st) {
43
switch
(st) {
44
case
Gaudi::StateMachine::OFFLINE
:
return
s <<
"OFFLINE"
;
45
case
Gaudi::StateMachine::CONFIGURED
:
return
s <<
"CONFIGURED"
;
46
case
Gaudi::StateMachine::INITIALIZED
:
return
s <<
"INITIALIZED"
;
47
case
Gaudi::StateMachine::RUNNING
:
return
s <<
"RUNNING"
;
48
}
49
return
s
;
// cannot be reached, but make the compiler happy
50
}
51
53
inline
std::ostream
&
operator <<
(
std::ostream
&
s
,
const
Gaudi::StateMachine::Transition
&t) {
54
switch
(t) {
55
case
Gaudi::StateMachine::CONFIGURE
:
return
s <<
"CONFIGURE"
;
56
case
Gaudi::StateMachine::INITIALIZE
:
return
s <<
"INITIALIZE"
;
57
case
Gaudi::StateMachine::START
:
return
s <<
"START"
;
58
case
Gaudi::StateMachine::STOP
:
return
s <<
"STOP"
;
59
case
Gaudi::StateMachine::FINALIZE
:
return
s <<
"FINALIZE"
;
60
case
Gaudi::StateMachine::TERMINATE
:
return
s <<
"TERMINATE"
;
61
}
62
return
s
;
// cannot be reached, but make the compiler happy
63
}
64
65
#endif
/*GAUDIKERNEL_STATEMACHINE_H_*/
Generated at Thu Jul 18 2013 12:18:03 for Gaudi Framework, version v23r9 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004