7#include "GaudiKernel/GaudiException.h"
8#include "GaudiKernel/TypeNameString.h"
9#include "GaudiKernel/IAlgorithm.h"
10#include "GaudiKernel/IAlgTool.h"
11#include "GaudiKernel/IAlgManager.h"
12#include "GaudiKernel/IToolSvc.h"
13#include "GaudiKernel/MsgStream.h"
14#include "GaudiKernel/SmartIF.h"
22 ISvcLocator* svcLoc) :
38 SmartIF<IAlgManager> algMan(serviceLocator());
39 if( algMan.isValid() )
m_pAlgMgr=&*algMan;
40 else throw GaudiException(
"IAlgManager not found",
name(), StatusCode::FAILURE);
50 if (!(filterName.empty())) {
51 Gaudi::Utils::TypeNameString theFilter(filterName);
52 IAlgTool* pHoldTool(
nullptr);
53 if ( (
m_pToolSvc->retrieveTool(theFilter.type(), theFilter.name(),
54 pHoldTool)).isSuccess() ) {
58 SmartIF<IAlgorithm>& pHoldAlg =
algMgr()->algorithm(theFilter,
false);
59 if (
nullptr == pFilter && pHoldAlg) {
63 if (
nullptr == pFilter) {
64 Gaudi::Utils::TypeNameString theFilter(filterName);
65 MsgStream log(msgSvc(),
name());
66 log << MSG::WARNING <<
"Could not locate filter "
67 << theFilter.type() <<
'/' << theFilter.name() <<
endmsg;
76 return (
nullptr != pFilter && pFilter->
doNextPass() );
82 SmartIF<IService>& svc = serviceLocator()->service(
name,
false);
83 if (svc)
sc = svc->reinitialize();
84 if (!
sc.isSuccess())
return sc;
93 MsgStream log(msgSvc(),
name());
100 }
while (
sc.isSuccess() &&
103 (
sc =
seek(0)).isSuccess() );
A specialize AthenaEventLoopMgr that allows multiple passes over an event collection.
virtual StatusCode seek(int evt) override
Seek to a given event.
virtual const std::string & name() const override
AthenaEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
number_type m_currentRun
current run number
virtual StatusCode nextEvent(int maxevt) override
implementation of IAppMgrUI::nextEvent. maxevt==0 returns immediately
interface to a tool (typically) that decides whether the event loop mgr (typically) need to do anothe...
virtual bool doNextPass()=0
decide whether we need another iteration
MultipleEventLoopMgr()
implementation of IEventProcessor::executeEvent(void* par)
bool doNextPass()
called at end of pass. Calls nextPassFilter
StatusCode reInitList()
called at each end of pass.
StringProperty m_nextPassFilterName
the name of the INextPassFilter object queried at end of pass
virtual StatusCode nextEvent(int maxevt)
Dump out histograms as needed.
ServiceHandle< IToolSvc > m_pToolSvc
handle to the ToolSvc
StringArrayProperty m_toBeReInitializedNames
a list of services to be reinit at the end of the pass
virtual ~MultipleEventLoopMgr()
Standard Destructor.
unsigned int m_passDone
number of passes already completed
INextPassFilter * nextPassFilter()
Locate filter.