ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaBaseComps
AthenaBaseComps
AthAsynchronousAlgorithm.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2024 - 2025 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// AthAsynchronousAlgorithm.h
8
// Header file for class AthAsynchronousAlgorithm
9
// Author: Beojan Stanislaus
11
#ifndef ATHENABASECOMPS_ATHASYNCHRONOUSALGORITHM_H
12
#define ATHENABASECOMPS_ATHASYNCHRONOUSALGORITHM_H 1
13
14
// Framework includes
15
#include "
AthenaBaseComps/AthCommonAlgorithm.h
"
16
#include "
CxxUtils/checker_macros.h
"
17
#include "Gaudi/AsynchronousAlgorithm.h"
18
19
// Other includes
20
#include <boost/fiber/all.hpp>
21
27
class
AthAsynchronousAlgorithm
28
:
public
AthCommonAlgorithm
<Gaudi::AsynchronousAlgorithm> {
29
using
AthCommonAlgorithm
<
30
Gaudi::AsynchronousAlgorithm>
::AthCommonAlgorithm
;
31
32
public
:
33
StatusCode
sysExecute
(
const
EventContext& ctx)
override
;
34
36
virtual
StatusCode
restoreAfterSuspend
()
const override
;
37
38
protected
:
39
// This is local to each fiber so it can't be accessed from multiple threads
40
// at once
42
mutable
boost::fibers::fiber_specific_ptr<EventContext> m_currentCtx
43
ATLAS_THREAD_SAFE
{
nullptr
};
44
};
45
46
#endif
//> !ATHENABASECOMPS_ATHASYNCHRONOUSALGORITHM_H
AthCommonAlgorithm.h
checker_macros.h
Define macros for attributes used to control the static checker.
AthAsynchronousAlgorithm
An algorithm that can be suspended while work is offloaded to an accelerator.
Definition
AthAsynchronousAlgorithm.h:28
AthAsynchronousAlgorithm::restoreAfterSuspend
virtual StatusCode restoreAfterSuspend() const override
Restore after suspend.
Definition
AthAsynchronousAlgorithm.cxx:30
AthAsynchronousAlgorithm::sysExecute
StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition
AthAsynchronousAlgorithm.cxx:11
AthAsynchronousAlgorithm::ATLAS_THREAD_SAFE
boost::fibers::fiber_specific_ptr< EventContext > m_currentCtx ATLAS_THREAD_SAFE
Pointer to current context.
Definition
AthAsynchronousAlgorithm.h:43
AthCommonAlgorithm< Gaudi::AsynchronousAlgorithm >::AthCommonAlgorithm
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition
AthCommonAlgorithm.cxx:17
Generated on
for ATLAS Offline Software by
1.17.0