| The Gaudi Framework v32r1 (f65d50dc)

Algorithm.cpp
Go to the documentation of this file.
1 #include <Gaudi/Algorithm.h>
2
3 #include <algorithm>
4 #include <numeric>
5 #include <set>
6
7 #include "GaudiKernel/IAlgContextSvc.h"
8 #include "GaudiKernel/IAlgManager.h"
9 #include "GaudiKernel/IAuditorSvc.h"
10 #include "GaudiKernel/IConversionSvc.h"
11 #include "GaudiKernel/IDataManagerSvc.h"
12 #include "GaudiKernel/IDataProviderSvc.h"
13 #include "GaudiKernel/IExceptionSvc.h"
14 #include "GaudiKernel/IHistogramSvc.h"
15 #include "GaudiKernel/IJobOptionsSvc.h"
16 #include "GaudiKernel/IMessageSvc.h"
17 #include "GaudiKernel/INTupleSvc.h"
18 #include "GaudiKernel/IRndmGenSvc.h"
19 #include "GaudiKernel/ISvcLocator.h"
20 #include "GaudiKernel/IToolSvc.h"
21 #include "GaudiKernel/Kernel.h"
22
23 #include "GaudiKernel/AlgTool.h"
24 #include "GaudiKernel/Chrono.h"
25 #include "GaudiKernel/DataHandleHolderVisitor.h"
26 #include "GaudiKernel/GaudiException.h"
27 #include "GaudiKernel/Guards.h"
28 #include "GaudiKernel/MsgStream.h"
29 #include "GaudiKernel/ServiceLocatorHelper.h"
30 #include "GaudiKernel/Stat.h"
31 #include "GaudiKernel/StringKey.h"
32 #include "GaudiKernel/ToolHandle.h"
33
34 namespace Gaudi {
35 namespace Details {
36 bool getDefaultAuditorValue( ISvcLocator* loc ) {
37 assert( loc != nullptr );
38 Gaudi::Property<bool> audit{false};
39 auto appMgr = loc->service<IProperty>( "ApplicationMgr" );
40 if ( appMgr && appMgr->hasProperty( "AuditAlgorithms" ) ) {
41 audit.assign( appMgr->getProperty( "AuditAlgorithms" ) );
42 }
43 return audit.value();
44 }
45 } // namespace Details
46
47 // Constructor
48 Algorithm::Algorithm( const std::string& name, ISvcLocator* pSvcLocator, const std::string& version )
49 : m_name( name )
50 , m_version( version )
51 , // incremented by AlgResourcePool
52 m_pSvcLocator( pSvcLocator ) {}
53
54 // IAlgorithm implementation
55 StatusCode Algorithm::sysInitialize() {
56
57 // Bypass the initialization if the algorithm
58 // has already been initialized.
59 if ( Gaudi::StateMachine::INITIALIZED <= FSMState() ) return StatusCode::SUCCESS;
60
61 // Set the Algorithm's properties
62 if ( !setProperties() ) return StatusCode::FAILURE;
63
64 // Bypass the initialization if the algorithm is disabled.
65 // Need to do this after setProperties.
66 if ( !isEnabled() ) return StatusCode::SUCCESS;
67
68 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::INITIALIZE, m_state );
69
70 // TODO: (MCl) where should we do this? initialize or start?
71 // Reset Error count
72 // m_errorCount = 0;
73
74 // lock the context service
75 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
76
77 // Get WhiteBoard interface if implemented by EventDataSvc
78 m_WB = service( "EventDataSvc" );
79
80 // check whether timeline should be done
81 m_doTimeline = timelineSvc()->isEnabled();
82
83 StatusCode sc;
84 // Invoke initialize() method of the derived class inside a try/catch clause
85 try {
86
87 { // limit the scope of the guard
88 Gaudi::Guards::AuditorGuard guard( this,
89 // check if we want to audit the initialize
90 ( m_auditorInitialize ) ? auditorSvc().get() : nullptr,
91 IAuditor::Initialize );
92 // Invoke the initialize() method of the derived class
93 sc = initialize();
94 }
95
96 if ( sc.isSuccess() ) {
97 // Update the state.
98 m_state = m_targetState;
99 }
100 } catch ( const GaudiException& Exception ) {
101 fatal() << " Exception with tag=" << Exception.tag() << " is caught " << endmsg;
102 error() << Exception << endmsg;
103 Stat stat( chronoSvc(), Exception.tag() );
104 sc = StatusCode::FAILURE;
105 } catch ( const std::exception& Exception ) {
106 fatal() << " Standard std::exception is caught " << endmsg;
107 error() << Exception.what() << endmsg;
108 Stat stat( chronoSvc(), "*std::exception*" );
109 sc = StatusCode::FAILURE;
110 } catch ( ... ) {
111 fatal() << "UNKNOWN Exception is caught " << endmsg;
112 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
113 sc = StatusCode::FAILURE;
114 }
115
116 algExecStateSvc()->addAlg( this );
117
118 //
120 //
121
122 // ignore this step if we're a Sequence
123 if ( this->isSequence() ) { return sc; }
124
125 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
126 debug() << "input handles: " << inputHandles().size() << endmsg;
127 debug() << "output handles: " << outputHandles().size() << endmsg;
128 }
129
130 // check for explicit circular data dependencies in declared handles
131 DataObjIDColl out;
132 for ( auto& h : outputHandles() ) {
133 if ( !h->objKey().empty() ) out.emplace( h->fullKey() );
134 }
135 for ( auto& h : inputHandles() ) {
136 if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
137 error() << "Explicit circular data dependency detected for id " << h->fullKey() << endmsg;
138 sc = StatusCode::FAILURE;
139 }
140 }
141
142 if ( !sc ) return sc;
143
144 if ( m_updateDataHandles ) acceptDHVisitor( m_updateDataHandles.get() );
145
146 // visit all sub-algs and tools, build full set. First initialize ToolHandles if needed
147 try {
148 if ( !m_toolHandlesInit ) initToolHandles();
149 } catch ( const GaudiException& Exception ) {
150 error() << "Failing initializing ToolHandles : " << Exception << endmsg;
151 return StatusCode::FAILURE;
152 }
153 DHHVisitor avis( m_inputDataObjs, m_outputDataObjs );
154 acceptDHVisitor( &avis );
155
156 // check for implicit circular data deps from child Algs/AlgTools
157 for ( auto& h : m_outputDataObjs ) {
158 auto i = m_inputDataObjs.find( h );
159 if ( i != m_inputDataObjs.end() ) {
160 if ( m_filterCircDeps ) {
161 warning() << "Implicit circular data dependency detected for id " << h << endmsg;
162 m_inputDataObjs.erase( i );
163 } else {
164 error() << "Implicit circular data dependency detected for id " << h << endmsg;
165 sc = StatusCode::FAILURE;
166 }
167 }
168 }
169
170 if ( !sc ) return sc;
171
172 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
173 // sort out DataObjects by path so that logging is reproducable
174 // we define a little helper creating an ordered set from a non ordered one
175 auto sort = []( const DataObjID a, const DataObjID b ) -> bool { return a.fullKey() < b.fullKey(); };
176 auto orderset = [&sort]( const DataObjIDColl& in ) -> std::set<DataObjID, decltype( sort )> {
177 return {in.begin(), in.end(), sort};
178 };
179 // Logging
180 debug() << "Data Deps for " << name();
181 for ( auto h : orderset( m_inputDataObjs ) ) { debug() << "\n + INPUT " << h; }
182 for ( auto id : orderset( avis.ignoredInpKeys() ) ) { debug() << "\n + INPUT IGNORED " << id; }
183 for ( auto h : orderset( m_outputDataObjs ) ) { debug() << "\n + OUTPUT " << h; }
184 for ( auto id : orderset( avis.ignoredOutKeys() ) ) { debug() << "\n + OUTPUT IGNORED " << id; }
185 debug() << endmsg;
186 }
187
188 // initialize handles
189 initDataHandleHolder();
190
191 return sc;
192 }
193
194 void Algorithm::acceptDHVisitor( IDataHandleVisitor* vis ) const {
195 vis->visit( this );
196
197 // loop through tools
198 for ( auto tool : tools() ) vis->visit( dynamic_cast<AlgTool*>( tool ) );
199 }
200
201 // IAlgorithm implementation
202 StatusCode Algorithm::sysStart() {
203
204 // Bypass the startup if already running or disabled.
205 if ( Gaudi::StateMachine::RUNNING == FSMState() || !isEnabled() ) return StatusCode::SUCCESS;
206
207 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::START, m_state );
208
209 // lock the context service
210 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
211
212 StatusCode sc( StatusCode::FAILURE );
213 // Invoke start() method of the derived class inside a try/catch clause
214 try {
215 { // limit the scope of the guard
216 Gaudi::Guards::AuditorGuard guard( this,
217 // check if we want to audit the initialize
218 ( m_auditorStart ) ? auditorSvc().get() : nullptr, IAuditor::Start );
219 // Invoke the start() method of the derived class
220 sc = start();
221 }
222 if ( sc.isSuccess() ) {
223 // Update the state.
224 m_state = m_targetState;
225 }
226 } catch ( const GaudiException& Exception ) {
227 fatal() << "in sysStart(): exception with tag=" << Exception.tag() << " is caught" << endmsg;
228 error() << Exception << endmsg;
229 Stat stat( chronoSvc(), Exception.tag() );
230 sc = StatusCode::FAILURE;
231 } catch ( const std::exception& Exception ) {
232 fatal() << "in sysStart(): standard std::exception is caught" << endmsg;
233 error() << Exception.what() << endmsg;
234 Stat stat( chronoSvc(), "*std::exception*" );
235 sc = StatusCode::FAILURE;
236 } catch ( ... ) {
237 fatal() << "in sysStart(): UNKNOWN Exception is caught" << endmsg;
238 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
239 sc = StatusCode::FAILURE;
240 }
241
242 return sc;
243 }
244
245 // IAlgorithm implementation
246 StatusCode Algorithm::sysReinitialize() {
247
248 // Bypass the initialization if the algorithm is disabled.
249 if ( !isEnabled() ) return StatusCode::SUCCESS;
250
251 // Check that the current status is the correct one.
252 if ( Gaudi::StateMachine::INITIALIZED != FSMState() ) {
253 error() << "sysReinitialize(): cannot reinitialize algorithm not initialized" << endmsg;
254 return StatusCode::FAILURE;
255 }
256
257 // Reset Error count
258 // m_errorCount = 0; // done during start
259
260 // lock the context service
261 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
262
263 StatusCode sc( StatusCode::SUCCESS );
264 // Invoke reinitialize() method of the derived class inside a try/catch clause
265 try {
266 Gaudi::Guards::AuditorGuard guard( this,
267 // check if we want to audit the initialize
268 ( m_auditorReinitialize ) ? auditorSvc().get() : nullptr,
269 IAuditor::ReInitialize );
270 // Invoke the reinitialize() method of the derived class
271 sc = reinitialize();
272 } catch ( const GaudiException& Exception ) {
273 fatal() << "sysReinitialize(): Exception with tag=" << Exception.tag() << " is caught" << endmsg;
274 error() << Exception << endmsg;
275 Stat stat( chronoSvc(), Exception.tag() );
276 sc = StatusCode::FAILURE;
277 } catch ( const std::exception& Exception ) {
278 fatal() << "sysReinitialize(): Standard std::exception is caught" << endmsg;
279 error() << Exception.what() << endmsg;
280 Stat stat( chronoSvc(), "*std::exception*" );
281 sc = StatusCode::FAILURE;
282 } catch ( ... ) {
283 fatal() << "sysReinitialize(): UNKNOWN Exception is caught" << endmsg;
284 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
285 sc = StatusCode::FAILURE;
286 }
287
288 return sc;
289 }
290
291 // IAlgorithm implementation
292 StatusCode Algorithm::sysRestart() {
293
294 // Bypass the initialization if the algorithm is disabled.
295 if ( !isEnabled() ) return StatusCode::SUCCESS;
296
297 // Check that the current status is the correct one.
298 if ( Gaudi::StateMachine::RUNNING != FSMState() ) {
299 error() << "sysRestart(): cannot restart algorithm not started" << endmsg;
300 return StatusCode::FAILURE;
301 }
302
303 // lock the context service
304 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
305
306 StatusCode sc( StatusCode::FAILURE );
307 // Invoke reinitialize() method of the derived class inside a try/catch clause
308 try {
309 Gaudi::Guards::AuditorGuard guard( this,
310 // check if we want to audit the initialize
311 ( m_auditorRestart ) ? auditorSvc().get() : nullptr, IAuditor::ReStart );
312 // Invoke the reinitialize() method of the derived class
313 sc = restart();
314 } catch ( const GaudiException& Exception ) {
315 fatal() << "sysRestart(): Exception with tag=" << Exception.tag() << " is caught" << endmsg;
316 error() << Exception << endmsg;
317 Stat stat( chronoSvc(), Exception.tag() );
318 sc = StatusCode::FAILURE;
319 } catch ( const std::exception& Exception ) {
320 fatal() << "sysRestart(): Standard std::exception is caught" << endmsg;
321 error() << Exception.what() << endmsg;
322 Stat stat( chronoSvc(), "*std::exception*" );
323 sc = StatusCode::FAILURE;
324 } catch ( ... ) {
325 fatal() << "sysRestart(): UNKNOWN Exception is caught" << endmsg;
326 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
327 sc = StatusCode::FAILURE;
328 }
329
330 return sc;
331 }
332
333 // IAlgorithm implementation
334 StatusCode Algorithm::sysBeginRun() {
335
336 // Bypass the beginRun if the algorithm is disabled.
337 if ( !isEnabled() ) return StatusCode::SUCCESS;
338
339 m_beginRunCalled = true;
340
341 // lock the context service
342 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
343
344 StatusCode sc( StatusCode::FAILURE );
345 // Invoke beginRun() method of the derived class inside a try/catch clause
346 try {
347 Gaudi::Guards::AuditorGuard guard( this,
348 // check if we want to audit the initialize
349 ( m_auditorBeginRun ) ? auditorSvc().get() : nullptr, IAuditor::BeginRun );
350 // Invoke the beginRun() method of the derived class
351 #pragma GCC diagnostic push
352 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
353 sc = beginRun();
354 #pragma GCC diagnostic pop
355 } catch ( const GaudiException& Exception ) {
356 fatal() << " Exception with tag=" << Exception.tag() << " is caught " << endmsg;
357 error() << Exception << endmsg;
358 Stat stat( chronoSvc(), Exception.tag() );
359 sc = StatusCode::FAILURE;
360 } catch ( const std::exception& Exception ) {
361 fatal() << " Standard std::exception is caught " << endmsg;
362 error() << Exception.what() << endmsg;
363 Stat stat( chronoSvc(), "*std::exception*" );
364 sc = StatusCode::FAILURE;
365 } catch ( ... ) {
366 fatal() << "UNKNOWN Exception is caught " << endmsg;
367 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
368 sc = StatusCode::FAILURE;
369 }
370
371 if ( !isSequence() && m_beginRunCalled ) {
372 warning() << "Algorithm::BeginRun is deprecated. Use Start instead" << endmsg;
373 }
374
375 return sc;
376 }
377
378 #pragma GCC diagnostic push
379 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
380 StatusCode Algorithm::beginRun() {
381 m_beginRunCalled = false;
382 return StatusCode::SUCCESS;
383 }
384 #pragma GCC diagnostic pop
385
386 // IAlgorithm implementation
387 StatusCode Algorithm::sysEndRun() {
388
389 // Bypass the endRun if the algorithm is disabled.
390 if ( !isEnabled() ) return StatusCode::SUCCESS;
391 m_endRunCalled = true;
392
393 // lock the context service
394 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
395
396 // Invoke endRun() method of the derived class inside a try/catch clause
397 StatusCode sc( StatusCode::FAILURE );
398 try {
399 Gaudi::Guards::AuditorGuard guard( this,
400 // check if we want to audit the initialize
401 ( m_auditorEndRun ) ? auditorSvc().get() : nullptr, IAuditor::EndRun );
402 // Invoke the endRun() method of the derived class
403 #pragma GCC diagnostic push
404 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
405 sc = endRun();
406 #pragma GCC diagnostic pop
407 } catch ( const GaudiException& Exception ) {
408 fatal() << " Exception with tag=" << Exception.tag() << " is caught " << endmsg;
409 error() << Exception << endmsg;
410 Stat stat( chronoSvc(), Exception.tag() );
411 sc = StatusCode::FAILURE;
412 } catch ( const std::exception& Exception ) {
413 fatal() << " Standard std::exception is caught " << endmsg;
414 error() << Exception.what() << endmsg;
415 Stat stat( chronoSvc(), "*std::exception*" );
416 sc = StatusCode::FAILURE;
417 } catch ( ... ) {
418 fatal() << "UNKNOWN Exception is caught " << endmsg;
419 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
420 sc = StatusCode::FAILURE;
421 }
422
423 if ( !isSequence() && m_endRunCalled ) {
424 warning() << "Algorithm::EndRun is deprecated. Use Stop instead" << endmsg;
425 }
426
427 return sc;
428 }
429
430 #pragma GCC diagnostic push
431 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
432 StatusCode Algorithm::endRun() {
433 m_endRunCalled = false;
434 return StatusCode::SUCCESS;
435 }
436 #pragma GCC diagnostic pop
437
438 StatusCode Algorithm::sysExecute( const EventContext& ctx ) {
439 if ( !isEnabled() ) {
440 if ( msgLevel( MSG::VERBOSE ) ) { verbose() << ".sysExecute(): is not enabled. Skip execution" << endmsg; }
441 return StatusCode::SUCCESS;
442 }
443
444 AlgExecState& algState = execState( ctx );
445 algState.setState( AlgExecState::State::Executing );
446 StatusCode status;
447
448 // Should performance profile be performed ?
449 // invoke execute() method of Algorithm class
450 // and catch all uncaught exceptions
451
452 // lock the context service
453 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr, ctx );
454
455 Gaudi::Guards::AuditorGuard guard( this,
456 // check if we want to audit the initialize
457 ( m_auditorExecute ) ? auditorSvc().get() : nullptr, IAuditor::Execute, status );
458
459 try {
460 ITimelineSvc::TimelineRecorder timelineRecoder;
461 if ( UNLIKELY( m_doTimeline ) ) { timelineRecoder = timelineSvc()->getRecorder( name(), ctx ); }
462
463 status = execute( ctx );
464
465 if ( status.isFailure() ) { status = exceptionSvc()->handleErr( *this, status ); }
466
467 } catch ( const GaudiException& Exception ) {
468
469 if ( Exception.code() == StatusCode::FAILURE ) {
470 fatal();
471 } else {
472 error() << " Recoverable";
473 }
474
475 msgStream() << " Exception with tag=" << Exception.tag() << " is caught " << endmsg;
476
477 error() << Exception << endmsg;
478
479 // Stat stat( chronoSvc() , Exception.tag() ) ;
480 status = exceptionSvc()->handle( *this, Exception );
481 } catch ( const std::exception& Exception ) {
482
483 fatal() << " Standard std::exception is caught " << endmsg;
484 error() << Exception.what() << endmsg;
485 // Stat stat( chronoSvc() , "*std::exception*" ) ;
486 status = exceptionSvc()->handle( *this, Exception );
487 } catch ( ... ) {
488
489 fatal() << "UNKNOWN Exception is caught " << endmsg;
490 // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
491
492 status = exceptionSvc()->handle( *this );
493 }
494
495 if ( status.isFailure() ) {
496 // Increment the error count
497 unsigned int nerr = m_aess->incrementErrorCount( this );
498 // Check if maximum is exeeded
499 if ( nerr < m_errorMax ) {
500 warning() << "Continuing from error (cnt=" << nerr << ", max=" << m_errorMax << ")" << endmsg;
501 // convert to success
502 status = StatusCode::SUCCESS;
503 } else {
504 error() << "Maximum number of errors (" << m_errorMax << ") reached." << endmsg;
505 }
506 }
507
508 algState.setState( AlgExecState::State::Done, status );
509
510 return status;
511 }
512
513 // IAlgorithm implementation
514 StatusCode Algorithm::sysStop() {
515
516 // Bypass the startup if already running or disabled.
517 if ( Gaudi::StateMachine::INITIALIZED == FSMState() || !isEnabled() ) return StatusCode::SUCCESS;
518
519 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::STOP, m_state );
520
521 // lock the context service
522 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
523
524 StatusCode sc( StatusCode::FAILURE );
525 // Invoke stop() method of the derived class inside a try/catch clause
526 try {
527 { // limit the scope of the guard
528 Gaudi::Guards::AuditorGuard guard( this,
529 // check if we want to audit the initialize
530 ( m_auditorStop ) ? auditorSvc().get() : nullptr, IAuditor::Stop );
531
532 // Invoke the stop() method of the derived class
533 sc = stop();
534 }
535 if ( sc.isSuccess() ) {
536 // Update the state.
537 m_state = m_targetState;
538 }
539 } catch ( const GaudiException& Exception ) {
540 fatal() << "in sysStop(): exception with tag=" << Exception.tag() << " is caught" << endmsg;
541 error() << Exception << endmsg;
542 Stat stat( chronoSvc(), Exception.tag() );
543 sc = StatusCode::FAILURE;
544 } catch ( const std::exception& Exception ) {
545 fatal() << "in sysStop(): standard std::exception is caught" << endmsg;
546 error() << Exception.what() << endmsg;
547 Stat stat( chronoSvc(), "*std::exception*" );
548 sc = StatusCode::FAILURE;
549 } catch ( ... ) {
550 fatal() << "in sysStop(): UNKNOWN Exception is caught" << endmsg;
551 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
552 sc = StatusCode::FAILURE;
553 }
554
555 return sc;
556 }
557
558 StatusCode Algorithm::sysFinalize() {
559
560 // Bypass the finalialization if the algorithm hasn't been initilized.
561 if ( Gaudi::StateMachine::CONFIGURED == FSMState() || !isEnabled() ) return StatusCode::SUCCESS;
562
563 m_targetState = Gaudi::StateMachine::ChangeState( Gaudi::StateMachine::FINALIZE, m_state );
564
565 // lock the context service
566 Gaudi::Utils::AlgContext cnt( this, registerContext() ? contextSvc().get() : nullptr );
567
568 StatusCode sc( StatusCode::FAILURE );
569 // Invoke finalize() method of the derived class inside a try/catch clause
570 try {
571 { // limit the scope of the guard
572 Gaudi::Guards::AuditorGuard guard( this,
573 // check if we want to audit the initialize
574 ( m_auditorFinalize ) ? auditorSvc().get() : nullptr, IAuditor::Finalize );
575 // Invoke the finalize() method of the derived class
576 sc = finalize();
577 }
578 if ( sc.isSuccess() ) {
579
580 if ( auto nCnt = nOfCountersToBePrinted(); nCnt ) {
581 auto& os = info() << "Number of counters : " << nCnt
582 << "\n | Counter |";
583 forEachCounter( [&]( const std::string& label, const auto& counter ) {
584 if ( counter.toBePrinted() ) counter.print( os << '\n', label );
585 } );
586 os << endmsg;
587 }
588
589 // Indicate that this Algorithm has been finalized to prevent duplicate attempts
590 m_state = m_targetState;
591 }
592 } catch ( const GaudiException& Exception ) {
593 fatal() << " Exception with tag=" << Exception.tag() << " is caught " << endmsg;
594 error() << Exception << endmsg;
595 Stat stat( chronoSvc(), Exception.tag() );
596 sc = StatusCode::FAILURE;
597 } catch ( const std::exception& Exception ) {
598 fatal() << " Standard std::exception is caught " << endmsg;
599 error() << Exception.what() << endmsg;
600 Stat stat( chronoSvc(), "*std::exception*" );
601 sc = StatusCode::FAILURE;
602 } catch ( ... ) {
603 fatal() << "UNKNOWN Exception is caught " << endmsg;
604 Stat stat( chronoSvc(), "*UNKNOWN Exception*" );
605 sc = StatusCode::FAILURE;
606 }
607 return sc;
608 }
609
610 StatusCode Algorithm::reinitialize() {
611 /* @TODO
612 * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
613 * is causing too many problems
614 *
615 // Default implementation is finalize+initialize
616 StatusCode sc = finalize();
617 if (sc.isFailure()) {
618 error() << "reinitialize(): cannot be finalized" << endmsg;
619 return sc;
620 }
621 sc = initialize();
622 if (sc.isFailure()) {
623 error() << "reinitialize(): cannot be initialized" << endmsg;
624 return sc;
625 }
626 */
627 return StatusCode::SUCCESS;
628 }
629
630 StatusCode Algorithm::restart() {
631 // Default implementation is stop+start
632 StatusCode sc = stop();
633 if ( sc.isFailure() ) {
634 error() << "restart(): cannot be stopped" << endmsg;
635 return sc;
636 }
637 sc = start();
638 if ( sc.isFailure() ) {
639 error() << "restart(): cannot be started" << endmsg;
640 return sc;
641 }
642 return StatusCode::SUCCESS;
643 }
644
645 const std::string& Algorithm::name() const { return m_name.str(); }
646
647 const Gaudi::StringKey& Algorithm::nameKey() const { return m_name; }
648
649 const std::string& Algorithm::version() const { return m_version; }
650
651 unsigned int Algorithm::index() const { return m_index; }
652
653 void Algorithm::setIndex( const unsigned int& idx ) { m_index = idx; }
654
655 bool Algorithm::isEnabled() const { return m_isEnabled; }
656
657 AlgExecState& Algorithm::execState( const EventContext& ctx ) const {
658 return algExecStateSvc()->algExecState( const_cast<IAlgorithm*>( (const IAlgorithm*)this ), ctx );
659 }
660
661 template <typename IFace>
662 SmartIF<IFace>& Algorithm::get_svc_( SmartIF<IFace>& p, const char* service_name ) const {
663 if ( UNLIKELY( !p ) ) {
664 p = this->service( service_name );
665 if ( !p ) {
666 throw GaudiException( "Service [" + std::string{service_name} + "] not found", this->name(),
667 StatusCode::FAILURE );
668 }
669 }
670 return p;
671 }
672
673 SmartIF<IAlgExecStateSvc>& Algorithm::algExecStateSvc() const { return get_svc_( m_aess, "AlgExecStateSvc" ); }
674 SmartIF<IAuditorSvc>& Algorithm::auditorSvc() const { return get_svc_( m_pAuditorSvc, "AuditorSvc" ); }
675 SmartIF<IChronoStatSvc>& Algorithm::chronoSvc() const { return get_svc_( m_CSS, "ChronoStatSvc" ); }
676 SmartIF<IDataProviderSvc>& Algorithm::detSvc() const { return get_svc_( m_DDS, "DetectorDataSvc" ); }
677 SmartIF<IConversionSvc>& Algorithm::detCnvSvc() const { return get_svc_( m_DCS, "DetectorPersistencySvc" ); }
678 SmartIF<IDataProviderSvc>& Algorithm::eventSvc() const { return get_svc_( m_EDS, "EventDataSvc" ); }
679 SmartIF<IConversionSvc>& Algorithm::eventCnvSvc() const { return get_svc_( m_ECS, "EventPersistencySvc" ); }
680 SmartIF<IHistogramSvc>& Algorithm::histoSvc() const { return get_svc_( m_HDS, "HistogramDataSvc" ); }
681 SmartIF<INTupleSvc>& Algorithm::ntupleSvc() const { return get_svc_( m_NTS, "NTupleSvc" ); }
682 SmartIF<IRndmGenSvc>& Algorithm::randSvc() const { return get_svc_( m_RGS, "RndmGenSvc" ); }
683 SmartIF<IToolSvc>& Algorithm::toolSvc() const { return get_svc_( m_ptoolSvc, "ToolSvc" ); }
684 SmartIF<IExceptionSvc>& Algorithm::exceptionSvc() const { return get_svc_( m_EXS, "ExceptionSvc" ); }
685 SmartIF<IAlgContextSvc>& Algorithm::contextSvc() const { return get_svc_( m_contextSvc, "AlgContextSvc" ); }
686 SmartIF<ITimelineSvc>& Algorithm::timelineSvc() const { return get_svc_( m_timelineSvc, "TimelineSvc" ); }
687 SmartIF<IHiveWhiteBoard>& Algorithm::whiteboard() const { return get_svc_( m_WB, "EventDataSvc" ); }
688
689 SmartIF<ISvcLocator>& Algorithm::serviceLocator() const {
690 return *const_cast<SmartIF<ISvcLocator>*>( &m_pSvcLocator );
691 }
692
693 // Use the job options service to set declared properties
694 StatusCode Algorithm::setProperties() {
695 if ( !m_pSvcLocator ) return StatusCode::FAILURE;
696 auto jos = m_pSvcLocator->service<IJobOptionsSvc>( "JobOptionsSvc" );
697 if ( !jos ) return StatusCode::FAILURE;
698
699 // this initializes the messaging, in case property update handlers need to print
700 // and update the property value bypassing the update handler
701 m_outputLevel.value() = setUpMessaging();
702
703 return jos->setMyProperties( name(), this );
704 }
705
706 void Algorithm::initToolHandles() const {
707
708 IAlgTool* tool = nullptr;
709 for ( auto thArr : m_toolHandleArrays ) {
710 if ( !thArr->retrieved() ) {
711 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
712 debug() << "ToolHandleArray " << thArr->propertyName() << " not used: not registering any of its Tools"
713 << endmsg;
714 } else {
715 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
716 debug() << "Registering all Tools in ToolHandleArray " << thArr->propertyName() << endmsg;
717 // Iterate over its tools:
718 for ( auto toolHandle : thArr->getBaseArray() ) {
719 // Try to cast it into a BaseToolHandle pointer:
720 BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
721 if ( bth ) {
722 // If the cast was successful, the code is pretty simple:
723 tool = bth->get();
724 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
725 debug() << "Adding " << ( bth->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name()
726 << " (" << tool->type() << ") from ToolHandleArray " << thArr->propertyName() << endmsg;
727 }
728 m_tools.push_back( tool );
729 } else {
730 // If it wasn't for some strange reason, then fall back on the
731 // logic implemented previously:
732 if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, this, false ).isSuccess() ) {
733 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
734 debug() << "Adding private"
735 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
736 << thArr->propertyName() << endmsg;
737 }
738 m_tools.push_back( tool );
739 } else if ( toolSvc()->retrieveTool( toolHandle->typeAndName(), tool, 0, false ).isSuccess() ) {
740 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) ) {
741 debug() << "Adding public"
742 << " ToolHandle tool " << tool->name() << " (" << tool->type() << ") from ToolHandleArray "
743 << thArr->propertyName() << endmsg;
744 }
745 m_tools.push_back( tool );
746 } else {
747 warning() << "Error retrieving Tool " << toolHandle->typeAndName() << " in ToolHandleArray "
748 << thArr->propertyName() << ". Not registered" << endmsg;
749 }
750 }
751 }
752 }
753 }
754
755 for ( auto th : m_toolHandles ) {
756 if ( !th->isEnabled() ) {
757 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) && !th->typeAndName().empty() )
758 debug() << "ToolHandle " << th->typeAndName() << " not used" << endmsg;
759 continue;
760 }
761 if ( !th->get() ) {
762 auto sc = th->retrieve();
763 if ( UNLIKELY( sc.isFailure() ) ) {
764 throw GaudiException( "Failed to retrieve tool " + th->typeAndName(), this->name(), StatusCode::FAILURE );
765 }
766 }
767 tool = th->get();
768 if ( UNLIKELY( msgLevel( MSG::DEBUG ) ) )
769 debug() << "Adding " << ( th->isPublic() ? "public" : "private" ) << " ToolHandle tool " << tool->name() << " ("
770 << tool->type() << ")" << endmsg;
771 m_tools.push_back( tool );
772 }
773
774 m_toolHandlesInit = true;
775 }
776
777 const std::vector<IAlgTool*>& Algorithm::tools() const {
778 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
779 return m_tools;
780 }
781
782 std::vector<IAlgTool*>& Algorithm::tools() {
783 if ( UNLIKELY( !m_toolHandlesInit ) ) initToolHandles();
784 return m_tools;
785 }
786
791 StatusCode Algorithm::service_i( const std::string& svcName, bool createIf, const InterfaceID& iid,
792 void** ppSvc ) const {
793 const ServiceLocatorHelper helper( *serviceLocator(), *this );
794 return helper.getService( svcName, createIf, iid, ppSvc );
795 }
796
797 StatusCode Algorithm::service_i( const std::string& svcType, const std::string& svcName, const InterfaceID& iid,
798 void** ppSvc ) const {
799 const ServiceLocatorHelper helper( *serviceLocator(), *this );
800 return helper.createService( svcType, svcName, iid, ppSvc );
801 }
802
803 SmartIF<IService> Algorithm::service( const std::string& name, const bool createIf, const bool quiet ) const {
804 const ServiceLocatorHelper helper( *serviceLocator(), *this );
805 return helper.service( name, quiet, createIf );
806 }
807
808 void Algorithm::registerTool( IAlgTool* tool ) const {
809 if ( msgLevel( MSG::DEBUG ) ) { debug() << "Registering tool " << tool->name() << endmsg; }
810 m_tools.push_back( tool );
811 }
812
813 void Algorithm::deregisterTool( IAlgTool* tool ) const {
814 std::vector<IAlgTool*>::iterator it = std::find( m_tools.begin(), m_tools.end(), tool );
815 if ( it != m_tools.end() ) {
816 if ( msgLevel( MSG::DEBUG ) ) debug() << "De-Registering tool " << tool->name() << endmsg;
817 m_tools.erase( it );
818 } else {
819 if ( msgLevel( MSG::DEBUG ) ) debug() << "Could not de-register tool " << tool->name() << endmsg;
820 }
821 }
822
823 std::ostream& Algorithm::toControlFlowExpression( std::ostream& os ) const {
824 return os << type() << "('" << name() << "')";
825 }
826
827 unsigned int Algorithm::errorCount() const { return m_aess->algErrorCount( static_cast<const IAlgorithm*>( this ) ); }
828 } // namespace Gaudi
IAuditor::Start
Definition: IAuditor.h:24
IAuditor::BeginRun
Definition: IAuditor.h:24
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:96
ServiceLocatorHelper
an helper to share the implementation of service() among the various kernel base classes
Definition: ServiceLocatorHelper.h:17
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
Gaudi::Algorithm::service_i
StatusCode service_i(const std::string &svcName, bool createIf, const InterfaceID &iid, void **ppSvc) const
implementation of service method
Definition: Algorithm.cpp:791
Gaudi::Algorithm::initToolHandles
void initToolHandles() const
Definition: Algorithm.cpp:706
SmartIF
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:15
Kernel.h
Gaudi::Algorithm::restart
StatusCode restart() override
the default (empty) implementation of IStateful::restart() method
Definition: Algorithm.cpp:630
Gaudi::Algorithm::detSvc
SmartIF< IDataProviderSvc > & detSvc() const
The standard detector data service.
Definition: Algorithm.cpp:676
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:21
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Gaudi::Algorithm::errorCount
unsigned int errorCount() const
Get the number of failures of the algorithm.
Definition: Algorithm.cpp:827
Gaudi::Algorithm::ntupleSvc
SmartIF< INTupleSvc > & ntupleSvc() const
The standard N tuple service.
Definition: Algorithm.cpp:681
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:14
Gaudi::Utils::AlgContext
Helper "sentry" class to automatize the safe register/unregister the algorithm's context.
Definition: IAlgContextSvc.h:74
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Algorithm::sysStart
StatusCode sysStart() override
Reinitialization method invoked by the framework.
Definition: Algorithm.cpp:202
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
DataObjID
Definition: DataObjID.h:37
MsgStream.h
IAuditor::Stop
Definition: IAuditor.h:24
Gaudi::Algorithm::timelineSvc
SmartIF< ITimelineSvc > & timelineSvc() const
Definition: Algorithm.cpp:686
Gaudi::StateMachine::FINALIZE
Definition: StateMachine.h:28
Stat
Small wrapper class for easy manipulation with generic counters and IStatSvc interface.
Definition: Stat.h:46
IAuditor::ReInitialize
Definition: IAuditor.h:24
Gaudi::Algorithm::whiteboard
SmartIF< IHiveWhiteBoard > & whiteboard() const
Definition: Algorithm.cpp:687
IAuditorSvc.h
AlgTool.h
Gaudi::Algorithm::sysRestart
StatusCode sysRestart() override
Restart method invoked by the framework.
Definition: Algorithm.cpp:292
Gaudi::Algorithm::Algorithm
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:48
Gaudi::Algorithm::version
const std::string & version() const override
Definition: Algorithm.cpp:649
MSG::DEBUG
Definition: IMessageSvc.h:15
GaudiException::tag
virtual const std::string & tag() const
name tag for the exception, or exception type
Definition: GaudiException.h:67
Gaudi::Algorithm::sysInitialize
StatusCode sysInitialize() override
Initialization method invoked by the framework.
Definition: Algorithm.cpp:55
Gaudi::Algorithm::get_svc_
SmartIF< IFace > & get_svc_(SmartIF< IFace > &p, const char *service_name) const
Definition: Algorithm.cpp:662
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
BaseToolHandle
Non-templated base class for actual ToolHandle<T>.
Definition: ToolHandle.h:69
Gaudi::Algorithm::setIndex
void setIndex(const unsigned int &idx) override
set instantiation index of Alg
Definition: Algorithm.cpp:653
Gaudi::Algorithm::toolSvc
SmartIF< IToolSvc > & toolSvc() const
The standard ToolSvc service, Return a pointer to the service if present.
Definition: Algorithm.cpp:683
Chrono.h
Gaudi::Algorithm::deregisterTool
void deregisterTool(IAlgTool *tool) const
Definition: Algorithm.cpp:813
std::unordered_set::end
T end(T... args)
Gaudi::Algorithm::toControlFlowExpression
std::ostream & toControlFlowExpression(std::ostream &os) const override
Produce string represention of the control flow expression.
Definition: Algorithm.cpp:823
Gaudi::Algorithm::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
Definition: Algorithm.cpp:689
Gaudi::Algorithm::index
unsigned int index() const override
Definition: Algorithm.cpp:651
MSG::VERBOSE
Definition: IMessageSvc.h:15
IToolSvc.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
IOTest.start
def start
Definition: IOTest.py:97
DataObjID::fullKey
std::string fullKey() const
Definition: DataObjID.cpp:88
IAuditor::ReStart
Definition: IAuditor.h:24
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition: StringKey.h:34
Gaudi::Algorithm::sysFinalize
StatusCode sysFinalize() override
System finalization.
Definition: Algorithm.cpp:558
Gaudi::Algorithm::sysBeginRun
StatusCode sysBeginRun() override
beginRun method invoked by the framework.
Definition: Algorithm.cpp:334
AlgExecState::setState
void setState(State s)
Definition: IAlgExecStateSvc.h:36
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.
std::string
STL class.
Gaudi::Algorithm::setProperties
StatusCode setProperties()
Set the algorithm's properties.
Definition: Algorithm.cpp:694
Gaudi::Algorithm::eventSvc
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
Definition: Algorithm.cpp:678
IDataHandleVisitor::visit
virtual void visit(const IDataHandleHolder *)=0
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:76
Gaudi::Algorithm::sysReinitialize
StatusCode sysReinitialize() override
Reinitialization method invoked by the framework.
Definition: Algorithm.cpp:246
InterfaceID
Interface ID class.
Definition: IInterface.h:29
Gaudi::StateMachine::INITIALIZE
Definition: StateMachine.h:25
IDataManagerSvc.h
IDataProviderSvc.h
IJobOptionsSvc
Main interface for the JobOptions service.
Definition: IJobOptionsSvc.h:20
std::exception::what
T what(T... args)
Algorithm.h
Gaudi::Algorithm::service
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:215
Gaudi::Details::getDefaultAuditorValue
bool getDefaultAuditorValue(ISvcLocator *loc)
Definition: Algorithm.cpp:36
Gaudi::Algorithm::tools
const std::vector< IAlgTool * > & tools() const
Definition: Algorithm.cpp:777
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
ToolHandleInfo::isPublic
bool isPublic() const noexcept
Definition: ToolHandle.h:40
GaudiException.h
gaudirun.type
type
Definition: gaudirun.py:142
IAuditor::Finalize
Definition: IAuditor.h:24
Gaudi::Algorithm::nameKey
const Gaudi::StringKey & nameKey() const override
Definition: Algorithm.cpp:647
Guards.h
Gaudi::Algorithm::auditorSvc
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Algorithm.cpp:674
DHHVisitor
Definition: DataHandleHolderVisitor.h:8
StringKey.h
std::unordered_set
STL class.
IMessageSvc.h
DataHandleHolderVisitor.h
IAlgTool::type
virtual const std::string & type() const =0
The type of an AlgTool, meaning the concrete AlgTool class.
StatusCode::isSuccess
bool isSuccess() const
Definition: StatusCode.h:267
std::exception
STL class.
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
IAuditor::Initialize
Definition: IAuditor.h:24
Gaudi::Algorithm::beginRun
StatusCode beginRun() override
Algorithm begin run.
Definition: Algorithm.cpp:380
Gaudi::StateMachine::STOP
Definition: StateMachine.h:27
Gaudi::Algorithm::contextSvc
SmartIF< IAlgContextSvc > & contextSvc() const
get Algorithm Context Service
Definition: Algorithm.cpp:685
Gaudi::Algorithm::detCnvSvc
SmartIF< IConversionSvc > & detCnvSvc() const
The standard detector data persistency conversion service.
Definition: Algorithm.cpp:677
Gaudi::Algorithm::registerTool
void registerTool(IAlgTool *tool) const
Definition: Algorithm.cpp:808
GaudiException::code
virtual const StatusCode & code() const
StatusCode for Exception.
Definition: GaudiException.h:76
IDataHandleVisitor
Definition: IDataHandleHolder.h:35
Gaudi::Algorithm::reinitialize
StatusCode reinitialize() override
the default (empty) implementation of IStateful::reinitialize() method
Definition: Algorithm.cpp:610
IAlgContextSvc.h
std::unordered_set::find
T find(T... args)
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
std::set
STL class.
Gaudi::Algorithm::eventCnvSvc
SmartIF< IConversionSvc > & eventCnvSvc() const
The standard event data persistency conversion service.
Definition: Algorithm.cpp:679
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
std::vector< IAlgTool * >
IRndmGenSvc.h
plotSpeedupsPyRoot.counter
int counter
Definition: plotSpeedupsPyRoot.py:147
Gaudi::Algorithm::acceptDHVisitor
void acceptDHVisitor(IDataHandleVisitor *) const override
Definition: Algorithm.cpp:194
Gaudi::Algorithm::algExecStateSvc
SmartIF< IAlgExecStateSvc > & algExecStateSvc() const
Definition: Algorithm.cpp:673
Gaudi::StateMachine::ChangeState
State GAUDI_API ChangeState(const Transition transition, const State state)
Function to get the new state according to the required transition, checking if the transition is all...
Definition: StateMachine.cpp:9
IConversionSvc.h
Gaudi::Algorithm::execState
AlgExecState & execState(const EventContext &ctx) const override
reference to AlgExecState of Alg
Definition: Algorithm.cpp:657
genconfuser.verbose
verbose
Definition: genconfuser.py:19
Gaudi::Algorithm::exceptionSvc
SmartIF< IExceptionSvc > & exceptionSvc() const
Get the exception Service.
Definition: Algorithm.cpp:684
IAlgTool
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
ToolHandle.h
IAuditor::Execute
Definition: IAuditor.h:24
std::unordered_set::emplace
T emplace(T... args)
IOTest.appMgr
appMgr
Definition: IOTest.py:92
Gaudi::StateMachine::START
Definition: StateMachine.h:26
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
ServiceLocatorHelper.h
Stat.h
IAlgManager.h
ITimelineSvc::TimelineRecorder
RAII helper to record timeline events.
Definition: ITimelineSvc.h:34
IAuditor::EndRun
Definition: IAuditor.h:24
std::sort
T sort(T... args)
Gaudi::Algorithm::sysStop
StatusCode sysStop() override
System stop.
Definition: Algorithm.cpp:514
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:130
Gaudi::Algorithm::isEnabled
bool isEnabled() const override
Is this algorithm enabled or disabled?
Definition: Algorithm.cpp:655
IProperty
The IProperty is the basic interface for all components which have properties that can be set or get.
Definition: IProperty.h:20
Gaudi::Guards::AuditorGuard
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
Definition: Guards.h:203
Gaudi::Algorithm::histoSvc
SmartIF< IHistogramSvc > & histoSvc() const
The standard histogram service.
Definition: Algorithm.cpp:680
Gaudi::Algorithm::sysEndRun
StatusCode sysEndRun() override
endRun method invoked by the framework.
Definition: Algorithm.cpp:387
Gaudi::Algorithm::endRun
StatusCode endRun() override
Algorithm end run. This method is called at the end of the event loop.
Definition: Algorithm.cpp:432
Gaudi::Algorithm::randSvc
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
Definition: Algorithm.cpp:682
AlgExecState
Definition: IAlgExecStateSvc.h:27
std::ostream
STL class.
ISvcLocator.h
BaseToolHandle::get
const IAlgTool * get() const
Definition: ToolHandle.h:83
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192
Gaudi::Algorithm::chronoSvc
SmartIF< IChronoStatSvc > & chronoSvc() const
The standard Chrono & Stat service, Return a pointer to the service if present.
Definition: Algorithm.cpp:675
Gaudi::Algorithm::name
const std::string & name() const override
The identifying name of the algorithm object.
Definition: Algorithm.cpp:645
Gaudi::Algorithm::sysExecute
StatusCode sysExecute(const EventContext &ctx) override
The actions to be performed by the algorithm on an event.
Definition: Algorithm.cpp:438
IExceptionSvc.h
INTupleSvc.h
IHistogramSvc.h
IJobOptionsSvc.h