The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
StateMachine.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
14
15namespace Gaudi {
16 namespace StateMachine {
21 enum State {
26 // FINALIZED = CONFIGURED
27 };
28
33 CONFIGURE, // OFFLINE -> CONFIGURED
34 INITIALIZE, // CONFIGURED -> INITIALIZED
35 START, // INITIALIZED -> RUNNING
36 STOP, // RUNNING -> INITIALIZED
37 FINALIZE, // INITIALIZED -> CONFIGURED
38 TERMINATE // CONFIGURED -> OFFLINE
39 };
40
45 State GAUDI_API ChangeState( const Transition transition, const State state );
46
48 inline std::ostream& operator<<( std::ostream& s, const Gaudi::StateMachine::State& st ) {
49 switch ( st ) {
51 return s << "OFFLINE";
53 return s << "CONFIGURED";
55 return s << "INITIALIZED";
57 return s << "RUNNING";
58 default:
59 return s;
60 }
61 }
62
64 inline std::ostream& operator<<( std::ostream& s, const Gaudi::StateMachine::Transition& t ) {
65 switch ( t ) {
67 return s << "CONFIGURE";
69 return s << "INITIALIZE";
71 return s << "START";
73 return s << "STOP";
75 return s << "FINALIZE";
77 return s << "TERMINATE";
78 default:
79 return s;
80 }
81 }
82
83 } // namespace StateMachine
84} // namespace Gaudi
#define GAUDI_API
Definition Kernel.h:49
std::ostream & operator<<(std::ostream &s, const Gaudi::StateMachine::State &st)
Pretty print of states.
Transition
Allowed transitions between states.
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...
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm,...
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1