The Gaudi Framework
v25r5
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
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
compareRootHistos.state
tuple state
Definition:
compareRootHistos.py:269
Gaudi::StateMachine::INITIALIZED
Definition:
StateMachine.h:15
GaudiException
Define general base for Gaudi exception.
Definition:
GaudiException.h:24
Gaudi::StateMachine::CONFIGURED
Definition:
StateMachine.h:14
GaudiMP.FdsRegistry.msg
tuple msg
Definition:
FdsRegistry.py:8
Gaudi::StateMachine::FINALIZE
Definition:
StateMachine.h:28
Gaudi::StateMachine::State
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition:
StateMachine.h:12
Gaudi::StateMachine::CONFIGURE
Definition:
StateMachine.h:24
Gaudi::StateMachine::INITIALIZE
Definition:
StateMachine.h:25
StatusCode::FAILURE
Definition:
StatusCode.h:33
StatusCode
This class is used for returning status codes from appropriate routines.
Definition:
StatusCode.h:30
Gaudi::StateMachine::STOP
Definition:
StateMachine.h:27
Gaudi::StateMachine::RUNNING
Definition:
StateMachine.h:16
Gaudi::StateMachine::ChangeState
State GAUDI_API ChangeState(const Transition transition, const State state)
Function to get the new state according to the required transition, checking if the transition is all...
Definition:
StateMachine.cpp:8
Gaudi::StateMachine::TERMINATE
Definition:
StateMachine.h:29
Gaudi::StateMachine::Transition
Transition
Allowed transitions between states.
Definition:
StateMachine.h:23
Gaudi::StateMachine::START
Definition:
StateMachine.h:26
Gaudi
This is a number of static methods for bootstrapping the Gaudi framework.
Definition:
Bootstrap.h:14
Gaudi::StateMachine::OFFLINE
Definition:
StateMachine.h:13
StateMachine.h
GaudiKernel
src
Lib
StateMachine.cpp
Generated on Tue Oct 21 2014 11:36:22 for The Gaudi Framework by
1.8.7