The Gaudi Framework
master (f31105fd)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
q
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
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
std::string
STL class.
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition:
Algorithm.cpp:526
Gaudi::TestSuite::FSMCallbackTestAlgo
Example of usage of callbacks, when using CallbackHolder.
Definition:
FSMCallbackTestAlgo.cpp:19
Gaudi::StateMachine::FINALIZE
@ FINALIZE
Definition:
StateMachine.h:38
ISvcLocator
Definition:
ISvcLocator.h:46
Gaudi::TestSuite::FSMCallbackTestAlgo::FSMCallbackTestAlgo
FSMCallbackTestAlgo(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
FSMCallbackTestAlgo.cpp:20
Gaudi::StateMachine::INITIALIZE
@ INITIALIZE
Definition:
StateMachine.h:35
FSMCallbackHolder.h
StatusCode
Definition:
StatusCode.h:65
Gaudi::FSMCallbackHolder
Helper class to implement the IFSMCallbackHolder interface.
Definition:
FSMCallbackHolder.h:37
std::cout
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition:
Algorithm.h:90
Algorithm.h
Gaudi::TestSuite
Definition:
ConditionAccessorHolder.h:21
Gaudi::TestSuite::FSMCallbackTestAlgo::execute
StatusCode execute(const EventContext &) const override
Definition:
FSMCallbackTestAlgo.cpp:27
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition:
StatusCode.h:100
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition:
PluginServiceV1.h:46
Gaudi::StateMachine::START
@ START
Definition:
StateMachine.h:36
EventContext
Definition:
EventContext.h:34
Gaudi::FSMCallbackHolder< Algorithm >::registerCallBack
void registerCallBack(StateMachine::Transition s, IFSMCallbackHolder::CallBack c) override
Definition:
FSMCallbackHolder.h:43
Gaudi::StateMachine::STOP
@ STOP
Definition:
StateMachine.h:37
GaudiTestSuite
src
FSMCallback
FSMCallbackTestAlgo.cpp
Generated on Mon Apr 7 2025 16:26:25 for The Gaudi Framework by
1.8.18