ATLAS Offline Software
RCUUpdater.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration.
4  */
5 // $Id$
14 #ifndef ATHENAKERNEL_RCUUPDATER_H
15 #define ATHENAKERNEL_RCUUPDATER_H
16 
17 
18 #include "AthenaKernel/RCUObject.h"
19 #include "AthenaKernel/IRCUSvc.h"
20 #include "GaudiKernel/EventContext.h"
21 #include "GaudiKernel/ThreadLocalContext.h"
22 #include <utility>
23 #include <memory>
24 
25 
26 namespace Athena {
27 
28 
37 template <class T>
39 {
40 public:
42  typedef EventContext Context_t;
43 
44 
52  template <typename... Args>
53  RCUUpdater (IRCUSvc& rcusvc, Args&&... args);
54 
55 
64  void update (std::unique_ptr<T> p, const Context_t& ctx);
65 
66 
70  const T& get() const;
71 
72 
76  void quiescent (const Context_t& ctx);
77 
78 
89  void discard (std::unique_ptr<T> p);
90 
91 
95  static const Context_t& defaultContext();
96 
97 
98 private:
101 };
102 
103 
104 } // namespace Athena
105 
106 
108 
109 
110 #endif // not ATHENAKERNEL_RCUUPDATER_H
Athena::RCUUpdater::m_obj
RCUObject< T > m_obj
The managed object.
Definition: RCUUpdater.h:100
Athena::RCUObject
Wrapper object controlled by RCU synchonization.
Definition: RCUObject.h:322
RCUObject.h
read-copy-update (RCU) style synchronization for Athena.
Athena::RCUUpdater::quiescent
void quiescent(const Context_t &ctx)
Mark that an event slot is not referencing this object.
Args
Definition: test_lwtnn_fastgraph.cxx:12
RCUUpdater.icc
Athena::RCUUpdater::RCUUpdater
RCUUpdater(IRCUSvc &rcusvc, Args &&... args)
Constructor.
IRCUSvc.h
read-copy-update (RCU) style synchronization for Athena.
Athena::RCUUpdater::discard
void discard(std::unique_ptr< T > p)
Queue an object for later deletion.
Athena::RCUUpdater::Context_t
EventContext Context_t
Execution context type.
Definition: RCUUpdater.h:42
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
Athena::RCUUpdater::defaultContext
static const Context_t & defaultContext()
Return the current event context.
Athena::RCUUpdater
Implementation of Updater for RCUSvc.
Definition: RCUUpdater.h:39
Athena::IRCUSvc
Interface for RCU service.
Definition: IRCUSvc.h:40
Athena::RCUUpdater::get
const T & get() const
Return a reference to the current object.
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
Athena::RCUUpdater::update
void update(std::unique_ptr< T > p, const Context_t &ctx)
Install a new object.