#include <OfflineEventLoopMgr.h>
Public Member Functions | |
virtual StatusCode | initialize () |
implementation of IService::initalize | |
virtual StatusCode | reinitialize () |
implementation of IService::reinitalize | |
virtual StatusCode | finalize () |
implementation of IService::finalize | |
virtual StatusCode | nextEvent (int maxevt) |
implementation of IService::nextEvent | |
virtual StatusCode | executeEvent (void *par) |
implementation of IEventProcessor::executeEvent(void* par) | |
virtual StatusCode | executeRun (int maxevt) |
implementation of IEventProcessor::executeRun() | |
Protected Member Functions | |
OfflineEventLoopMgr (const std::string &nam, ISvcLocator *svcLoc) | |
Standard Constructor. | |
virtual | ~OfflineEventLoopMgr () |
Standard Destructor. | |
StatusCode | getEventRoot (IOpaqueAddress *&refpAddr) |
Create event address using event selector. | |
Protected Attributes | |
IIncidentSvc * | m_incidentSvc |
Reference to the indicent service. | |
IDataManagerSvc * | m_evtDataMgrSvc |
Reference to the Event Data Service's IDataManagerSvc interface. | |
IDataProviderSvc * | m_evtDataSvc |
Reference to the Event Data Service's IDataProviderSvc interface. | |
IEvtSelector * | m_evtSelector |
Reference to the Event Selector. | |
IEvtSelector::Context * | m_evtContext |
Event Iterator. | |
std::string | m_evtsel |
Event selector. | |
IDataManagerSvc * | m_histoDataMgrSvc |
Reference to the Histogram Data Service. | |
IConversionSvc * | m_histoPersSvc |
Reference to the Histogram Persistency Service. | |
std::string | m_histPersName |
Name of the Hist Pers type. | |
IProperty * | m_appMgrProperty |
Property interface of ApplicationMgr. | |
Private Attributes | |
double | m_runNo |
Friends | |
class | SvcFactory< OfflineEventLoopMgr > |
Creator friend class. |
History:
+---------+----------------------------------------------+---------+ | Date | Comment | Who | +---------+----------------------------------------------+---------+ |13/12/00 | Initial version | M.Frank | +---------+----------------------------------------------+---------+
Definition at line 37 of file OfflineEventLoopMgr.h.
OfflineEventLoopMgr::OfflineEventLoopMgr | ( | const std::string & | nam, | |
ISvcLocator * | svcLoc | |||
) | [protected] |
Standard Constructor.
Definition at line 30 of file OfflineEventLoopMgr.cxx.
References m_evtContext, m_evtDataMgrSvc, m_evtDataSvc, m_evtsel, m_evtSelector, m_histoDataMgrSvc, m_histoPersSvc, m_histPersName, m_incidentSvc, and m_runNo.
00031 : MinimalEventLoopMgr(nam, svcLoc) 00032 { 00033 m_histoDataMgrSvc = 0; 00034 m_histoPersSvc = 0; 00035 m_incidentSvc = 0; 00036 m_evtDataMgrSvc = 0; 00037 m_evtDataSvc = 0; 00038 m_evtSelector = 0; 00039 m_evtContext = 0; 00040 m_runNo = -1.1; 00041 // Declare properties 00042 declareProperty("HistogramPersistency", m_histPersName = ""); 00043 declareProperty( "EvtSel", m_evtsel ); 00044 }
OfflineEventLoopMgr::~OfflineEventLoopMgr | ( | ) | [protected, virtual] |
Standard Destructor.
Definition at line 49 of file OfflineEventLoopMgr.cxx.
References m_evtContext, m_evtDataMgrSvc, m_evtDataSvc, m_evtSelector, m_histoDataMgrSvc, m_histoPersSvc, and m_incidentSvc.
00049 { 00050 if( m_histoDataMgrSvc ) m_histoDataMgrSvc->release(); 00051 if( m_histoPersSvc ) m_histoPersSvc->release(); 00052 if( m_incidentSvc ) m_incidentSvc->release(); 00053 if( m_evtDataMgrSvc ) m_evtDataMgrSvc->release(); 00054 if( m_evtDataSvc ) m_evtDataSvc->release(); 00055 if( m_evtSelector ) m_evtSelector->release(); 00056 if( m_evtContext ) delete m_evtContext; 00057 }
StatusCode OfflineEventLoopMgr::executeEvent | ( | void * | par | ) | [virtual] |
implementation of IEventProcessor::executeEvent(void* par)
Definition at line 281 of file OfflineEventLoopMgr.cxx.
References calibUtil::ERROR, Bes_Common::INFO, m_evtDataSvc, m_incidentSvc, m_runNo, msgSvc(), and runNo.
Referenced by nextEvent().
00281 { 00282 MsgStream log(msgSvc(), name()); 00283 // Fire BeginEvent "Incident" 00284 m_incidentSvc->fireIncident(Incident(name(),IncidentType::BeginEvent)); 00285 int runNo; 00286 SmartDataPtr<Event::EventHeader> evt(m_evtDataSvc,"/Event/EventHeader"); 00287 if( evt ){ 00288 runNo = evt -> runNumber(); 00289 log << MSG::INFO <<"The runNumber of current event is "<<runNo<<endreq; 00290 } 00291 00292 else{ 00293 log << MSG::ERROR << "Error accessing Event" <<endreq; 00294 return StatusCode::FAILURE; 00295 } 00296 if(runNo!=m_runNo) { 00297 log << MSG::INFO <<"fireIncident of begin run"<<endreq; 00298 m_incidentSvc->fireIncident(Incident(name(),"NewRun")); 00299 if(m_runNo==-1.1){ 00300 ListAlg::iterator it_topAlg = m_topAlgList.begin(); 00301 for (;it_topAlg!=m_topAlgList.end();it_topAlg++){ 00302 (*it_topAlg)->beginRun();} 00303 } 00304 m_runNo = runNo; 00305 } 00306 00307 // Execute Algorithms 00308 StatusCode sc = MinimalEventLoopMgr::executeEvent(par); 00309 // Fire EndEvent "Incident" 00310 m_incidentSvc->fireIncident(Incident(name(),IncidentType::EndEvent)); 00311 00312 // Check if there was an error processing current event 00313 if( !sc.isSuccess() ){ 00314 MsgStream log( msgSvc(), name() ); 00315 log << MSG::ERROR << "Terminating event processing loop due to errors" << endreq; 00316 } 00317 00318 return sc; 00319 }
StatusCode OfflineEventLoopMgr::executeRun | ( | int | maxevt | ) | [virtual] |
implementation of IEventProcessor::executeRun()
Definition at line 324 of file OfflineEventLoopMgr.cxx.
00324 { 00325 StatusCode sc; 00326 // initialize the base class 00327 sc = MinimalEventLoopMgr::executeRun(maxevt); 00328 return sc; 00329 }
StatusCode OfflineEventLoopMgr::finalize | ( | ) | [virtual] |
implementation of IService::finalize
Definition at line 213 of file OfflineEventLoopMgr.cxx.
References calibUtil::ERROR, genRecEmupikp::i, Bes_Common::INFO, m_evtContext, m_evtDataMgrSvc, m_evtDataSvc, m_evtSelector, m_histoDataMgrSvc, m_histoPersSvc, m_incidentSvc, and msgSvc().
00213 { 00214 StatusCode sc; 00215 MsgStream log(msgSvc(), name()); 00216 00217 // Finalize base class 00218 MinimalEventLoopMgr::finalize(); 00219 00220 // Save Histograms Now 00221 if ( 0 != m_histoPersSvc ) { 00222 HistogramAgent agent; 00223 sc = m_histoDataMgrSvc->traverseTree( &agent ); 00224 if( sc.isSuccess() ) { 00225 IDataSelector* objects = agent.selectedObjects(); 00226 // skip /stat entry! 00227 if ( objects->size() > 0 ) { 00228 IDataSelector::iterator i; 00229 for ( i = objects->begin(); i != objects->end(); i++ ) { 00230 IOpaqueAddress* pAddr = 0; 00231 StatusCode iret = m_histoPersSvc->createRep(*i, pAddr); 00232 if ( iret.isSuccess() ) { 00233 (*i)->registry()->setAddress(pAddr); 00234 } 00235 else { 00236 sc = iret; 00237 } 00238 } 00239 for ( i = objects->begin(); i != objects->end(); i++ ) { 00240 IRegistry* reg = (*i)->registry(); 00241 StatusCode iret = m_histoPersSvc->fillRepRefs(reg->address(), *i); 00242 if ( !iret.isSuccess() ) { 00243 sc = iret; 00244 } 00245 } 00246 } 00247 if ( sc.isSuccess() ) { 00248 log << MSG::INFO << "Histograms converted successfully according to request." << endreq; 00249 } 00250 else { 00251 log << MSG::ERROR << "Error while saving Histograms." << endreq; 00252 } 00253 } 00254 else { 00255 log << MSG::ERROR << "Error while traversing Histogram data store" << endreq; 00256 } 00257 } 00258 00259 // Release evemt selector context 00260 if ( m_evtSelector && m_evtContext ) { 00261 m_evtSelector->releaseContext(m_evtContext); 00262 m_evtContext = 0; 00263 } 00264 00265 // Release all interfaces... 00266 m_histoDataMgrSvc = releaseInterface(m_histoDataMgrSvc); 00267 m_histoPersSvc = releaseInterface(m_histoPersSvc); 00268 00269 m_evtSelector = releaseInterface(m_evtSelector); 00270 m_incidentSvc = releaseInterface(m_incidentSvc); 00271 m_evtDataSvc = releaseInterface(m_evtDataSvc); 00272 m_evtDataMgrSvc = releaseInterface(m_evtDataMgrSvc); 00273 00274 return StatusCode::SUCCESS; 00275 }
StatusCode OfflineEventLoopMgr::getEventRoot | ( | IOpaqueAddress *& | refpAddr | ) | [protected] |
Create event address using event selector.
Definition at line 420 of file OfflineEventLoopMgr.cxx.
References m_evtContext, m_evtSelector, msgSvc(), and Bes_Common::WARNING.
Referenced by nextEvent().
00420 { 00421 refpAddr = 0; 00422 StatusCode sc = m_evtSelector->next(*m_evtContext); 00423 if ( !sc.isSuccess() ) { 00424 return sc; 00425 } 00426 // Create root address and assign address to data service 00427 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr); 00428 if( !sc.isSuccess() ) { 00429 sc = m_evtSelector->next(*m_evtContext); 00430 if ( sc.isSuccess() ) { 00431 sc = m_evtSelector->createAddress(*m_evtContext,refpAddr); 00432 if ( !sc.isSuccess() ) { 00433 MsgStream log( msgSvc(), name() ); 00434 log << MSG::WARNING << "Error creating IOpaqueAddress." << endreq; 00435 } 00436 } 00437 } 00438 return sc; 00439 }
StatusCode OfflineEventLoopMgr::initialize | ( | ) | [virtual] |
implementation of IService::initalize
Definition at line 62 of file OfflineEventLoopMgr.cxx.
References Bes_Common::DEBUG, Bes_Common::FATAL, m_appMgrProperty, m_evtContext, m_evtDataMgrSvc, m_evtDataSvc, m_evtsel, m_evtSelector, m_histoDataMgrSvc, m_histoPersSvc, m_incidentSvc, msgSvc(), and Bes_Common::WARNING.
00062 { 00063 MsgStream log(msgSvc(), name()); 00064 00065 // initilaize the base class 00066 StatusCode sc = MinimalEventLoopMgr::initialize(); 00067 if( !sc.isSuccess() ) { 00068 log << MSG::DEBUG << "Error Initializing base class MinimalEventLoopMgr." << endreq; 00069 return sc; 00070 } 00071 00072 // Setup access to event data services 00073 sc = serviceLocator()->service("EventDataSvc", m_evtDataMgrSvc, true); 00074 if( !sc.isSuccess() ) { 00075 log << MSG::FATAL << "Error retrieving EventDataSvc interface IDataManagerSvc." << endreq; 00076 return sc; 00077 } 00078 sc = serviceLocator()->service("EventDataSvc", m_evtDataSvc, true); 00079 if( !sc.isSuccess() ) { 00080 log << MSG::FATAL << "Error retrieving EventDataSvc interface IDataProviderSvc." << endreq; 00081 return sc; 00082 } 00083 00084 // Get the references to the services that are needed by the ApplicationMgr itself 00085 sc = serviceLocator()->service("IncidentSvc", m_incidentSvc, true); 00086 if( !sc.isSuccess() ) { 00087 log << MSG::FATAL << "Error retrieving IncidentSvc." << endreq; 00088 return sc; 00089 } 00090 00091 // Obtain the IProperty of the ApplicationMgr 00092 // SmartIF<IProperty> prpMgr(IID_IProperty, serviceLocator()); 00093 SmartIF<IProperty> prpMgr(serviceLocator()); 00094 if ( ! prpMgr.isValid() ) { 00095 log << MSG::FATAL << "IProperty interface not found in ApplicationMgr." << endreq; 00096 return StatusCode::FAILURE; 00097 } 00098 else { 00099 m_appMgrProperty = prpMgr; 00100 } 00101 00102 // We do not expect a Event Selector necessarily being declared 00103 setProperty(m_appMgrProperty->getProperty("EvtSel")); 00104 00105 if( m_evtsel != "NONE" || m_evtsel.length() == 0) { 00106 sc = serviceLocator()->service( "EventSelector", m_evtSelector, true ); 00107 if( sc.isSuccess() ) { 00108 // Setup Event Selector 00109 sc=m_evtSelector->createContext(m_evtContext); 00110 if( !sc.isSuccess() ) { 00111 log << MSG::FATAL << "Can not create the event selector Context." << endreq; 00112 return sc; 00113 } 00114 } 00115 else { 00116 log << MSG::FATAL << "EventSelector not found." << endreq; 00117 return sc; 00118 } 00119 } 00120 else { 00121 m_evtSelector = 0; 00122 m_evtContext = 0; 00123 log << MSG::WARNING << "Unable to locate service \"EventSelector\" " << endreq; 00124 log << MSG::WARNING << "No events will be processed from external input." << endreq; 00125 } 00126 00127 // Setup access to histogramming services 00128 sc = serviceLocator()->service("HistogramDataSvc", m_histoDataMgrSvc, true); 00129 if( !sc.isSuccess() ) { 00130 log << MSG::FATAL << "Error retrieving HistogramDataSvc." << endreq; 00131 return sc; 00132 } 00133 // Setup histogram persistency 00134 sc = serviceLocator()->service("HistogramPersistencySvc", m_histoPersSvc, true ); 00135 if( !sc.isSuccess() ) { 00136 log << MSG::WARNING << "Histograms cannot not be saved - though required." << endreq; 00137 return sc; 00138 } 00139 00140 return StatusCode::SUCCESS; 00141 }
StatusCode OfflineEventLoopMgr::nextEvent | ( | int | maxevt | ) | [virtual] |
implementation of IService::nextEvent
Definition at line 334 of file OfflineEventLoopMgr.cxx.
References Bes_Common::DEBUG, calibUtil::ERROR, executeEvent(), getEventRoot(), Bes_Common::INFO, m_evtContext, m_evtDataMgrSvc, m_evtDataSvc, msgSvc(), and Bes_Common::WARNING.
00334 { 00335 static int total_nevt = 0; 00336 DataObject* pObject = 0; 00337 StatusCode sc; 00338 MsgStream log( msgSvc(), name() ); 00339 00340 //yzhang add 00341 //begin run 00342 /* ListAlg::iterator it_topAlg = m_topAlgList.begin(); 00343 for (;it_topAlg!=m_topAlgList.end();it_topAlg++){ 00344 (*it_topAlg)->beginRun(); 00345 }*/ 00346 //zhangy add 00347 // loop over events if the maxevt (received as input) if different from -1. 00348 // if evtmax is -1 it means infinite loop 00349 for( int nevt = 0; (maxevt == -1 ? true : nevt < maxevt); nevt++, total_nevt++) { 00350 // Check if there is a scheduled stop issued by some algorithm/sevice 00351 if ( m_scheduledStop ) { 00352 m_scheduledStop = false; 00353 log << MSG::ALWAYS << "Terminating event processing loop due to scheduled stop" << endreq; 00354 break; 00355 } 00356 // Clear the event store, if used in the event loop 00357 if( 0 != total_nevt ) { 00358 sc = m_evtDataMgrSvc->clearStore(); 00359 if( !sc.isSuccess() ) { 00360 log << MSG::DEBUG << "Clear of Event data store failed" << endreq; 00361 } 00362 } 00363 00364 // Setup event in the event store 00365 if( m_evtContext ) { 00366 IOpaqueAddress* addr = 0; 00367 // Only if there is a EventSelector 00368 sc = getEventRoot(addr); 00369 if( !sc.isSuccess() ) { 00370 log << MSG::INFO << "No more events in event selection " << endreq; 00371 break; 00372 } 00373 // Set root clears the event data store first 00374 sc = m_evtDataMgrSvc->setRoot ("/Event", addr); 00375 if( !sc.isSuccess() ) { 00376 log << MSG::WARNING << "Error declaring event root address." << endreq; 00377 continue; 00378 } 00379 // register event header for mc 00380 SmartDataPtr<Event::EventHeader> evt(m_evtDataSvc,"/Event/EventHeader"); 00381 if(!evt) { 00382 sc = m_evtDataMgrSvc->registerAddress ("/Event/EventHeader", addr); 00383 if( !sc.isSuccess() ) { 00384 log << MSG::WARNING << "Error register EventHeader address." << endreq; 00385 } 00386 } 00387 sc = m_evtDataSvc->retrieveObject("/Event", pObject); 00388 if( !sc.isSuccess() ) { 00389 log << MSG::WARNING << "Unable to retrieve Event root object" << endreq; 00390 break; 00391 } 00392 } 00393 else { 00394 sc = m_evtDataMgrSvc->setRoot ("/Event", new DataObject()); 00395 if( !sc.isSuccess() ) { 00396 log << MSG::WARNING << "Error declaring event root DataObject" << endreq; 00397 } 00398 } 00399 00400 00401 00402 // Execute event for all required algorithms 00403 sc = executeEvent(NULL); 00404 if( !sc.isSuccess() ){ 00405 log << MSG::ERROR << "Terminating event processing loop due to errors" << endreq; 00406 break; 00407 } 00408 } 00409 //yzhang add 00410 //end run 00411 ListAlg::iterator it_topAlg = m_topAlgList.begin(); 00412 for (;it_topAlg!=m_topAlgList.end();it_topAlg++){ 00413 (*it_topAlg)->endRun(); 00414 } 00415 //zhangy add 00416 return StatusCode::SUCCESS; 00417 }
StatusCode OfflineEventLoopMgr::reinitialize | ( | ) | [virtual] |
implementation of IService::reinitalize
Definition at line 145 of file OfflineEventLoopMgr.cxx.
References Bes_Common::DEBUG, calibUtil::ERROR, Bes_Common::INFO, m_appMgrProperty, m_evtContext, m_evtsel, m_evtSelector, and msgSvc().
00145 { 00146 MsgStream log(msgSvc(), name()); 00147 00148 // initilaize the base class 00149 StatusCode sc = MinimalEventLoopMgr::reinitialize(); 00150 if( !sc.isSuccess() ) { 00151 log << MSG::DEBUG << "Error Initializing base class MinimalEventLoopMgr." << endreq; 00152 return sc; 00153 } 00154 00155 // Check to see whether a new Event Selector has been specified 00156 setProperty(m_appMgrProperty->getProperty("EvtSel")); 00157 if( m_evtsel != "NONE" || m_evtsel.length() == 0) { 00158 IEvtSelector* theEvtSel; 00159 IService* theSvc; 00160 sc = serviceLocator()->service( "EventSelector", theEvtSel ); 00161 sc = serviceLocator()->service( "EventSelector", theSvc ); 00162 if( sc.isSuccess() && ( theEvtSel != m_evtSelector ) ) { 00163 // Setup Event Selector 00164 m_evtSelector = theEvtSel; 00165 // if (theSvc->state() == IService::INITIALIZED) { 00166 if (theSvc->FSMState() == Gaudi::StateMachine::INITIALIZED) { 00167 sc = theSvc->reinitialize(); 00168 if( !sc.isSuccess() ) { 00169 log << MSG::ERROR << "Failure Reinitializing EventSelector " 00170 << theSvc->name( ) << endreq; 00171 return sc; 00172 } 00173 } 00174 else { 00175 sc = theSvc->initialize(); 00176 if( !sc.isSuccess() ) { 00177 log << MSG::ERROR << "Failure Initializing EventSelector " 00178 << theSvc->name( ) << endreq; 00179 return sc; 00180 } 00181 } 00182 sc = m_evtSelector->createContext(m_evtContext); 00183 if( !sc.isSuccess() ) { 00184 log << MSG::ERROR << "Can not create Context " 00185 << theSvc->name( ) << endreq; 00186 return sc; 00187 } 00188 log << MSG::INFO << "EventSelector service changed to " 00189 << theSvc->name( ) << endreq; 00190 } 00191 else if ( m_evtSelector && m_evtContext ) { 00192 m_evtSelector->releaseContext(m_evtContext); 00193 m_evtContext = 0; 00194 sc = m_evtSelector->createContext(m_evtContext); 00195 if( !sc.isSuccess() ) { 00196 log << MSG::ERROR << "Can not create Context " 00197 << theSvc->name( ) << endreq; 00198 return sc; 00199 } 00200 } 00201 } 00202 else if ( m_evtSelector && m_evtContext ) { 00203 m_evtSelector->releaseContext(m_evtContext); 00204 m_evtSelector = 0; 00205 m_evtContext = 0; 00206 } 00207 return StatusCode::SUCCESS; 00208 }
friend class SvcFactory< OfflineEventLoopMgr > [friend] |
IProperty* OfflineEventLoopMgr::m_appMgrProperty [protected] |
Property interface of ApplicationMgr.
Definition at line 62 of file OfflineEventLoopMgr.h.
Referenced by initialize(), and reinitialize().
IEvtSelector::Context* OfflineEventLoopMgr::m_evtContext [protected] |
Event Iterator.
Definition at line 52 of file OfflineEventLoopMgr.h.
Referenced by finalize(), getEventRoot(), initialize(), nextEvent(), OfflineEventLoopMgr(), reinitialize(), and ~OfflineEventLoopMgr().
IDataManagerSvc* OfflineEventLoopMgr::m_evtDataMgrSvc [protected] |
Reference to the Event Data Service's IDataManagerSvc interface.
Definition at line 46 of file OfflineEventLoopMgr.h.
Referenced by finalize(), initialize(), nextEvent(), OfflineEventLoopMgr(), and ~OfflineEventLoopMgr().
IDataProviderSvc* OfflineEventLoopMgr::m_evtDataSvc [protected] |
Reference to the Event Data Service's IDataProviderSvc interface.
Definition at line 48 of file OfflineEventLoopMgr.h.
Referenced by executeEvent(), finalize(), initialize(), nextEvent(), OfflineEventLoopMgr(), and ~OfflineEventLoopMgr().
std::string OfflineEventLoopMgr::m_evtsel [protected] |
Event selector.
Definition at line 54 of file OfflineEventLoopMgr.h.
Referenced by initialize(), OfflineEventLoopMgr(), and reinitialize().
IEvtSelector* OfflineEventLoopMgr::m_evtSelector [protected] |
Reference to the Event Selector.
Definition at line 50 of file OfflineEventLoopMgr.h.
Referenced by finalize(), getEventRoot(), initialize(), OfflineEventLoopMgr(), reinitialize(), and ~OfflineEventLoopMgr().
IDataManagerSvc* OfflineEventLoopMgr::m_histoDataMgrSvc [protected] |
Reference to the Histogram Data Service.
Definition at line 56 of file OfflineEventLoopMgr.h.
Referenced by finalize(), initialize(), OfflineEventLoopMgr(), and ~OfflineEventLoopMgr().
IConversionSvc* OfflineEventLoopMgr::m_histoPersSvc [protected] |
Reference to the Histogram Persistency Service.
Definition at line 58 of file OfflineEventLoopMgr.h.
Referenced by finalize(), initialize(), OfflineEventLoopMgr(), and ~OfflineEventLoopMgr().
std::string OfflineEventLoopMgr::m_histPersName [protected] |
Name of the Hist Pers type.
Definition at line 60 of file OfflineEventLoopMgr.h.
Referenced by OfflineEventLoopMgr().
IIncidentSvc* OfflineEventLoopMgr::m_incidentSvc [protected] |
Reference to the indicent service.
Definition at line 44 of file OfflineEventLoopMgr.h.
Referenced by executeEvent(), finalize(), initialize(), OfflineEventLoopMgr(), and ~OfflineEventLoopMgr().
double OfflineEventLoopMgr::m_runNo [private] |
Definition at line 87 of file OfflineEventLoopMgr.h.
Referenced by executeEvent(), and OfflineEventLoopMgr().