| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# StateMachine.h File Reference

`#include "GaudiKernel/GaudiException.h"`

Include dependency graph for StateMachine.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | Gaudi
namespace | Gaudi::StateMachine
## Enumerations
enum | Gaudi::StateMachine::State { Gaudi::StateMachine::OFFLINE, Gaudi::StateMachine::CONFIGURED, Gaudi::StateMachine::INITIALIZED, Gaudi::StateMachine::RUNNING }
| Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool). More...
enum | Gaudi::StateMachine::Transition { Gaudi::StateMachine::CONFIGURE, Gaudi::StateMachine::INITIALIZE, Gaudi::StateMachine::START, Gaudi::StateMachine::STOP, Gaudi::StateMachine::FINALIZE, Gaudi::StateMachine::TERMINATE }
| Allowed transitions between states. More...
## Functions
State GAUDI_API | Gaudi::StateMachine::ChangeState (const Transition transition, const State state)
| Function to get the new state according to the required transition, checking if the transition is allowed.
std::ostream & | operator<< (std::ostream &s, const Gaudi::StateMachine::State &st)
| Pretty print of states.
std::ostream & | operator<< (std::ostream &s, const Gaudi::StateMachine::Transition &t)
| Pretty print of transitions.

## Function Documentation

std::ostream& operator<< | ( | std::ostream & | s,
|  | const Gaudi::StateMachine::Transition & | t |
| ) |  |  | `[inline]`

Pretty print of transitions.

Definition at line 53 of file StateMachine.h.

    00053                                                                                        {
    00054   switch (t) {
    00055   case Gaudi::StateMachine::CONFIGURE  : return s << "CONFIGURE";
    00056   case Gaudi::StateMachine::INITIALIZE : return s << "INITIALIZE";
    00057   case Gaudi::StateMachine::START      : return s << "START";
    00058   case Gaudi::StateMachine::STOP       : return s << "STOP";
    00059   case Gaudi::StateMachine::FINALIZE   : return s << "FINALIZE";
    00060   case Gaudi::StateMachine::TERMINATE  : return s << "TERMINATE";
    00061   }
    00062   return s; // cannot be reached, but make the compiler happy
    00063 }

std::ostream& operator<< | ( | std::ostream & | s,
|  | const Gaudi::StateMachine::State & | st |
| ) |  |  | `[inline]`

Pretty print of states.

Definition at line 42 of file StateMachine.h.

    00042                                                                                    {
    00043   switch (st) {
    00044   case Gaudi::StateMachine::OFFLINE     : return s << "OFFLINE";
    00045   case Gaudi::StateMachine::CONFIGURED  : return s << "CONFIGURED";
    00046   case Gaudi::StateMachine::INITIALIZED : return s << "INITIALIZED";
    00047   case Gaudi::StateMachine::RUNNING     : return s << "RUNNING";
    00048   }
    00049   return s; // cannot be reached, but make the compiler happy
    00050 }