19#include <tbb/concurrent_queue.h>
20#include <tbb/concurrent_unordered_map.h>
48 bool singleShot =
false )
override;
52 void fireIncident( std::unique_ptr<Incident> incident )
override;
54 void getListeners( std::vector<IIncidentListener*>& lis,
const std::string& type =
"" )
const override;
80 typedef tbb::concurrent_queue<std::unique_ptr<Incident>>
IncQueue_t;
84 tbb::concurrent_unordered_map<EventContext::ContextID_t, EventContext::ContextEvt_t>
m_slotEvent;
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
This class represents an entry point to all the event specific data.
Common class providing an architecture-independent hash map.
The interface implemented by any class wanting to listen to Incidents.
std::vector< std::pair< std::unique_ptr< Incident >, std::vector< Listener > > > IncidentPack
List of incidents and their listeners.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Base class for all Incidents (computing events).
GaudiUtils::HashMap< Gaudi::StringKey, std::unique_ptr< ListenerList > > ListenerMap
void removeListener(IIncidentListener *l, const std::string &type="") override
StatusCode finalize() override
tbb::concurrent_queue< std::unique_ptr< Incident > > IncQueue_t
ListenerMap::iterator removeListenerFromList(ListenerMap::iterator, IIncidentListener *item, bool scheduleRemoval)
IIncidentSvc::IncidentPack getIncidents(const EventContext *ctx) override
tbb::concurrent_unordered_map< EventContext::ContextID_t, EventContext::ContextEvt_t > m_slotEvent
Event ID for each slot.
std::list< IIncidentSvc::Listener > ListenerList
tbb::concurrent_unordered_map< EventContext::ContextID_t, IncQueue_t > m_firedIncidents
void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false) override
const std::string * m_currentIncidentType
Incident being fired.
ChronoEntity m_timer
timer & it's lock
void i_fireIncident(const Incident &incident, const std::string &type)
Internal function to allow incidents listening to all events.
ListenerMap m_listenerMap
List of auditor names.
std::recursive_mutex m_listenerMapMutex
Mutex to synchronize access to m_listenerMap.
IncidentSvc(const std::string &name, ISvcLocator *svc)
void fireIncident(const Incident &incident) override
void getListeners(std::vector< IIncidentListener * > &lis, const std::string &type="") const override
const std::string & name() const override
Retrieve name of the service.
This class is used for returning status codes from appropriate routines.
Base class used to extend a class implementing other interfaces.