Gaudi Framework, version v23r6
Home
Generated: Wed Jan 30 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
src
Lib
StateMachine.cpp
Go to the documentation of this file.
1
#include "
GaudiKernel/StateMachine.h
"
2
3
namespace
Gaudi
{
namespace
StateMachine {
8
State
ChangeState
(
const
Transition
transition,
const
State
state
) {
9
switch
(transition) {
10
case
CONFIGURE
:
11
if
(
OFFLINE
== state ) {
12
return
CONFIGURED
;
13
}
14
break
;
15
case
INITIALIZE
:
16
if
(
CONFIGURED
== state ) {
17
return
INITIALIZED
;
18
}
19
break
;
20
case
START
:
21
if
(
INITIALIZED
== state ) {
22
return
RUNNING
;
23
}
24
break
;
25
case
STOP
:
26
if
(
RUNNING
== state ) {
27
return
INITIALIZED
;
28
}
29
break
;
30
case
FINALIZE
:
31
if
(
INITIALIZED
== state ) {
32
return
CONFIGURED
;
33
}
34
break
;
35
case
TERMINATE
:
36
if
(
CONFIGURED
== state ) {
37
return
OFFLINE
;
38
}
39
break
;
40
}
41
std::stringstream
msg
;
42
msg <<
"Invalid transition '"
<< transition <<
"' from state '"
<< state <<
"'"
;
43
throw
GaudiException
(msg.str(),
"Gaudi::StateMachine::ChangeState"
,
44
StatusCode
(
StatusCode::FAILURE
,
true
));
45
return
OFFLINE
;
// never reached, but maked the compiler happy
46
}
47
48
} }
// namespace Gaudi::StateMachine
Generated at Wed Jan 30 2013 17:13:40 for Gaudi Framework, version v23r6 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004