15#ifndef ATHENASERVICES_RCUSVC_H
16#define ATHENASERVICES_RCUSVC_H
21#include "GaudiKernel/ServiceHandle.h"
22#include "GaudiKernel/IHiveWhiteBoard.h"
23#include "GaudiKernel/IIncidentSvc.h"
24#include "GaudiKernel/IIncidentListener.h"
25#include <unordered_map>
40 :
public extends<AthService, IRCUSvc, IIncidentListener>
48 RCUSvc (
const std::string& name, ISvcLocator* svc);
84 virtual void handle (
const Incident& inc)
override;
89 typedef std::unordered_set<IRCUObject*>
set_t;
102 typedef std::lock_guard<std::recursive_mutex>
lock_t;
read-copy-update (RCU) style synchronization for Athena.
Base object class for RCU-style synchronization for Athena.
RCUSvc(const std::string &name, ISvcLocator *svc)
Standard Gaudi constructor.
ServiceHandle< IInterface > m_hiveWhiteBoardSvc
The hive WB service. Used to get the current number of slots.
virtual size_t getNumSlots() const override
Return the current number of event slots.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
std::recursive_mutex m_mutex
Mutex protecting access to m_objs.
virtual void add(IRCUObject *obj) override
Add a new RCU object to the set being managed.
std::unordered_set< IRCUObject * > set_t
Set of managed objects.
virtual StatusCode remove(IRCUObject *obj) override
Remove an RCU object to the set being managed.
ServiceHandle< IIncidentSvc > m_incidentSvc
Gaudi incident service.
std::lock_guard< std::recursive_mutex > lock_t
virtual void handle(const Incident &inc) override
Gaudi incident handler.
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....