The Gaudi Framework
master (181af51f)
Loading...
Searching...
No Matches
FSMCallbackTestAlgo.cpp
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2024 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
#include <
Gaudi/Algorithm.h
>
12
#include <
Gaudi/FSMCallbackHolder.h
>
13
14
namespace
Gaudi::TestSuite
{
15
19
struct
FSMCallbackTestAlgo
:
FSMCallbackHolder
<Algorithm> {
20
FSMCallbackTestAlgo
(
const
std::string&
name
,
ISvcLocator
* pSvcLocator )
21
:
FSMCallbackHolder
<
Algorithm
>(
name
, pSvcLocator ) {
22
registerCallBack
(
StateMachine::INITIALIZE
, []() { std::cout <<
"Callback properly called at INITIALIZE\n"
; } );
23
registerCallBack
(
StateMachine::START
, []() { std::cout <<
"Callback properly called at START\n"
; } );
24
registerCallBack
(
StateMachine::STOP
, []() { std::cout <<
"Callback properly called at STOP\n"
; } );
25
registerCallBack
(
StateMachine::FINALIZE
, []() { std::cout <<
"Callback properly called at FINALIZE\n"
; } );
26
}
27
StatusCode
execute
(
const
EventContext
& )
const override
{
28
std::cout <<
"Executing\n"
;
29
return
StatusCode::SUCCESS
;
30
}
31
};
32
DECLARE_COMPONENT
( FSMCallbackTestAlgo );
33
34
}
// namespace Gaudi::TestSuite
FSMCallbackHolder.h
Algorithm.h
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition
PluginServiceV1.h:45
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:34
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition
Algorithm.h:87
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition
Algorithm.cpp:529
Gaudi::FSMCallbackHolder
Helper class to implement the IFSMCallbackHolder interface.
Definition
FSMCallbackHolder.h:37
Gaudi::FSMCallbackHolder< Algorithm >::registerCallBack
void registerCallBack(StateMachine::Transition s, IFSMCallbackHolder::CallBack c) override
Definition
FSMCallbackHolder.h:43
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition
ISvcLocator.h:42
StatusCode
This class is used for returning status codes from appropriate routines.
Definition
StatusCode.h:64
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition
StatusCode.h:99
Gaudi::StateMachine::STOP
@ STOP
Definition
StateMachine.h:36
Gaudi::StateMachine::INITIALIZE
@ INITIALIZE
Definition
StateMachine.h:34
Gaudi::StateMachine::START
@ START
Definition
StateMachine.h:35
Gaudi::StateMachine::FINALIZE
@ FINALIZE
Definition
StateMachine.h:37
Gaudi::TestSuite
Definition
ConditionAccessorHolder.h:21
Gaudi::TestSuite::FSMCallbackTestAlgo::FSMCallbackTestAlgo
FSMCallbackTestAlgo(const std::string &name, ISvcLocator *pSvcLocator)
Definition
FSMCallbackTestAlgo.cpp:20
Gaudi::TestSuite::FSMCallbackTestAlgo::execute
StatusCode execute(const EventContext &) const override
Definition
FSMCallbackTestAlgo.cpp:27
GaudiTestSuite
src
FSMCallback
FSMCallbackTestAlgo.cpp
Generated on Wed Oct 8 2025 09:53:38 for The Gaudi Framework by
1.13.1