The Gaudi Framework  v36r0 (4abb4d13)
IncidentSvc Class Reference

Default implementation of the IIncidentSvc interface. More...

#include </builds/gaudi/Gaudi/GaudiCoreSvc/src/IncidentSvc/IncidentSvc.h>

Inheritance diagram for IncidentSvc:
Collaboration diagram for IncidentSvc:

Public Member Functions

StatusCode finalize () override
 
void addListener (IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false) override
 
void removeListener (IIncidentListener *l, const std::string &type="") override
 
void fireIncident (const Incident &incident) override
 
void fireIncident (std::unique_ptr< Incident > incident) override
 
void getListeners (std::vector< IIncidentListener * > &lis, const std::string &type="") const override
 
 IncidentSvc (const std::string &name, ISvcLocator *svc)
 
 ~IncidentSvc () override
 
IIncidentSvc::IncidentPack getIncidents (const EventContext *ctx) override
 
- Public Member Functions inherited from extends< Service, IIncidentSvc >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service
More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service
More...
 
StatusCode sysStart () override
 Initialize Service
More...
 
StatusCode sysStop () override
 Initialize Service
More...
 
StatusCode sysFinalize () override
 Finalize Service
More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor
More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator
More...
 
StatusCode setProperties ()
 
template<class T >
StatusCode service (const std::string &name, const T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
template<class T >
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T >
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property. More...
 
virtual StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p)=0
 Set the property from a property with a different name. More...
 
virtual StatusCode setProperty (const std::string &s)=0
 Set the property by string. More...
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals. More...
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string. More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name More...
 
StatusCode getProperty (std::string_view n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (std::string_view name) const override
 Return true if we have a property with the given name. More...
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected More...
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Private Types

typedef std::list< IIncidentSvc::ListenerListenerList
 
typedef GaudiUtils::HashMap< Gaudi::StringKey, std::unique_ptr< ListenerList > > ListenerMap
 
typedef tbb::concurrent_queue< Incident * > IncQueue_t
 

Private Member Functions

ListenerMap::iterator removeListenerFromList (ListenerMap::iterator, IIncidentListener *item, bool scheduleRemoval)
 
void i_fireIncident (const Incident &incident, const std::string &type)
 Internal function to allow incidents listening to all events. More...
 

Private Attributes

ListenerMap m_listenerMap
 List of auditor names. More...
 
const std::stringm_currentIncidentType = nullptr
 Incident being fired. More...
 
std::recursive_mutex m_listenerMapMutex
 Mutex to synchronize access to m_listenerMap. More...
 
ChronoEntity m_timer
 timer & it's lock More...
 
bool m_timerLock = false
 
tbb::concurrent_unordered_map< EventContext::ContextID_t, IncQueue_tm_firedIncidents
 
tbb::concurrent_unordered_map< EventContext::ContextID_t, EventContext::ContextEvt_tm_slotEvent
 Event ID for each slot. More...
 

Additional Inherited Members

- Public Types inherited from extends< Service, IIncidentSvc >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 Standard Destructor
More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state
More...
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
 flag indicating whether ToolHandle tools have been added to m_tools More...
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
 
Gaudi::Property< bool > m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
 
Gaudi::Property< bool > m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
 
Gaudi::Property< bool > m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
 
Gaudi::Property< bool > m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
 
Gaudi::Property< bool > m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
 
Gaudi::Property< bool > m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
 
Gaudi::Property< bool > m_autoRetrieveTools {this, "AutoRetrieveTools", true, "retrieve all AlgTools during initialize"}
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service
More...
 

Detailed Description

Default implementation of the IIncidentSvc interface.

This implementation is thread-safe with the following features:

Definition at line 48 of file IncidentSvc.h.

Member Typedef Documentation

◆ IncQueue_t

typedef tbb::concurrent_queue<Incident*> IncidentSvc::IncQueue_t
private

Definition at line 99 of file IncidentSvc.h.

◆ ListenerList

Definition at line 53 of file IncidentSvc.h.

◆ ListenerMap

Constructor & Destructor Documentation

◆ IncidentSvc()

IncidentSvc::IncidentSvc ( const std::string name,
ISvcLocator svc 
)

Definition at line 59 of file IncidentSvc.cpp.

59 : base_class( name, svc ) {}

◆ ~IncidentSvc()

IncidentSvc::~IncidentSvc ( )
override

Definition at line 61 of file IncidentSvc.cpp.

61 { auto lock = std::scoped_lock{m_listenerMapMutex}; }

Member Function Documentation

◆ addListener()

void IncidentSvc::addListener ( IIncidentListener lis,
const std::string type = "",
long  priority = 0,
bool  rethrow = false,
bool  singleShot = false 
)
override

Definition at line 82 of file IncidentSvc.cpp.

83  {
84  static const std::string all{"ALL"};
85  auto lock = std::scoped_lock{m_listenerMapMutex};
86 
87  const std::string& ltype = ( !type.empty() ? type : all );
88 
89  // find if the type already exists
90  auto itMap = m_listenerMap.find( ltype );
91  if ( itMap == m_listenerMap.end() ) {
92  // if not found, create and insert now a list of listeners
93  auto p = m_listenerMap.insert( {ltype, std::make_unique<ListenerList>()} );
94  if ( !p.second ) { /* OOPS */
95  }
96  itMap = p.first;
97  }
98  auto& llist = *itMap->second;
99  // add Listener ordered by priority -- higher priority first,
100  // and then add behind listeneres with the same priority
101  // -- so we skip over all items with higher or same priority
102  auto i = std::partition_point( std::begin( llist ), std::end( llist ),
103  [&]( const Listener& j ) { return j.priority >= prio; } );
104  // We insert before the current position
105  DEBMSG << "Adding [" << type << "] listener '" << getListenerName( lis ) << "' with priority " << prio << endmsg;
106  llist.emplace( i, std::move( IIncidentSvc::Listener{lis, prio, rethrow, singleShot} ) );
107 }

◆ finalize()

StatusCode IncidentSvc::finalize ( )
override

Definition at line 63 of file IncidentSvc.cpp.

63  {
64  DEBMSG << m_timer.outputUserTime( "Incident timing: Mean(+-rms)/Min/Max:%3%(+-%4%)/%6%/%7%[ms] ", System::milliSec )
65  << m_timer.outputUserTime( "Total:%2%[s]", System::Sec ) << endmsg;
66 
67  {
68  // clear the local storage of allocated Incident objects.
69  for ( auto& fi : m_firedIncidents ) {
70  std::for_each( fi.second.unsafe_begin(), fi.second.unsafe_end(), []( auto i ) { delete i; } );
71  fi.second.clear();
72  }
73  m_firedIncidents.clear();
74  }
75 
76  // Finalize this specific service
77  return Service::finalize();
78 }

◆ fireIncident() [1/2]

void IncidentSvc::fireIncident ( const Incident incident)
override

Definition at line 222 of file IncidentSvc.cpp.

222  {
223 
225 
226  // Call specific listeners
227  i_fireIncident( incident, incident.type() );
228  // Try listeners registered for ALL incidents
229  if ( incident.type() != "ALL" ) { // avoid double calls if somebody fires the incident "ALL"
230  i_fireIncident( incident, "ALL" );
231  }
232 }

◆ fireIncident() [2/2]

void IncidentSvc::fireIncident ( std::unique_ptr< Incident incident)
override

Definition at line 234 of file IncidentSvc.cpp.

234  {
235 
236  const EventContext& ctx = incident->context();
237  DEBMSG << "Async incident '" << incident->type() << "' fired on context " << ctx << endmsg;
238 
239  // create or get incident queue for slot
240  auto [incItr, inserted1] = m_firedIncidents.insert( {ctx.slot(), IncQueue_t()} );
241  // save or get current event for slot
242  auto [slotItr, inserted2] = m_slotEvent.insert( {ctx.slot(), ctx.evt()} );
243 
244  // if new event in slot, clear all remaining old incidents
245  if ( slotItr->second != ctx.evt() ) {
246  slotItr->second = ctx.evt();
247 
248  if ( msgLevel( MSG::DEBUG ) and !incItr->second.empty() ) {
249  debug() << "Clearing remaining obsolete incidents from slot " << ctx.slot() << ":";
250  Incident* inc( nullptr );
251  while ( incItr->second.try_pop( inc ) ) { debug() << " " << inc->type() << "(" << inc->context() << ")"; }
252  debug() << endmsg;
253  }
254  incItr->second.clear();
255  }
256  incItr->second.push( incident.release() );
257 }

◆ getIncidents()

IIncidentSvc::IncidentPack IncidentSvc::getIncidents ( const EventContext ctx)
override

Definition at line 277 of file IncidentSvc.cpp.

277  {
279  if ( ctx ) {
280  auto incs = m_firedIncidents.find( ctx->slot() );
281  if ( incs != m_firedIncidents.end() ) {
282  Incident* inc( nullptr );
283 
284  DEBMSG << "Collecting listeners fired on context " << *ctx << endmsg;
285  while ( incs->second.try_pop( inc ) ) {
286  // ensure incident is for this event (should not be necessary)
287  if ( inc->context().evt() == ctx->evt() ) {
288  std::scoped_lock lock( m_listenerMapMutex );
289  auto i = m_listenerMap.find( inc->type() );
290  if ( i != m_listenerMap.end() ) {
291  p.emplace_back( std::move( inc ), std::vector<Listener>{i->second->begin(), i->second->end()} );
292  }
293  }
294  }
295  }
296  }
297  return p;
298 }

◆ getListeners()

void IncidentSvc::getListeners ( std::vector< IIncidentListener * > &  lis,
const std::string type = "" 
) const
override

Definition at line 260 of file IncidentSvc.cpp.

260  {
261  static const std::string ALL{"ALL"};
262  auto lock = std::scoped_lock{m_listenerMapMutex};
263 
264  const std::string& ltype = ( !type.empty() ? type : ALL );
265 
266  l.clear();
267  auto i = m_listenerMap.find( ltype );
268  if ( i != m_listenerMap.end() ) {
269  l.reserve( i->second->size() );
270  std::transform( std::begin( *i->second ), std::end( *i->second ), std::back_inserter( l ),
271  []( const Listener& j ) { return j.iListener; } );
272  }
273 }

◆ i_fireIncident()

void IncidentSvc::i_fireIncident ( const Incident incident,
const std::string type 
)
private

Internal function to allow incidents listening to all events.

Definition at line 148 of file IncidentSvc.cpp.

148  {
149 
150  auto lock = std::scoped_lock{m_listenerMapMutex};
151 
152  // Wouldn't it be better to write a small 'ReturnCode' service which
153  // looks for these 'special' incidents and does whatever needs to
154  // be done instead of making a special case here?
155 
156  // Special case: FailInputFile incident must set the application return code
157  if ( incident.type() == IncidentType::FailInputFile || incident.type() == IncidentType::CorruptedInputFile ) {
158  auto appmgr = serviceLocator()->as<IProperty>();
159  Gaudi::setAppReturnCode( appmgr, incident.type() == IncidentType::FailInputFile
162  .ignore();
163  }
164 
165  auto ilisteners = m_listenerMap.find( listenerType );
166  if ( m_listenerMap.end() == ilisteners ) return;
167 
168  // setting this pointer will avoid that a call to removeListener() during
169  // the loop triggers a segfault
170  m_currentIncidentType = &incident.type();
171  std::string curIncTyp;
172  if ( m_currentIncidentType != nullptr ) {
173  curIncTyp = *m_currentIncidentType;
174  } else {
175  curIncTyp = "UNKNOWN";
176  }
177 
178  bool firedSingleShot = false;
179 
180  auto& listeners = *ilisteners->second;
181 
182  for ( auto& listener : listeners ) {
183 
184  VERMSG << "Calling '" << getListenerName( listener.iListener ) << "' for incident [" << incident.type() << "]"
185  << endmsg;
186 
187  // handle exceptions if they occur
188  try {
189  listener.iListener->handle( incident );
190  } catch ( const GaudiException& exc ) {
191  error() << "Exception with tag=" << exc.tag()
192  << " is caught"
193  " handling incident "
194  << curIncTyp << " in listener " << getListenerName( listener.iListener ) << endmsg;
195  error() << exc << endmsg;
196  if ( listener.rethrow ) { throw exc; }
197  } catch ( const std::exception& exc ) {
198  error() << "Standard std::exception is caught"
199  " handling incident "
200  << curIncTyp << " in listener " << getListenerName( listener.iListener ) << endmsg;
201  error() << exc.what() << endmsg;
202  if ( listener.rethrow ) { throw exc; }
203  } catch ( ... ) {
204  error() << "UNKNOWN Exception is caught"
205  " handling incident "
206  << curIncTyp << " in listener " << getListenerName( listener.iListener ) << endmsg;
207  if ( listener.rethrow ) { throw; }
208  }
209  // check wheter one of the listeners is singleShot
210  firedSingleShot |= listener.singleShot;
211  }
212  if ( firedSingleShot ) {
213  // remove all the singleshot listeners that got their shot...
214  listeners.erase( std::remove_if( std::begin( listeners ), std::end( listeners ), isSingleShot ),
215  std::end( listeners ) );
216  if ( listeners.empty() ) m_listenerMap.erase( ilisteners );
217  }
218 
219  m_currentIncidentType = nullptr;
220 }

◆ removeListener()

void IncidentSvc::removeListener ( IIncidentListener l,
const std::string type = "" 
)
override

Definition at line 128 of file IncidentSvc.cpp.

128  {
129  auto lock = std::scoped_lock{m_listenerMapMutex};
130 
131  bool scheduleForRemoval = ( m_currentIncidentType && type == *m_currentIncidentType );
132  if ( type.empty() ) {
133  auto i = std::begin( m_listenerMap );
134  while ( i != std::end( m_listenerMap ) ) { i = removeListenerFromList( i, lis, scheduleForRemoval ); }
135  } else {
136  auto i = m_listenerMap.find( type );
137  if ( i != m_listenerMap.end() ) removeListenerFromList( i, lis, scheduleForRemoval );
138  }
139 }

◆ removeListenerFromList()

IncidentSvc::ListenerMap::iterator IncidentSvc::removeListenerFromList ( ListenerMap::iterator  i,
IIncidentListener item,
bool  scheduleRemoval 
)
private

Definition at line 110 of file IncidentSvc.cpp.

110  {
111  auto match = [&]( ListenerList::const_reference j ) { return !item || item == j.iListener; };
112 
113  auto& c = *( i->second );
114  if ( !scheduleRemoval ) {
115  ON_DEBUG std::for_each( std::begin( c ), std::end( c ), [&]( ListenerList::const_reference j ) {
116  if ( match( j ) )
117  debug() << "Removing [" << i->first << "] listener '" << getListenerName( j.iListener ) << "'" << endmsg;
118  } );
119  c.erase( std::remove_if( std::begin( c ), std::end( c ), match ), std::end( c ) );
120  } else {
121  std::for_each( std::begin( c ), std::end( c ), [&]( Listener& i ) {
122  if ( match( i ) ) i.singleShot = true; // will trigger removal as soon as it is safe
123  } );
124  }
125  return c.empty() ? m_listenerMap.erase( i ) : std::next( i );
126 }

Member Data Documentation

◆ m_currentIncidentType

const std::string* IncidentSvc::m_currentIncidentType = nullptr
private

Incident being fired.

It is used to know if we can safely remove a listener or we have to schedule its removal for later.

Definition at line 88 of file IncidentSvc.h.

◆ m_firedIncidents

tbb::concurrent_unordered_map<EventContext::ContextID_t, IncQueue_t> IncidentSvc::m_firedIncidents
private

Definition at line 100 of file IncidentSvc.h.

◆ m_listenerMap

ListenerMap IncidentSvc::m_listenerMap
private

List of auditor names.

Definition at line 84 of file IncidentSvc.h.

◆ m_listenerMapMutex

std::recursive_mutex IncidentSvc::m_listenerMapMutex
mutableprivate

Mutex to synchronize access to m_listenerMap.

Definition at line 91 of file IncidentSvc.h.

◆ m_slotEvent

tbb::concurrent_unordered_map<EventContext::ContextID_t, EventContext::ContextEvt_t> IncidentSvc::m_slotEvent
private

Event ID for each slot.

Definition at line 103 of file IncidentSvc.h.

◆ m_timer

ChronoEntity IncidentSvc::m_timer
mutableprivate

timer & it's lock

Definition at line 94 of file IncidentSvc.h.

◆ m_timerLock

bool IncidentSvc::m_timerLock = false
mutableprivate

Definition at line 95 of file IncidentSvc.h.


The documentation for this class was generated from the following files:
AlgSequencer.all
all
Definition: AlgSequencer.py:54
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
DEBMSG
#define DEBMSG
Definition: IncidentSvc.cpp:53
IIncidentSvc::Listener
Listener properties.
Definition: IIncidentSvc.h:60
System::milliSec
@ milliSec
Definition: Timing.h:67
std::lock
T lock(T... args)
std::for_each
T for_each(T... args)
ON_DEBUG
#define ON_DEBUG
Definition: IncidentSvc.cpp:50
std::string
STL class.
std::exception
STL class.
std::move
T move(T... args)
GaudiUtils::Map::find
iterator find(const key_type &key)
Definition: Map.h:157
std::vector
STL class.
std::back_inserter
T back_inserter(T... args)
GaudiException
Definition: GaudiException.h:31
VERMSG
#define VERMSG
Definition: IncidentSvc.cpp:54
IncidentSvc::i_fireIncident
void i_fireIncident(const Incident &incident, const std::string &type)
Internal function to allow incidents listening to all events.
Definition: IncidentSvc.cpp:148
std::unique_ptr::release
T release(T... args)
IncidentSvc::m_firedIncidents
tbb::concurrent_unordered_map< EventContext::ContextID_t, IncQueue_t > m_firedIncidents
Definition: IncidentSvc.h:100
GaudiKernel.Constants.ALL
int ALL
Definition: Constants.py:21
gaudirun.c
c
Definition: gaudirun.py:499
IncidentSvc::m_timerLock
bool m_timerLock
Definition: IncidentSvc.h:95
CommonMessaging< implements< IService, IProperty, IStateful > >::msgLevel
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
Definition: CommonMessaging.h:148
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:222
extends< Service, IIncidentSvc >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:24
Gaudi::ReturnCode::FailInput
constexpr int FailInput
Definition: AppReturnCode.h:33
IncidentSvc::m_timer
ChronoEntity m_timer
timer & it's lock
Definition: IncidentSvc.h:94
IProperty
Definition: IProperty.h:33
Incident::context
EventContext context() const
Access to the EventContext of the source of the incident.
Definition: Incident.h:60
GaudiPython.Pythonizations.ctx
ctx
Definition: Pythonizations.py:566
Service::name
const std::string & name() const override
Retrieve name of the service
Definition: Service.cpp:332
Gaudi::setAppReturnCode
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
Definition: AppReturnCode.h:59
ChronoEntity::outputUserTime
std::string outputUserTime() const
print the chrono ;
Definition: ChronoEntity.cpp:82
Gaudi::Utils::LockedChrono
Definition: LockedChrono.h:60
Gaudi::ReturnCode::CorruptedInput
constexpr int CorruptedInput
Definition: AppReturnCode.h:38
IncidentSvc::removeListenerFromList
ListenerMap::iterator removeListenerFromList(ListenerMap::iterator, IIncidentListener *item, bool scheduleRemoval)
Definition: IncidentSvc.cpp:110
MsgStream::clear
void clear(STATE_TYPE _i=std::ios_base::failbit)
Definition: MsgStream.h:181
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
GaudiException::tag
virtual const std::string & tag() const
name tag for the exception, or exception type
Definition: GaudiException.h:77
std::remove_if
T remove_if(T... args)
IncidentSvc::m_slotEvent
tbb::concurrent_unordered_map< EventContext::ContextID_t, EventContext::ContextEvt_t > m_slotEvent
Event ID for each slot.
Definition: IncidentSvc.h:103
std::transform
T transform(T... args)
GaudiUtils::Map::end
iterator end()
Definition: Map.h:140
GaudiUtils::Map::erase
iterator erase(const_iterator pos)
Definition: Map.h:192
StatusCode::ignore
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition: StatusCode.h:156
SmartIF::as
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:117
gaudirun.type
type
Definition: gaudirun.py:154
std::vector::emplace_back
T emplace_back(T... args)
System::Sec
@ Sec
Definition: Timing.h:67
gaudirun.l
dictionary l
Definition: gaudirun.py:543
std::begin
T begin(T... args)
IncidentSvc::m_listenerMapMutex
std::recursive_mutex m_listenerMapMutex
Mutex to synchronize access to m_listenerMap.
Definition: IncidentSvc.h:91
EventContext
Definition: EventContext.h:34
GaudiUtils::Map::insert
std::pair< iterator, bool > insert(ValueType &&val)
Definition: Map.h:178
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:48
std::end
T end(T... args)
std::partition_point
T partition_point(T... args)
IncidentSvc::m_currentIncidentType
const std::string * m_currentIncidentType
Incident being fired.
Definition: IncidentSvc.h:88
Incident
Definition: Incident.h:27
IncidentSvc::IncQueue_t
tbb::concurrent_queue< Incident * > IncQueue_t
Definition: IncidentSvc.h:99
std::exception::what
T what(T... args)
IncidentSvc::m_listenerMap
ListenerMap m_listenerMap
List of auditor names.
Definition: IncidentSvc.h:84
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Definition: Service.cpp:335
std::next
T next(T... args)