ATLAS Offline Software
IRCUSvc.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 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #ifndef ATHENAKERNEL_IRCUSVC_H
17 #define ATHENAKERNEL_IRCUSVC_H
18 
19 
20 #include "AthenaKernel/RCUObject.h"
21 #include "GaudiKernel/IInterface.h"
22 #include <memory>
23 
24 
25 namespace Athena {
26 
27 
38 class IRCUSvc
39  : virtual public IInterface
40 {
41 public:
43 
44 
51  template <class T, typename... Args>
52  std::unique_ptr<RCUObject<T> > newrcu (Args&&... args)
53  {
54  return std::make_unique<RCUObject<T> > (*this, std::forward<Args>(args)...);
55  }
56 
57 
62  virtual void add (IRCUObject* obj) = 0;
63 
64 
69  virtual StatusCode remove (IRCUObject* obj) = 0;
70 
71 
75  virtual size_t getNumSlots() const = 0;
76 };
77 
78 
79 } // namespace Athena
80 
81 
82 #endif // not ATHENAKERNEL_IRCUSVC_H
RCUObject.h
read-copy-update (RCU) style synchronization for Athena.
Athena::IRCUSvc::add
virtual void add(IRCUObject *obj)=0
Add a new RCU object to the set being managed.
Args
Definition: test_lwtnn_fastgraph.cxx:12
Athena::IRCUSvc::DeclareInterfaceID
DeclareInterfaceID(IRCUSvc, 1, 0)
Athena::IRCUSvc::getNumSlots
virtual size_t getNumSlots() const =0
Return the number of event slots.
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Athena::IRCUSvc
Interface for RCU service.
Definition: IRCUSvc.h:40
Athena::IRCUSvc::remove
virtual StatusCode remove(IRCUObject *obj)=0
Remove an object from the service.
Athena::IRCUSvc::newrcu
std::unique_ptr< RCUObject< T > > newrcu(Args &&... args)
Make a new RCU object.
Definition: IRCUSvc.h:52
Athena::IRCUObject
Base object class for RCU-style synchronization for Athena.
Definition: RCUObject.h:146
python.PyAthena.obj
obj
Definition: PyAthena.py:135
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80