ATLAS Offline Software
Loading...
Searching...
No Matches
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
17#include "Gaudi/AsynchronousAlgorithm.h"
18
19// Other includes
20#include <boost/fiber/all.hpp>
21
28 : public AthCommonReentrantAlgorithm<Gaudi::AsynchronousAlgorithm> {
30 Gaudi::AsynchronousAlgorithm>::AthCommonReentrantAlgorithm;
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
44};
45
46#endif //> !ATHENABASECOMPS_ATHASYNCHRONOUSALGORITHM_H
Define macros for attributes used to control the static checker.
An algorithm that can be suspended while work is offloaded to an accelerator.
virtual StatusCode restoreAfterSuspend() const override
Restore after suspend.
StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
boost::fibers::fiber_specific_ptr< EventContext > m_currentCtx ATLAS_THREAD_SAFE
Pointer to current context.
AthCommonReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)