1 #ifndef IncidentSvc_IncidentSvc_H 2 #define IncidentSvc_IncidentSvc_H 21 #include "tbb/concurrent_queue.h" 22 #include "tbb/concurrent_unordered_map.h" 35 struct isSingleShot_t;
47 : iListener( il ), priority( pri ), rethrow( thr ), singleShot( single )
105 tbb::concurrent_unordered_map<EventContext, IncQueue_t, EventContextHash, EventContextHash>
m_firedIncidents;
ChronoEntity m_timer
timer & it's lock
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const std::string & name() const override
Retrieve name of the service.
StatusCode finalize() override
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false) override
IIncidentSvc::IncidentPack getIncidents(const EventContext *ctx) override
ListenerMap::iterator removeListenerFromList(ListenerMap::iterator, IIncidentListener *item, bool scheduleRemoval)
std::list< Listener > ListenerList
This class represents an entry point to all the event specific data.
IncidentSvc(const std::string &name, ISvcLocator *svc)
The interface implemented by any class wanting to listen to Incidents.
std::recursive_mutex m_listenerMapMutex
Mutex to synchronize access to m_listenerMap.
This class is used for returning status codes from appropriate routines.
void removeListener(IIncidentListener *l, const std::string &type="") override
StatusCode initialize() override
const std::string * m_currentIncidentType
Incident being fired.
Listener(IIncidentListener *il, long pri, bool thr=false, bool single=false)
IIncidentListener * iListener
tbb::concurrent_queue< Incident * > IncQueue_t
tbb::concurrent_unordered_map< EventContext, IncQueue_t, EventContextHash, EventContextHash > m_firedIncidents
void getListeners(std::vector< IIncidentListener * > &lis, const std::string &type="") const override
map_type::iterator iterator
Base class used to extend a class implementing other interfaces.
void i_fireIncident(const Incident &incident, const std::string &type)
Internal function to allow incidents listening to all events.
Base class for all Incidents (computing events).
Common class providing an architecture-independent hash map.
void fireIncident(const Incident &incident) override
ListenerMap m_listenerMap
List of auditor names.
Default implementation of the IIncidentSvc interface.
GaudiUtils::HashMap< Gaudi::StringKey, std::unique_ptr< ListenerList > > ListenerMap