1 #define GAUDISVC_EVENTLOOPMGR_CPP
22 #define ON_DEBUG if (UNLIKELY(outputLevel() <= MSG::DEBUG))
23 #define ON_VERBOSE if (UNLIKELY(outputLevel() <= MSG::VERBOSE))
25 #define DEBMSG ON_DEBUG debug()
26 #define VERMSG ON_VERBOSE verbose()
46 "Set this property to false to suppress warning messages");
68 DEBMSG <<
"Error Initializing base class MinimalEventLoopMgr." <<
endmsg;
75 fatal() <<
"Error retrieving EventDataSvc interface IDataManagerSvc." <<
endmsg;
80 fatal() <<
"Error retrieving EventDataSvc interface IDataProviderSvc." <<
endmsg;
87 fatal() <<
"IProperty interface not found in ApplicationMgr." <<
endmsg;
100 fatal() <<
"Can not create the event selector Context." <<
endmsg;
113 warning() <<
"Unable to locate service \"EventSelector\" " <<
endmsg;
114 warning() <<
"No events will be processed from external input." <<
endmsg;
121 fatal() <<
"Error retrieving HistogramDataSvc." <<
endmsg;
127 warning() <<
"Histograms cannot not be saved - though required." <<
endmsg;
141 DEBMSG <<
"Error Initializing base class MinimalEventLoopMgr." <<
endmsg;
159 sc = theSvc->reinitialize();
161 error() <<
"Failure Reinitializing EventSelector "
162 << theSvc->name( ) <<
endmsg;
167 sc = theSvc->sysInitialize();
169 error() <<
"Failure Initializing EventSelector "
170 << theSvc->name( ) <<
endmsg;
176 error() <<
"Can not create Context " << theSvc->name( ) <<
endmsg;
179 info() <<
"EventSelector service changed to "
180 << theSvc->name( ) <<
endmsg;
189 error() <<
"Can not create Context " << theSvc->name( ) <<
endmsg;
224 error() <<
"Error finalizing base class" <<
endmsg;
235 if ( objects->size() > 0 ) {
236 IDataSelector::iterator
i;
237 for ( i = objects->begin(); i != objects->end(); i++ ) {
241 (*i)->registry()->setAddress(pAddr);
247 for ( i = objects->begin(); i != objects->end(); i++ ) {
256 info() <<
"Histograms converted successfully according to request." <<
endmsg;
259 error() <<
"Error while saving Histograms." <<
endmsg;
263 error() <<
"Error while traversing Histogram data store" <<
endmsg;
293 always() <<
"Terminating event processing loop due to a stop scheduled by an incident listener" <<
endmsg;
304 error() <<
"Terminating event processing loop due to errors" <<
endmsg;
323 static int total_nevt = 0;
329 for(
int nevt = 0; (maxevt == -1 ?
true :
nevt < maxevt);
nevt++, total_nevt++) {
334 always() <<
"Terminating event processing loop due to scheduled stop" <<
endmsg;
338 if( 0 != total_nevt ) {
357 info() <<
"No more events in event selection " <<
endmsg;
363 warning() <<
"Error declaring event root address." <<
endmsg;
368 warning() <<
"Unable to retrieve Event root object" <<
endmsg;
375 warning() <<
"Error declaring event root DataObject" <<
endmsg;
382 error() <<
"Terminating event processing loop due to errors" <<
endmsg;
const std::string BeginEvent
Processing of a new event has started.
virtual StatusCode executeEvent(void *par)
implementation of IEventProcessor::executeEvent(void* par)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
bool m_scheduledStop
Scheduled stop of event processing.
const std::string BeginProcessing
Incident raised just before entering loop over the algorithms.
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
virtual StatusCode setProperty(const Property &p)
Set the property by property.
virtual StatusCode initialize()
implementation of IService::initialize
const std::string EndProcessing
Incident raised just after the loop over the algorithms (note: before the execution of OutputStreams)...
bool isSuccess() const
Test for a status code of SUCCESS.
HistogramAgent base in charge of collecting all the refereces to DataObjects in a transient store tha...
std::string m_histPersName
Name of the Hist Pers type.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
virtual StatusCode executeRun(int maxevt)
implementation of IEventProcessor::executeRun()
Class definition of EventLoopMgr.
#define DECLARE_COMPONENT(type)
const std::string EndEvent
Processing of the last event has finished.
virtual StatusCode executeEvent(void *par)
implementation of IEventProcessor::executeEvent(void* par)
virtual StatusCode initialize()
implementation of IService::initialize
virtual StatusCode reinitialize()
implementation of IService::reinitialize
bool isValid() const
Allow for check if smart pointer is valid.
bool m_warnings
Flag to disable warning messages when using external input.
This class is used for returning status codes from appropriate routines.
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
TYPE * get() const
Get interface pointer.
IDataSelector * selectedObjects()
Return the set of selected DataObjects.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual StatusCode reinitialize()
implementation of IService::reinitialize
virtual const std::string & name() const
Retrieve name of the service.
EventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
virtual StatusCode stop()
implementation of IService::stop
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
virtual StatusCode finalize()
implementation of IService::finalize
virtual StatusCode executeRun(int maxevt)
implementation of IEventProcessor::executeRun( )
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
IEvtSelector::Context * m_evtContext
Event Iterator.
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
virtual StatusCode finalize()
implementation of IService::finalize
Base class for all Incidents (computing events).
virtual ~EventLoopMgr()
Standard Destructor.
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event) ...
SmartIF< IDataProviderSvc > m_evtDataSvc
Reference to the Event Data Service's IDataProviderSvc interface.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
This is the default processing manager of the application manager.
virtual StatusCode stop()
implementation of IService::stop
virtual StatusCode nextEvent(int maxevt)
implementation of IService::nextEvent
Opaque address interface definition.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
std::string m_evtsel
Event selector.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
const int AlgorithmFailure
A DataObject is the base class of any identifiable object on any data store.
std::vector< DataObject * > IDataSelector
This is only a placeholder to allow me compiling until the responsible guy does his work! M...
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.