![]() |
ATLAS Offline Software
|
The default ATLAS batch event loop manager. More...
#include <AthenaHiveEventLoopMgr.h>
Public Types | |
| typedef IEvtSelector::Context | EvtContext |
| typedef std::list< SmartIF< IAlgorithm > > | ListAlg |
Public Member Functions | |
| StatusCode | getEventRoot (IOpaqueAddress *&refpAddr) |
| Create event address using event selector. | |
| AthenaHiveEventLoopMgr (const std::string &nam, ISvcLocator *svcLoc) | |
| Standard Constructor. | |
| virtual | ~AthenaHiveEventLoopMgr () |
| Standard Destructor. | |
| virtual StatusCode | initialize () override |
| implementation of IAppMgrUI::initalize | |
| virtual StatusCode | finalize () override |
| implementation of IAppMgrUI::finalize | |
| virtual StatusCode | nextEvent (int maxevt) override |
| implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately | |
| virtual StatusCode | executeEvent (EventContext &&ctx) override |
| implementation of IEventProcessor::executeEvent(void* par) | |
| virtual StatusCode | executeRun (int maxevt) override |
| implementation of IEventProcessor::executeRun(int maxevt) | |
| virtual StatusCode | stopRun () override |
| implementation of IEventProcessor::stopRun() | |
| virtual StatusCode | stop () override |
| implementation of IService::stop | |
| virtual StatusCode | seek (int evt) override |
| Seek to a given event. | |
| virtual int | curEvent () const override |
| Return the current event count. | |
| virtual int | size () override |
| Return the size of the collection. | |
| virtual void | handle (const Incident &inc) override |
| IIncidentListenet interfaces. | |
| virtual const std::string & | name () const override |
| virtual void | modifyEventContext (EventContext &ctx, const EventID &eID, bool consume_modifier_stream) |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Protected Types | |
| typedef ServiceHandle< IIncidentSvc > | IIncidentSvc_t |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
| typedef ServiceHandle< IDataManagerSvc > | IDataManagerSvc_t |
| typedef ServiceHandle< IConversionSvc > | IConversionSvc_t |
| typedef ServiceHandle< IEvtIdModifierSvc > | IEvtIdModifierSvc_t |
| typedef EventID::number_type | number_type |
| typedef IAthenaEvtLoopPreSelectTool | tool_type |
| typedef ToolHandleArray< tool_type > | tool_store |
| typedef tool_store::const_iterator | tool_iterator |
| typedef std::vector< unsigned int > | tool_stats |
| typedef tool_stats::const_iterator | tool_stats_iterator |
Protected Member Functions | |
| void | setupPreSelectTools (Gaudi::Details::PropertyBase &) |
| property update handler:sets up the Pre-selection tools | |
| virtual StatusCode | writeHistograms (bool force=false) |
| Dump out histograms as needed. | |
| virtual StatusCode | executeAlgorithms () |
| Run the algorithms for the current event. | |
| StatusCode | initializeAlgorithms () |
| Initialize all algorithms and output streams. | |
| StatusCode | clearWBSlot (int evtSlot) |
| Clear a slot in the WB. | |
| int | declareEventRootAddress (EventContext &) |
| Declare the root address of the event. | |
| virtual EventContext | createEventContext () override |
| Create event context. | |
| void | setTimeout (Timeout &instance) |
| Set timeout. | |
| void | resetTimeout (Timeout &instance) |
| Reset timeout. | |
Event lifecycle for derived loop managers | |
Called on the driving thread, in the order declared below; executeEvent() is the reference composition:
| |
| EventContext | allocateEventContext (size_t eventNumber) |
| StatusCode | submitEvent (EventContext &ctx) |
| Submit a recorded context; the scheduler receives its own copy. | |
| StatusCode | finishEvent (const EventContext &ctx) |
| Finish one scheduler-returned event on the driving thread. | |
| virtual StatusCode | eventFinished (const EventContext &ctx) |
| Process an event's result and decide whether the driving loop may continue. | |
| virtual bool | clearStoreOnEndAlgorithms () const |
| Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result. | |
| int | drainScheduler (int &finishedEvents) |
| Drain the scheduler from all actions that may be queued. | |
Protected Attributes | |
| IIncidentSvc_t | m_incidentSvc |
| Reference to the incident service. | |
| StoreGateSvc_t | m_eventStore |
| Reference to StoreGateSvc;. | |
| IEvtSelector * | m_evtSelector |
| Reference to the Event Selector. | |
| EvtContext * | m_evtContext |
| Gaudi event selector Context (may be used as a cursor by the evt selector). | |
| StringProperty | m_evtsel |
| IDataManagerSvc_t | m_histoDataMgrSvc |
| Reference to the Histogram Data Service. | |
| IConversionSvc_t | m_histoPersSvc |
| IEvtIdModifierSvc_t | m_evtIdModSvc |
| StringProperty | m_histPersName |
| number_type | m_currentRun |
| current run number | |
| bool | m_firstRun |
| IntegerProperty | m_failureMode |
| UnsignedIntegerProperty | m_eventPrintoutInterval |
| tool_stats | m_toolInvoke |
| tool called counter | |
| tool_stats | m_toolReject |
| tool returns StatusCode::FAILURE counter | |
| tool_stats | m_toolAccept |
| tool returns StatusCode::SUCCESS counter | |
| tool_store | m_tools |
| internal tool store | |
| bool | m_requireInputAttributeList {} |
| require input attribute list | |
| bool | m_useSecondaryEventNumber {} |
| read event number from secondary input | |
| SmartIF< IHiveWhiteBoard > | m_whiteboard |
| Reference to the Whiteboard interface. | |
| SmartIF< IAlgResourcePool > | m_algResourcePool |
| Reference to the Algorithm resource pool. | |
| SmartIF< IAlgExecStateSvc > | m_aess |
| Reference to the Algorithm Execution State Svc. | |
| SmartIF< IProperty > | m_appMgrProperty |
| Property interface of ApplicationMgr. | |
| SmartIF< IScheduler > | m_schedulerSvc |
| A shortcut for the scheduler. | |
| SmartIF< IIncidentListener > | m_abortEventListener |
| Instance of the incident listener waiting for AbortEvent. | |
| std::string | m_schedulerName |
| Name of the scheduler to be used. | |
| std::string | m_whiteboardName |
| Name of the Whiteboard to be used. | |
| bool | m_scheduledStop |
| Scheduled stop of event processing. | |
| bool | m_terminateLoop { false } |
| unsigned int | m_nev |
| events processed | |
| unsigned int | m_proc |
| bool | m_useTools |
| bool | m_doEvtHeartbeat |
| EventContext | m_lastEventContext |
Private Member Functions | |
| AthenaHiveEventLoopMgr ()=delete | |
| AthenaHiveEventLoopMgr (const AthenaHiveEventLoopMgr &)=delete | |
| AthenaHiveEventLoopMgr & | operator= (const AthenaHiveEventLoopMgr &)=delete |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| unsigned int | m_nevt |
| unsigned int | m_timeStamp { 0 } |
| UnsignedIntegerProperty | m_writeInterval |
| bool | m_writeHists |
| bool | m_firstEventAlone |
| unsigned int | m_flmbi |
| unsigned int | m_timeStampInt |
| ServiceHandle< Athena::IConditionsCleanerSvc > | m_conditionsCleaner |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
The default ATLAS batch event loop manager.
It loops over input events according to job configuration. Among the main user-settable properties "FailureMode" controls behaviour of event loop depending on return code of Algorithms.
Definition at line 68 of file AthenaHiveEventLoopMgr.h.
| typedef IEvtSelector::Context AthenaHiveEventLoopMgr::EvtContext |
Definition at line 74 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 96 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 92 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 100 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 77 of file AthenaHiveEventLoopMgr.h.
| typedef std::list<SmartIF<IAlgorithm> > AthenaHiveEventLoopMgr::ListAlg |
Definition at line 291 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 107 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 81 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 121 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 122 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 123 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 120 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 119 of file AthenaHiveEventLoopMgr.h.
| AthenaHiveEventLoopMgr::AthenaHiveEventLoopMgr | ( | const std::string & | nam, |
| ISvcLocator * | svcLoc ) |
Standard Constructor.
Definition at line 64 of file AthenaHiveEventLoopMgr.cxx.
|
virtual |
|
privatedelete |
|
privatedelete |
|
protected |
Allocate/select a slot, with an index supplied by the driving loop.
Definition at line 1149 of file AthenaHiveEventLoopMgr.cxx.
|
inlineprotectedvirtual |
Batch jobs clear in the algorithm context; external drivers can retain the store until eventFinished() has consumed their result.
Definition at line 198 of file AthenaHiveEventLoopMgr.h.
|
protected |
Clear a slot in the WB.
Definition at line 1298 of file AthenaHiveEventLoopMgr.cxx.
|
overrideprotectedvirtual |
Create event context.
Definition at line 1145 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
Return the current event count.
Definition at line 796 of file AthenaHiveEventLoopMgr.cxx.
|
protected |
Declare the root address of the event.
FIXME ???
Definition at line 924 of file AthenaHiveEventLoopMgr.cxx.
|
protected |
Drain the scheduler from all actions that may be queued.
Definition at line 1245 of file AthenaHiveEventLoopMgr.cxx.
|
protectedvirtual |
Process an event's result and decide whether the driving loop may continue.
Reimplemented in MPIHiveEventLoopMgr.
Definition at line 1187 of file AthenaHiveEventLoopMgr.cxx.
|
protectedvirtual |
Run the algorithms for the current event.
Definition at line 479 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IEventProcessor::executeEvent(void* par)
Fire begin-Run incident if new run:
Definition at line 488 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IEventProcessor::executeRun(int maxevt)
Definition at line 609 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IAppMgrUI::finalize
Reimplemented in MPIHiveEventLoopMgr.
Definition at line 356 of file AthenaHiveEventLoopMgr.cxx.
|
protected |
Finish one scheduler-returned event on the driving thread.
Calls the result hook with its store selected, then releases the slot even if the hook reports failure. Does not wait for or delete the context.
Definition at line 1197 of file AthenaHiveEventLoopMgr.cxx.
| StatusCode AthenaHiveEventLoopMgr::getEventRoot | ( | IOpaqueAddress *& | refpAddr | ) |
Create event address using event selector.
Definition at line 902 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
IIncidentListenet interfaces.
Definition at line 826 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IAppMgrUI::initalize
Reimplemented in MPIHiveEventLoopMgr.
Definition at line 138 of file AthenaHiveEventLoopMgr.cxx.
|
protected |
Initialize all algorithms and output streams.
Definition at line 471 of file AthenaHiveEventLoopMgr.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
virtual |
Definition at line 1115 of file AthenaHiveEventLoopMgr.cxx.
|
inline |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 92 of file AthMessaging.h.
|
inline |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 99 of file AthMessaging.h.
|
inline |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 86 of file AthMessaging.h.
|
inlineoverridevirtual |
Definition at line 255 of file AthenaHiveEventLoopMgr.h.
|
overridevirtual |
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
Reimplemented in MPIHiveEventLoopMgr.
Definition at line 670 of file AthenaHiveEventLoopMgr.cxx.
|
privatedelete |
|
inlineprotectedinherited |
|
overridevirtual |
Seek to a given event.
Definition at line 764 of file AthenaHiveEventLoopMgr.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inlineprotectedinherited |
|
protected |
property update handler:sets up the Pre-selection tools
Definition at line 323 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
Return the size of the collection.
Definition at line 804 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IService::stop
Definition at line 644 of file AthenaHiveEventLoopMgr.cxx.
|
overridevirtual |
implementation of IEventProcessor::stopRun()
Definition at line 629 of file AthenaHiveEventLoopMgr.cxx.
|
protected |
Submit a recorded context; the scheduler receives its own copy.
On success ctx is invalidated, as the scheduler now owns the slot. On failure ctx stays valid and the caller still owns the slot; no scheduler context is leaked and BeginProcessing is balanced.
Definition at line 1166 of file AthenaHiveEventLoopMgr.cxx.
|
protectedvirtual |
Dump out histograms as needed.
Definition at line 415 of file AthenaHiveEventLoopMgr.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
protected |
Instance of the incident listener waiting for AbortEvent.
Definition at line 203 of file AthenaHiveEventLoopMgr.h.
|
protected |
Reference to the Algorithm Execution State Svc.
Definition at line 160 of file AthenaHiveEventLoopMgr.h.
|
protected |
Reference to the Algorithm resource pool.
Definition at line 157 of file AthenaHiveEventLoopMgr.h.
|
protected |
Property interface of ApplicationMgr.
Definition at line 163 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 297 of file AthenaHiveEventLoopMgr.h.
|
protected |
current run number
Definition at line 109 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 278 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 116 of file AthenaHiveEventLoopMgr.h.
|
protected |
|
protected |
Gaudi event selector Context (may be used as a cursor by the evt selector).
Definition at line 88 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 102 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 90 of file AthenaHiveEventLoopMgr.h.
|
protected |
Reference to the Event Selector.
Definition at line 86 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 113 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 285 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 110 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 287 of file AthenaHiveEventLoopMgr.h.
|
protected |
Reference to the Histogram Data Service.
Definition at line 94 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 98 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 105 of file AthenaHiveEventLoopMgr.h.
|
mutableprivateinherited |
|
protected |
Reference to the incident service.
Definition at line 79 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 282 of file AthenaHiveEventLoopMgr.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
protected |
events processed
Definition at line 275 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 264 of file AthenaHiveEventLoopMgr.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
protected |
Definition at line 276 of file AthenaHiveEventLoopMgr.h.
|
protected |
|
protected |
Scheduled stop of event processing.
Definition at line 209 of file AthenaHiveEventLoopMgr.h.
|
protected |
Name of the scheduler to be used.
Definition at line 205 of file AthenaHiveEventLoopMgr.h.
|
protected |
A shortcut for the scheduler.
Definition at line 166 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 273 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 265 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 287 of file AthenaHiveEventLoopMgr.h.
|
protected |
tool returns StatusCode::SUCCESS counter
Definition at line 127 of file AthenaHiveEventLoopMgr.h.
|
protected |
tool called counter
Definition at line 125 of file AthenaHiveEventLoopMgr.h.
|
protected |
tool returns StatusCode::FAILURE counter
Definition at line 126 of file AthenaHiveEventLoopMgr.h.
|
protected |
internal tool store
Definition at line 128 of file AthenaHiveEventLoopMgr.h.
|
protected |
read event number from secondary input
Definition at line 137 of file AthenaHiveEventLoopMgr.h.
|
protected |
Definition at line 277 of file AthenaHiveEventLoopMgr.h.
|
protected |
Reference to the Whiteboard interface.
Definition at line 154 of file AthenaHiveEventLoopMgr.h.
|
protected |
Name of the Whiteboard to be used.
Definition at line 207 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 268 of file AthenaHiveEventLoopMgr.h.
|
private |
Definition at line 267 of file AthenaHiveEventLoopMgr.h.