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
AsynchronousAlgorithm.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 2023-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
#pragma once
12
// ============================================================================
13
// Include files
14
// ============================================================================
15
// Gaudi
16
#include <
Gaudi/Algorithm.h
>
17
#include <
GaudiKernel/IHiveWhiteBoard.h
>
18
19
// Others
20
#include <boost/fiber/all.hpp>
21
#include <chrono>
22
23
namespace
Gaudi
{
34
class
GAUDI_API
AsynchronousAlgorithm
:
public
Gaudi::Algorithm
{
35
public
:
36
using
Gaudi::Algorithm::Algorithm
;
37
StatusCode
sysInitialize()
override
;
38
StatusCode
sysExecute(
const
EventContext
&
ctx
)
override
;
39
41
virtual
StatusCode
restoreAfterSuspend()
const
;
42
44
StatusCode
yield()
const
;
45
47
template
<
typename
Clock,
typename
Duration>
48
StatusCode
sleep_until
(
std::chrono::time_point<Clock, Duration>
const
& sleep_time )
const
{
49
boost::this_fiber::sleep_until( sleep_time );
50
return
restoreAfterSuspend();
51
}
52
54
template
<
typename
Rep,
typename
Period>
55
StatusCode
sleep_for
(
std::chrono::duration<Rep, Period>
const
& dur )
const
{
56
boost::this_fiber::sleep_for( dur );
57
return
restoreAfterSuspend();
58
}
59
60
private
:
62
boost::fibers::fiber_specific_ptr<std::size_t> s_currentSlot{};
63
};
64
}
// namespace Gaudi
std::chrono::duration
Gaudi::AsynchronousAlgorithm::sleep_until
StatusCode sleep_until(std::chrono::time_point< Clock, Duration > const &sleep_time) const
Forwards to boost::this_fiber::sleep_until.
Definition:
AsynchronousAlgorithm.h:48
GaudiPython.Pythonizations.ctx
ctx
Definition:
Pythonizations.py:578
StatusCode
Definition:
StatusCode.h:65
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition:
Algorithm.h:90
std::chrono::time_point
Gaudi::AsynchronousAlgorithm
Base class for asynchronous algorithms.
Definition:
AsynchronousAlgorithm.h:34
Algorithm.h
IHiveWhiteBoard.h
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition:
__init__.py:1
EventContext
Definition:
EventContext.h:34
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition:
Algorithm.h:101
Gaudi::AsynchronousAlgorithm::sleep_for
StatusCode sleep_for(std::chrono::duration< Rep, Period > const &dur) const
Forwards to boost::this_fiber::sleep_for.
Definition:
AsynchronousAlgorithm.h:55
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:81
GaudiKernel
include
Gaudi
AsynchronousAlgorithm.h
Generated on Mon Apr 7 2025 16:26:22 for The Gaudi Framework by
1.8.18