|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/GaudiException.h"
11 #include "GaudiKernel/ListItem.h"
12 #include "GaudiKernel/IAlgorithm.h"
13 #include "GaudiKernel/IAlgTool.h"
14 #include "GaudiKernel/IAlgManager.h"
15 #include "GaudiKernel/IToolSvc.h"
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/SmartIF.h"
25 ISvcLocator* svcLoc) :
27 m_pToolSvc(
"ToolSvc", nam ),
28 m_pAlgMgr(nullptr), m_passDone(0)
41 SmartIF<IAlgManager> algMan(serviceLocator());
42 if( algMan.isValid() )
m_pAlgMgr=&*algMan;
43 else throw GaudiException(
"IAlgManager not found",
name(), StatusCode::FAILURE);
53 if (!(filterName.empty())) {
54 ListItem theFilter(filterName);
55 IAlgTool* pHoldTool(
nullptr);
56 if ( (
m_pToolSvc->retrieveTool(theFilter.type(), theFilter.name(),
57 pHoldTool)).isSuccess() ) {
60 IAlgorithm* pHoldAlg(
nullptr);
61 if (
nullptr == pFilter &&
62 (
algMgr()->getAlgorithm(theFilter.name(), pHoldAlg)).isSuccess() ) {
66 if (
nullptr == pFilter) {
67 ListItem theFilter(filterName);
69 log << MSG::WARNING <<
"Could not locate filter "
70 << theFilter.type() <<
'/' << theFilter.name() <<
endmsg;
79 return (
nullptr != pFilter && pFilter->
doNextPass() );
85 vector<string>::const_iterator iN(theNames.begin());
86 vector<string>::const_iterator iEnd(theNames.end());
87 while (
sc.isSuccess() && (iN != iEnd) ) {
88 ListItem theSvc(*iN++);
89 IService* pSvc(
nullptr);
90 sc = serviceLocator()->getService(theSvc.name(), pSvc);
91 if (
sc.isSuccess())
sc = pSvc->reinitialize();
107 }
while (
sc.isSuccess() &&
110 (
sc =
seek(0)).isSuccess() );
interface to a tool (typically) that decides whether the event loop mgr (typically) need to do anothe...
The default ATLAS batch event loop manager.
ServiceHandle< IToolSvc > m_pToolSvc
handle to the ToolSvc
virtual const std::string & name() const
StringProperty m_nextPassFilterName
the name of the INextPassFilter object queried at end of pass
StatusCode reInitList()
called at each end of pass.
virtual StatusCode nextEvent(int maxevt)
Dump out histograms as needed.
number_type m_currentRun
current run number
virtual ~MultipleEventLoopMgr()
Standard Destructor.
INextPassFilter * nextPassFilter()
Locate filter.
virtual StatusCode nextEvent(int maxevt)
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
A specialize AthenaEventLoopMgr that allows multiple passes over an event collection.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode seek(int evt)
Seek to a given event.
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
StringArrayProperty m_toBeReInitializedNames
a list of services to be reinit at the end of the pass
MultipleEventLoopMgr()
implementation of IEventProcessor::executeEvent(void* par)
unsigned int m_passDone
number of passes already completed
Define macros for attributes used to control the static checker.
virtual bool doNextPass()=0
decide whether we need another iteration
bool doNextPass()
called at end of pass. Calls nextPassFilter