The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
HiveSlimEventLoopMgr.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11// Local includes
13#include "HistogramAgent.h"
15
16// Framework includes
19#include <GaudiKernel/DataSvc.h>
22
23// External libraries
24#include <chrono>
25
26// Instantiation of a static factory class used by clients to create instances of this service
28
29#define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
30#define DEBUG_MSG ON_DEBUG debug()
31
32#define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) )
33#define VERBOSE_MSG ON_VERBOSE verbose()
34
35//--------------------------------------------------------------------------------------------
36// Standard Destructor
37//--------------------------------------------------------------------------------------------
39
40//--------------------------------------------------------------------------------------------
41// implementation of IAppMgrUI::initialize
42//--------------------------------------------------------------------------------------------
45 if ( !sc.isSuccess() ) {
46 error() << "Failed to initialize Service Base class." << endmsg;
48 }
49
50 // Get the references to the services that are needed by the ApplicationMgr itself
51 m_incidentSvc = serviceLocator()->service( "IncidentSvc" );
52 if ( !m_incidentSvc ) {
53 fatal() << "Error retrieving IncidentSvc." << endmsg;
55 }
56
57 // Setup access to event data services
58 m_evtDataMgrSvc = serviceLocator()->service( "EventDataSvc" );
59 if ( !m_evtDataMgrSvc ) {
60 fatal() << "Error retrieving EventDataSvc interface IDataManagerSvc." << endmsg;
62 }
63 m_whiteboard = serviceLocator()->service( "EventDataSvc" );
64 if ( !m_whiteboard ) {
65 fatal() << "Error retrieving EventDataSvc interface IHiveWhiteBoard." << endmsg;
67 }
69 if ( !m_schedulerSvc ) {
70 fatal() << "Error retrieving SchedulerSvc interface IScheduler." << endmsg;
72 }
73 // Obtain the IProperty of the ApplicationMgr
75 if ( !m_appMgrProperty ) {
76 fatal() << "IProperty interface not found in ApplicationMgr." << endmsg;
78 }
79
80 // We do not expect a Event Selector necessarily being declared
81 setProperty( m_appMgrProperty->getProperty( "EvtSel" ) ).ignore();
82
83 if ( m_evtsel != "NONE" || m_evtsel.length() == 0 ) {
84 m_evtSelector = serviceLocator()->service( "EventSelector" );
85 if ( m_evtSelector ) {
86 // Setup Event Selector
87 sc = m_evtSelector->createContext( m_evtContext );
88 if ( !sc.isSuccess() ) {
89 fatal() << "Can not create the event selector Context." << endmsg;
90 return sc;
91 }
92 } else {
93 fatal() << "EventSelector not found." << endmsg;
94 return sc;
95 }
96 } else {
97 m_evtSelector = 0;
98 m_evtContext = 0;
99 info() << "\"EventSelector\" disabled: no events will be processed from external input." << endmsg;
100 }
101
102 setProperty( m_appMgrProperty->getProperty( "HistogramPersistency" ) ).ignore();
103 if ( m_histPersName != "NONE" && !m_histPersName.empty() ) {
104 // Setup access to histogramming services
105 m_histoDataMgrSvc = serviceLocator()->service( "HistogramDataSvc" );
106 if ( !m_histoDataMgrSvc ) {
107 fatal() << "Error retrieving HistogramDataSvc." << endmsg;
108 return StatusCode::FAILURE;
109 }
110 // Setup histogram persistency
111 m_histoPersSvc = serviceLocator()->service( "HistogramPersistencySvc" );
112 if ( !m_histoPersSvc ) { warning() << "Histograms cannot not be saved - though required." << endmsg; }
113 }
114
115 // Setup algorithm resource pool
116 m_algResourcePool = serviceLocator()->service( "AlgResourcePool" );
117 if ( !m_algResourcePool ) {
118 fatal() << "Error retrieving AlgResourcePool" << endmsg;
119 return StatusCode::FAILURE;
120 }
121
122 m_algExecStateSvc = serviceLocator()->service( "AlgExecStateSvc" );
123 if ( !m_algExecStateSvc ) {
124 fatal() << "Error retrieving AlgExecStateSvc" << endmsg;
125 return StatusCode::FAILURE;
126 }
127
128 std::sort( m_eventNumberBlacklist.begin(), m_eventNumberBlacklist.end() );
129 info() << "Found " << m_eventNumberBlacklist.size() << " events in black list" << endmsg;
130
131 return StatusCode::SUCCESS;
132}
133//--------------------------------------------------------------------------------------------
134// implementation of IService::reinitialize
135//--------------------------------------------------------------------------------------------
137
138 // Check to see whether a new Event Selector has been specified
139 setProperty( m_appMgrProperty->getProperty( "EvtSel" ) ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
140 if ( m_evtsel != "NONE" || m_evtsel.empty() ) {
141 auto theSvc = serviceLocator()->service( "EventSelector" );
142 auto theEvtSel = theSvc.as<IEvtSelector>();
143 StatusCode sc;
144 if ( theEvtSel && ( theEvtSel.get() != m_evtSelector.get() ) ) {
145 // Setup Event Selector
146 if ( m_evtSelector.get() && m_evtContext ) {
147 // Need to release context before switching to new event selector
148 m_evtSelector->releaseContext( m_evtContext ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
149 m_evtContext = nullptr;
150 }
151 m_evtSelector = theEvtSel;
152 if ( theSvc->FSMState() == Gaudi::StateMachine::INITIALIZED ) {
153 sc = theSvc->reinitialize();
154 if ( !sc.isSuccess() ) {
155 error() << "Failure Reinitializing EventSelector " << theSvc->name() << endmsg;
156 return sc;
157 }
158 } else {
159 sc = theSvc->sysInitialize();
160 if ( !sc.isSuccess() ) {
161 error() << "Failure Initializing EventSelector " << theSvc->name() << endmsg;
162 return sc;
163 }
164 }
165 sc = m_evtSelector->createContext( m_evtContext );
166 if ( !sc.isSuccess() ) {
167 error() << "Can not create Context " << theSvc->name() << endmsg;
168 return sc;
169 }
170
171 } else if ( m_evtSelector ) {
172 if ( m_evtContext ) {
173 m_evtSelector->releaseContext( m_evtContext ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
174 m_evtContext = nullptr;
175 }
176 sc = m_evtSelector->createContext( m_evtContext );
177 if ( !sc.isSuccess() ) {
178 error() << "Can not create Context " << theSvc->name() << endmsg;
179 return sc;
180 }
181 }
182 } else if ( m_evtSelector && m_evtContext ) {
183 m_evtSelector->releaseContext( m_evtContext ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
184 m_evtSelector = nullptr;
185 m_evtContext = nullptr;
186 }
187 return StatusCode::SUCCESS;
188}
189
190//--------------------------------------------------------------------------------------------
191// implementation of IService::stop
192//--------------------------------------------------------------------------------------------
193// Removed call to MinimalEventLoopMgr!
195 if ( !m_endEventFired ) {
196 // Fire pending EndEvent incident
197 m_incidentSvc->fireIncident( Incident( name(), IncidentType::EndEvent ) );
198 m_endEventFired = true;
199 }
200 return StatusCode::SUCCESS;
201}
202
203//--------------------------------------------------------------------------------------------
204// implementation of IAppMgrUI::finalize
205//--------------------------------------------------------------------------------------------
206// Removed call to MinimalEventLoopMgr!
208
209 StatusCode scRet;
211
212 if ( sc.isFailure() ) {
213 scRet = StatusCode::FAILURE;
214 error() << "Problems finalizing Service base class" << endmsg;
215 }
216
217 // Save Histograms Now
218 if ( m_histoPersSvc ) {
219 HistogramAgent agent;
220 sc = m_histoDataMgrSvc->traverseTree( &agent );
221 if ( sc.isSuccess() ) {
222 const IDataSelector& objects = agent.selectedObjects();
223 // skip /stat entry!
224 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode s, const auto& i ) {
225 IOpaqueAddress* pAddr = nullptr;
226 StatusCode iret = m_histoPersSvc->createRep( i, pAddr );
227 if ( iret.isSuccess() ) i->registry()->setAddress( pAddr );
228 return s.isFailure() ? s : iret;
229 } );
230 sc = std::accumulate( begin( objects ), end( objects ), sc, [&]( StatusCode s, const auto& i ) {
231 IRegistry* reg = i->registry();
232 StatusCode iret = m_histoPersSvc->fillRepRefs( reg->address(), i );
233 return s.isFailure() ? s : iret;
234 } );
235 if ( sc.isSuccess() ) {
236 info() << "Histograms converted successfully according to request." << endmsg;
237 } else {
238 error() << "Error while saving Histograms." << endmsg;
239 }
240 } else {
241 error() << "Error while traversing Histogram data store" << endmsg;
242 }
243 }
244
245 scRet = sc;
246
247 // Release event selector context
248 if ( m_evtSelector && m_evtContext ) {
249 m_evtSelector->releaseContext( m_evtContext ).ignore();
250 m_evtContext = nullptr;
251 }
252
253 m_incidentSvc.reset();
254
255 // Release all interfaces...
256 m_histoDataMgrSvc.reset();
257 m_histoPersSvc.reset();
258
259 m_evtSelector.reset();
260 m_whiteboard.reset();
261 m_evtDataMgrSvc.reset();
262
263 return scRet;
264}
265
266//--------------------------------------------------------------------------------------------
267// implementation of executeEvent(void* par)
268//--------------------------------------------------------------------------------------------
270
271 m_algExecStateSvc->reset( ctx );
272
273 // Check if event number is in blacklist
274 if ( m_blackListBS != nullptr ) { // we are processing a finite number of events, use bitset blacklist
275 if ( m_blackListBS->test( ctx.evt() ) ) {
276 VERBOSE_MSG << "Event " << ctx.evt() << " on black list" << endmsg;
277 m_whiteboard->freeStore( ctx.slot() ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
279 }
280 } else if ( std::binary_search( m_eventNumberBlacklist.begin(), m_eventNumberBlacklist.end(), ctx.evt() ) ) {
281 VERBOSE_MSG << "Event " << ctx.evt() << " on black list" << endmsg;
282 m_whiteboard->freeStore( ctx.slot() ).ignore( /* AUTOMATICALLY ADDED FOR gaudi/Gaudi!763 */ );
284 }
285
286 VERBOSE_MSG << "Beginning to process event " << ctx.evt() << endmsg;
287
288 // An incident may schedule a stop, in which case is better to exit before the actual execution.
289 if ( m_scheduledStop ) {
290 always() << "Terminating event processing loop due to a stop scheduled by an incident listener" << endmsg;
291 return StatusCode::SUCCESS;
292 }
293
294 // Fire BeginEvent "Incident"
295 m_incidentSvc->fireIncident( std::make_unique<Incident>( name(), IncidentType::BeginEvent, ctx ) );
296
297 // Now add event to the scheduler
298 VERBOSE_MSG << "Adding event " << ctx.evt() << ", slot " << ctx.slot() << " to the scheduler" << endmsg;
299
300 m_incidentSvc->fireIncident( std::make_unique<Incident>( name(), IncidentType::BeginProcessing, ctx ) );
301
302 StatusCode addEventStatus = m_schedulerSvc->pushNewEvent( new EventContext{ std::move( ctx ) } );
303
304 // If this fails, we need to wait for something to complete
305 if ( !addEventStatus.isSuccess() ) {
306 fatal() << "An event processing slot should be now free in the scheduler, but it appears not to be the case."
307 << endmsg;
308 }
309
310 return StatusCode::SUCCESS;
311}
312
313//--------------------------------------------------------------------------------------------
314// implementation of IEventProcessing::executeRun
315//--------------------------------------------------------------------------------------------
317 StatusCode sc;
318 bool eventfailed = false;
319
320 if ( maxevt > 0 ) { // finite number of events to process
321 const unsigned int umaxevt = static_cast<unsigned int>( maxevt );
322 m_blackListBS = std::make_unique<boost::dynamic_bitset<>>( maxevt ); // all initialized to zero
323 for ( unsigned int i = 0; i < m_eventNumberBlacklist.size() && m_eventNumberBlacklist[i] <= umaxevt;
324 ++i ) { // black list is sorted in init
325 m_blackListBS->set( m_eventNumberBlacklist[i], true );
326 }
327 }
328
329 // Call now the nextEvent(...)
330 sc = nextEvent( maxevt );
331 if ( sc.isFailure() ) eventfailed = true;
332
333 m_blackListBS.reset( nullptr );
334
335 return eventfailed ? StatusCode::FAILURE : StatusCode::SUCCESS;
336}
337
338//--------------------------------------------------------------------------------------------
339// Implementation of IEventProcessor::stopRun()
340//--------------------------------------------------------------------------------------------
342 // Set the application return code
343 auto appmgr = serviceLocator()->as<IProperty>();
344 if ( Gaudi::setAppReturnCode( appmgr, Gaudi::ReturnCode::ScheduledStop ).isFailure() ) {
345 error() << "Could not set return code of the application (" << Gaudi::ReturnCode::ScheduledStop << ")" << endmsg;
346 }
347 m_scheduledStop = true;
348 return StatusCode::SUCCESS;
349}
350
351//--------------------------------------------------------------------------------------------
352// implementation of IAppMgrUI::nextEvent
353//--------------------------------------------------------------------------------------------
354// Here the loop on the events takes place.
355// This is also the natural place to put the preparation of the algorithms
356// contexts, which contain the event specific data.
357#include <GaudiKernel/Memory.h>
359
360 // Calculate runtime
361 using Clock = std::chrono::high_resolution_clock;
362
363 // Reset the application return code.
365
366 int finishedEvts = 0;
367 int createdEvts = 0;
368 int skippedEvts = 0;
369 info() << "Starting loop on events" << endmsg;
370 // Loop until the finished events did not reach the maxevt number
371 bool loop_ended = false;
372 // Run the first event before spilling more than one
373 bool newEvtAllowed = false;
374
375 constexpr double oneOver1024 = 1. / 1024.;
376
377 uint iteration = 0;
378 auto start_time = Clock::now();
379 StatusCode finalSC;
380 while ( !loop_ended && ( maxevt < 0 || ( finishedEvts + skippedEvts ) < maxevt ) ) {
381 DEBUG_MSG << "work loop iteration " << iteration++ << endmsg;
382 // if the created events did not reach maxevt, create an event
383 if ( ( newEvtAllowed || createdEvts == 0 ) && // Launch the first event alone
384 createdEvts >= 0 && // The events are not finished with an unlimited number of events
385 ( createdEvts < maxevt || maxevt < 0 ) && // The events are not finished with a limited number of events
386 m_schedulerSvc->freeSlots() > 0 && // There are still free slots in the scheduler
387 m_whiteboard->freeSlots() > 0 && // There are still free slots in the whiteboard
388 !m_scheduledStop // There is not a scheduled stop
389 ) {
390
391 if ( 1 == createdEvts ) // reset counter to count from event 1
392 start_time = Clock::now();
393
394 DEBUG_MSG << "createdEvts: " << createdEvts << ", freeslots: " << m_schedulerSvc->freeSlots() << endmsg;
395 // DP remove to remove the syscalls...
396 // if (0!=createdEvts){
397 // info() << "Event Number = " << createdEvts
398 // << " WSS (MB) = " << System::mappedMemory(System::MemoryUnit::kByte)*oneOver1024
399 // << " Time (s) = " << secsFromStart(start_time) << endmsg;
400 // }
401
402 // TODO can we adapt the interface of executeEvent for a nicer solution?
404 while ( !sc.isSuccess() // we haven't created an event yet
405 && ( createdEvts < maxevt || maxevt < 0 ) ) { // redunant check for maxEvts, can we do better?
406 {
407 auto ctx = createEventContext();
408 if ( !ctx.valid() ) {
409 createdEvts = -1;
410 break; // invalid context means end of loop
411 }
412 sc = executeEvent( std::move( ctx ) );
413 }
414 if ( sc.isRecoverable() ) { // we skipped an event
415 ++skippedEvts;
416 } else if ( sc.isFailure() ) { // exit immediatly
417 return sc;
418 } // else we have an success --> exit loop
419 ++createdEvts;
420 }
421
422 } // end if condition createdEvts < maxevt
423 else {
424 // all the events were created but not all finished or the slots were
425 // all busy: the scheduler should finish its job
426
427 DEBUG_MSG << "Draining the scheduler" << endmsg;
428
429 // Pull out of the scheduler the finished events
430 if ( drainScheduler( finishedEvts ).isFailure() ) {
431 loop_ended = true;
432 finalSC = StatusCode::FAILURE;
433 }
434 newEvtAllowed = true;
435 }
436 } // end main loop on finished events
437 auto end_time = Clock::now();
438
439 info() << "---> Loop Finished (skipping 1st evt) - "
440 << " WSS " << System::mappedMemory( System::MemoryUnit::kByte ) * oneOver1024 << " total time "
441 << std::chrono::duration_cast<std::chrono::nanoseconds>( end_time - start_time ).count() << endmsg;
442 info() << skippedEvts << " events were SKIPed" << endmsg;
443
444 return finalSC;
445}
446
447//---------------------------------------------------------------------------
448
451 refpAddr = nullptr;
453 if ( sc.isFailure() ) return sc;
454 // Create root address and assign address to data service
455 sc = m_evtSelector->createAddress( *m_evtContext, refpAddr );
456 if ( sc.isSuccess() ) return sc;
457 sc = m_evtSelector->next( *m_evtContext );
458 if ( sc.isFailure() ) return sc;
459 sc = m_evtSelector->createAddress( *m_evtContext, refpAddr );
460 if ( !sc.isSuccess() ) warning() << "Error creating IOpaqueAddress." << endmsg;
461 return sc;
462}
463
464//---------------------------------------------------------------------------
465
467 StatusCode sc;
468 if ( m_evtContext ) {
469 //---This is the "event iterator" context from EventSelector
470 IOpaqueAddress* pAddr = nullptr;
471 sc = getEventRoot( pAddr );
472 if ( !sc.isSuccess() ) {
473 info() << "No more events in event selection " << endmsg;
474 return StatusCode::FAILURE;
475 }
476 sc = m_evtDataMgrSvc->setRoot( "/Event", pAddr );
477 if ( !sc.isSuccess() ) { warning() << "Error declaring event root address." << endmsg; }
478 } else {
479 //---In case of no event selector----------------
480 sc = m_evtDataMgrSvc->setRoot( "/Event", new DataObject() );
481 if ( !sc.isSuccess() ) { warning() << "Error declaring event root DataObject" << endmsg; }
482 }
483 return StatusCode::SUCCESS;
484}
485
486//---------------------------------------------------------------------------
487
489 EventContext ctx{ m_nevt, m_whiteboard->allocateStore( m_nevt ) };
490 ++m_nevt;
491
492 StatusCode sc = m_whiteboard->selectStore( ctx.slot() );
493 if ( sc.isFailure() ) {
494 throw GaudiException( "Slot " + std::to_string( ctx.slot() ) + " could not be selected for the WhiteBoard", name(),
495 sc );
496 }
497 if ( declareEventRootAddress().isFailure() ) { // We ran out of events!
498 // invalid context terminates the loop
499 return EventContext{};
500 }
501 return ctx;
502}
503
504//---------------------------------------------------------------------------
505
507
509
510 // maybe we can do better
511 std::vector<EventContext*> finishedEvtContexts;
512
513 EventContext* finishedEvtContext( nullptr );
514
515 // Here we wait not to loose cpu resources
516 DEBUG_MSG << "Waiting for a context" << endmsg;
517 sc = m_schedulerSvc->popFinishedEvent( finishedEvtContext );
518
519 // We got past it: cache the pointer
520 DEBUG_MSG << "Context " << ( sc.isSuccess() ? "obtained" : "not obtained: a problem in the scheduling?" ) << endmsg;
521 finishedEvtContexts.push_back( finishedEvtContext );
522
523 // Let's see if we can pop other event contexts
524 while ( m_schedulerSvc->tryPopFinishedEvent( finishedEvtContext ).isSuccess() ) {
525 finishedEvtContexts.push_back( finishedEvtContext );
526 }
527
528 // Now we flush them
529 StatusCode finalSC;
530 for ( auto& thisFinishedEvtContext : finishedEvtContexts ) {
531 if ( !thisFinishedEvtContext ) {
532 error() << "Detected nullptr ctxt before clearing WB!" << endmsg;
533 finalSC = StatusCode::FAILURE;
534 continue;
535 }
536 if ( m_algExecStateSvc->eventStatus( *thisFinishedEvtContext ) != EventStatus::Success ) {
537 ( m_abortOnFailure ? fatal() : error() ) << "Failed event detected on " << thisFinishedEvtContext << endmsg;
538 if ( m_abortOnFailure ) finalSC = StatusCode::FAILURE;
539 }
540 // shouldn't these incidents move to the forward scheduler?
541 // If we want to consume incidents with an algorithm at the end of the graph
542 // we need to add this to forward scheduler lambda action,
543 // otherwise we have to do this serially on this thread!
544 m_incidentSvc->fireIncident( Incident( name(), IncidentType::EndProcessing, *thisFinishedEvtContext ) );
545 m_incidentSvc->fireIncident( Incident( name(), IncidentType::EndEvent, *thisFinishedEvtContext ) );
546
547 DEBUG_MSG << "Clearing slot " << thisFinishedEvtContext->slot() << " (event " << thisFinishedEvtContext->evt()
548 << ") of the whiteboard" << endmsg;
549
550 StatusCode sc = clearWBSlot( thisFinishedEvtContext->slot() );
551 if ( !sc.isSuccess() )
552 error() << "Whiteboard slot " << thisFinishedEvtContext->slot() << " could not be properly cleared";
553
554 delete thisFinishedEvtContext;
555
556 ++finishedEvts;
557 }
558 return finalSC;
559}
560
561//---------------------------------------------------------------------------
562
564 StatusCode sc = m_whiteboard->clearStore( evtSlot );
565 if ( !sc.isSuccess() ) warning() << "Clear of Event data store failed" << endmsg;
566 return m_whiteboard->freeStore( evtSlot );
567}
568//---------------------------------------------------------------------------
#define DEBUG_MSG
#define VERBOSE_MSG
std::vector< DataObject * > IDataSelector
This is only a placeholder to allow me compiling until the responsible guy does his work!
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
A DataObject is the base class of any identifiable object on any data store.
Definition DataObject.h:37
This class represents an entry point to all the event specific data.
Define general base for Gaudi exception.
HistogramAgent base in charge of collecting all the references to DataObjects in a transient store th...
const IDataSelector & selectedObjects() const
Return the set of selected DataObjects.
EventContext::ContextEvt_t m_nevt
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
Gaudi::Property< bool > m_abortOnFailure
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
Gaudi::Property< std::string > m_histPersName
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
StatusCode stop() override
implementation of IService::stop
StatusCode initialize() override
implementation of IService::initialize
StatusCode drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
StatusCode nextEvent(int maxevt) override
implementation of IService::nextEvent
StatusCode reinitialize() override
implementation of IService::reinitialize
StatusCode executeEvent(EventContext &&ctx) override
implementation of IEventProcessor::executeEvent(EventContext&&)
std::unique_ptr< boost::dynamic_bitset<> > m_blackListBS
Gaudi::Property< std::string > m_schedulerName
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event)
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Gaudi::Property< std::vector< unsigned int > > m_eventNumberBlacklist
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
StatusCode declareEventRootAddress()
Declare the root address of the event.
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
IEvtSelector::Context * m_evtContext
Event Iterator.
bool m_scheduledStop
Scheduled stop of event processing.
StatusCode finalize() override
implementation of IService::finalize
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Reference to the AlgExecStateSvc.
Gaudi::Property< std::string > m_evtsel
EventContext createEventContext() override
implementation of IEventProcessor::createEventContext()
The Event Selector Interface.
Opaque address interface definition.
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition IProperty.h:32
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition IRegistry.h:29
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
SmartIF< IFace > as()
Definition ISvcLocator.h:64
Base class for all Incidents (computing events).
Definition Incident.h:24
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition Service.cpp:336
StatusCode finalize() override
Definition Service.cpp:223
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
StatusCode initialize() override
Definition Service.cpp:118
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition SmartIF.h:110
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
bool isFailure() const
Definition StatusCode.h:129
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
Definition StatusCode.h:139
constexpr static const auto RECOVERABLE
Definition StatusCode.h:101
bool isSuccess() const
Definition StatusCode.h:314
bool isRecoverable() const
Definition StatusCode.h:318
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
constexpr int ScheduledStop
constexpr int Success
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
GAUDI_API long mappedMemory(MemoryUnit unit=kByte, InfoType fetch=Memory, long pid=-1)
Basic Process Information: priority boost.
Definition Memory.cpp:172
@ kByte
Definition Memory.h:50