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.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
39
inline
std::ostream &
operator <<
(std::ostream &
s
,
const
Gaudi::StateMachine::State
&st) {
40
switch
(st) {
41
case
Gaudi::StateMachine::OFFLINE
:
return
s <<
"OFFLINE"
;
42
case
Gaudi::StateMachine::CONFIGURED
:
return
s <<
"CONFIGURED"
;
43
case
Gaudi::StateMachine::INITIALIZED
:
return
s <<
"INITIALIZED"
;
44
case
Gaudi::StateMachine::RUNNING
:
return
s <<
"RUNNING"
;
45
}
46
return
s
;
// cannot be reached, but make the compiler happy
47
}
48
50
inline
std::ostream &
operator <<
(std::ostream &
s
,
const
Gaudi::StateMachine::Transition
&t) {
51
switch
(t) {
52
case
Gaudi::StateMachine::CONFIGURE
:
return
s <<
"CONFIGURE"
;
53
case
Gaudi::StateMachine::INITIALIZE
:
return
s <<
"INITIALIZE"
;
54
case
Gaudi::StateMachine::START
:
return
s <<
"START"
;
55
case
Gaudi::StateMachine::STOP
:
return
s <<
"STOP"
;
56
case
Gaudi::StateMachine::FINALIZE
:
return
s <<
"FINALIZE"
;
57
case
Gaudi::StateMachine::TERMINATE
:
return
s <<
"TERMINATE"
;
58
}
59
return
s
;
// cannot be reached, but make the compiler happy
60
}
61
62
}
// namespace StateMachine
63
}
// namespace Gaudi
64
65
#endif
/*GAUDIKERNEL_STATEMACHINE_H_*/
compareRootHistos.state
tuple state
Definition:
compareRootHistos.py:269
Gaudi::StateMachine::INITIALIZED
Definition:
StateMachine.h:15
Gaudi::StateMachine::CONFIGURED
Definition:
StateMachine.h:14
Gaudi::StateMachine::FINALIZE
Definition:
StateMachine.h:28
Gaudi::StateMachine::operator<<
std::ostream & operator<<(std::ostream &s, const Gaudi::StateMachine::State &st)
Pretty print of states.
Definition:
StateMachine.h:39
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
GaudiException.h
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
gaudirun.s
string s
Definition:
gaudirun.py:210
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
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:108
GaudiKernel
GaudiKernel
StateMachine.h
Generated on Tue Oct 21 2014 11:36:22 for The Gaudi Framework by
1.8.7