All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EventSelector Class Reference

Definition of class EventSelector. More...

#include <src/EventSelector/EventSelector.h>

Inheritance diagram for EventSelector:
Collaboration diagram for EventSelector:

Public Types

typedef std::vector
< EventSelectorDataStream * > 
Streams
 
typedef std::vector< std::string > StreamSpecs
 
typedef std::vector
< StringProperty
Properties
 
- Public Types inherited from extends1< Service, IEvtSelector >
typedef extends1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< IEvtSelector
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory2
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces1< IEvtSelector >
typedef
IEvtSelector::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 

Public Member Functions

virtual StatusCode initialize ()
 IService implementation: Db event selector override. More...
 
virtual StatusCode finalize ()
 IService implementation: Service finalization. More...
 
virtual StatusCode reinitialize ()
 Service override: Reinitialize service. More...
 
virtual StatusCode createContext (Context *&refpCtxt) const
 Create a new event loop context. More...
 
virtual StatusCode next (Context &refCtxt) const
 Get next iteration item from the event loop context. More...
 
virtual StatusCode next (Context &refCtxt, int jump) const
 Get next iteration item from the event loop context, but skip jump elements. More...
 
virtual StatusCode previous (Context &refCtxt) const
 Get previous iteration item from the event loop context. More...
 
virtual StatusCode previous (Context &refCtxt, int jump) const
 Get previous iteration item from the event loop context, but skip jump elements. More...
 
virtual StatusCode rewind (Context &refCtxt) const
 Rewind the dataset. More...
 
virtual StatusCode createAddress (const Context &refCtxt, IOpaqueAddress *&refpAddr) const
 Create new Opaque address corresponding to the current record. More...
 
virtual StatusCode releaseContext (Context *&refCtxt) const
 Release existing event iteration context. More...
 
virtual StatusCode resetCriteria (const std::string &cr, Context &c) const
 Will set a new criteria for the selection of the next list of events and will change the state of the context in a way to point to the new list. More...
 
virtual StatusCode last (Context &c) const
 Access last item in the iteration. More...
 
StatusCode firstOfNextStream (bool shutDown, EvtSelectorContext &it) const
 Retrieve first entry of the next data stream. More...
 
StatusCode lastOfPreviousStream (bool shutDown, EvtSelectorContext &it) const
 Retrieve last entry of the previous data stream. More...
 
 EventSelector (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
virtual ~EventSelector ()
 Standard Destructor. More...
 
- Public Member Functions inherited from extends1< Service, IEvtSelector >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends1 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends1 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
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. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces1< IEvtSelector >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IEvtSelector
 DeclareInterfaceID (IEvtSelector, 2, 0)
 InterfaceID. More...
 

Public Attributes

long int m_streamID
 

Protected Member Functions

virtual void printEvtInfo (const EvtSelectorContext *iter) const
 Progress report. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

SmartIF< IIncidentSvcm_incidentSvc
 Reference to the indicent service. More...
 
SmartIF< IToolSvcm_toolSvc
 
IDataStreamToolm_streamtool
 
bool m_reconfigure
 Reconfigure occurred. More...
 
StreamSpecs m_streamSpecs
 Input stream specifiers (for job options) More...
 
StreamSpecs m_streamSpecsLast
 Input stream specifiers (last used) More...
 
Streams m_streams
 Input streams. More...
 
int m_streamCount
 Input stream counter (0..oo, monotonely increasing) More...
 
int m_firstEvent
 First event to be processed. More...
 
int m_evtMax
 Maximum number of events to be processed. More...
 
int m_evtPrintFrequency
 Printout frequency. More...
 
std::string m_streamManager
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

Definition of class EventSelector.

Basic event selector service. The event selector service itself is able to connect other services to attached streams.

History: +------—+-------------------------------------------—+---------—+ | Date | Comment | Who | +------—+-------------------------------------------—+---------—+ | 3/10/00 | Initial version | M.Frank | +------—+-------------------------------------------—+---------—+ | 4/09/09 | Added firing incident on opening/ending file | R. Lambert | +------—+-------------------------------------------—+---------—+

Author
Markus Frank
R. Lambert
Version
1.0

Definition at line 53 of file EventSelector.h.

Member Typedef Documentation

Definition at line 57 of file EventSelector.h.

Definition at line 55 of file EventSelector.h.

typedef std::vector<std::string> EventSelector::StreamSpecs

Definition at line 56 of file EventSelector.h.

Constructor & Destructor Documentation

EventSelector::EventSelector ( const std::string &  name,
ISvcLocator svcloc 
)

Standard Constructor.

Definition at line 24 of file EventSelector.cpp.

25  : base_class( name, svcloc)
26 {
27  m_incidentSvc = 0;
28  m_toolSvc = 0;
29  m_streamCount = 0;
30  m_firstEvent = 0;
32  m_evtMax = INT_MAX;
33  declareProperty( "Input", m_streamSpecs);
34  declareProperty( "FirstEvent", m_firstEvent);
35  declareProperty( "EvtMax", m_evtMax);
36  declareProperty( "PrintFreq", m_evtPrintFrequency);
37  declareProperty( "StreamManager", m_streamManager="DataStreamTool");
38  m_reconfigure = false;
39 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
int m_evtPrintFrequency
Printout frequency.
Definition: EventSelector.h:84
int m_firstEvent
First event to be processed.
Definition: EventSelector.h:80
int m_evtMax
Maximum number of events to be processed.
Definition: EventSelector.h:82
extends1 base_class
Typedef to this class.
Definition: extends.h:12
StreamSpecs m_streamSpecs
Input stream specifiers (for job options)
Definition: EventSelector.h:72
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
SmartIF< IToolSvc > m_toolSvc
Definition: EventSelector.h:65
int m_streamCount
Input stream counter (0..oo, monotonely increasing)
Definition: EventSelector.h:78
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:70
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:209
std::string m_streamManager
Definition: EventSelector.h:86
EventSelector::~EventSelector ( )
virtual

Standard Destructor.

Definition at line 42 of file EventSelector.cpp.

43 {
44 }

Member Function Documentation

StatusCode EventSelector::createAddress ( const Context refCtxt,
IOpaqueAddress *&  refpAddr 
) const
virtual

Create new Opaque address corresponding to the current record.

Parameters
refCtxt[IN/OUT] Reference to the context
refpAddr[OUT] Reference to address pointer
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 332 of file EventSelector.cpp.

334 {
335  const EvtSelectorContext *cpIt = dynamic_cast<const EvtSelectorContext*>(&refCtxt);
336  EvtSelectorContext *pIt = const_cast<EvtSelectorContext*>(cpIt);
337  refpAddr = 0;
338  if ( pIt ) {
340  Context* it = pIt->context();
341  IEvtSelector* sel = s->selector();
342  if ( it && sel ) {
343  IOpaqueAddress* pAddr = 0;
344  StatusCode sc = sel->createAddress(*it, pAddr);
345  if ( sc.isSuccess() ) {
346  refpAddr = pAddr;
347  }
348  pIt->set(it, pAddr);
349  return sc;
350  }
351  }
352  return StatusCode::FAILURE;
353 }
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:78
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual EventSelectorDataStream * getStream(size_type)=0
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
Definition of class EventSelectorDataStream.
virtual IDataStreamTool::size_type ID() const
Stream identifier.
string s
Definition: gaudirun.py:210
Opaque address interface definition.
virtual StatusCode createAddress(const Context &c, IOpaqueAddress *&iop) const =0
Create an IOpaqueAddress object from the event fetched.
StatusCode EventSelector::createContext ( Context *&  refpCtxt) const
virtual

Create a new event loop context.

Parameters
refpCtxt[IN/OUT] Reference to pointer to store the context
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 191 of file EventSelector.cpp.

192 {
193  // Max event is zero. Return begin = end
194  refpCtxt = 0;
195  if ( m_firstEvent < 0 ) {
196  MsgStream log(msgSvc(), name());
197  log << MSG::ERROR << "First Event = " << m_firstEvent << " not valid" << endmsg;
198  log << MSG::ERROR << "It should be > 0 " << endmsg;
199  return StatusCode::FAILURE; // if failure => iterators = end();
200  }
201  EvtSelectorContext* ctxt = new EvtSelectorContext(this);
202  ctxt->set(0, -1, 0, 0);
203  firstOfNextStream(true, *ctxt).ignore();
204  refpCtxt = ctxt;
205  long nskip = m_firstEvent;
206  while( --nskip > 0 ) {
207  StatusCode sc = next(*refpCtxt);
208  if ( sc.isFailure() ) {
209  MsgStream log(msgSvc(), name());
210  log << MSG::ERROR << " createContext() failed to start with event number "
211  << m_firstEvent << endmsg;
212  releaseContext(refpCtxt);
213  refpCtxt = 0;
214  return StatusCode::FAILURE;
215  }
216  }
217  return StatusCode::SUCCESS;
218 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_firstEvent
First event to be processed.
Definition: EventSelector.h:80
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
virtual StatusCode releaseContext(Context *&refCtxt) const
Release existing event iteration context.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
void ignore() const
Definition: StatusCode.h:94
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode EventSelector::finalize ( )
virtual

IService implementation: Service finalization.

Reimplemented from Service.

Definition at line 449 of file EventSelector.cpp.

449  {
450 
451  if (msgLevel(MSG::DEBUG)) {
452  MsgStream log(msgSvc(), name());
453  log << MSG::DEBUG << "finalize()" << endmsg;
454  }
455 
456  m_incidentSvc = 0;
457 
458  if (m_streamtool) {
459  if (m_toolSvc.isValid()) {
460  m_toolSvc->releaseTool(m_streamtool).ignore();
461  } else {
462  // It should not be possible to get here
464  }
465  m_streamtool = 0;
466  }
467 
468  m_toolSvc = 0;
469 
470  return Service::finalize();
471 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
SmartIF< IToolSvc > m_toolSvc
Definition: EventSelector.h:65
virtual unsigned long release()=0
Release Interface instance.
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
StatusCode EventSelector::firstOfNextStream ( bool  shutDown,
EvtSelectorContext it 
) const

Retrieve first entry of the next data stream.

Definition at line 80 of file EventSelector.cpp.

80  {
82  IDataStreamTool::size_type iter_id = (m_reconfigure) ? 0 : iter.ID()+1;
83  if ( m_reconfigure ) const_cast<EventSelector*>(this)->m_reconfigure = false;
84  if ( shutDown ) {
85  if ( iter.ID() >= 0 && iter.ID() < (long)m_streamtool->size() ) {
86  const EventSelectorDataStream* s = m_streamtool->getStream(iter.ID());
87  if ( s->isInitialized() ) {
88  EventSelector* thisPtr = const_cast<EventSelector*>(this);
89  if ( s->selector() && iter.context() ) {
90  Context* ctxt = iter.context();
91  s->selector()->releaseContext(ctxt).ignore();
92  iter.set(0,0);
93  }
94  status = thisPtr->m_streamtool->finalizeStream(const_cast<EventSelectorDataStream*>(s));
95  iter.set(0,0);
96  }
97  }
98  }
99 
100  const EventSelectorDataStream* s ;
101  status = m_streamtool->getNextStream( s , iter_id );
102 
103  if ( status.isSuccess() ) {
104 
105  if(s!=NULL) {
106  if ( !s->isInitialized() ) {
107  EventSelector* thisPtr = const_cast<EventSelector*>(this);
108  status = thisPtr->m_streamtool->initializeStream(const_cast<EventSelectorDataStream*>(s));
109  }
110 
111  if ( status.isSuccess() ) {
112  const IEvtSelector* sel = s->selector();
113  if ( sel ) {
114  Context* ctxt = 0;
115  status = sel->createContext(ctxt);
116  if ( status.isSuccess() ) {
117  status = sel->resetCriteria(s->criteria(), *ctxt);
118  if ( status.isSuccess() ) {
119  MsgStream log(msgSvc(), name());
120  iter.set(this, iter_id, ctxt, 0);
121  log << MSG::INFO << *s << endmsg;
123  return StatusCode::SUCCESS;
124  }
125  }
126  }
127  }
129  }
130  }
131 
132  iter.set(this, -1, 0, 0);
133  status.setChecked();
134  //m_incidentSvc->fireIncident(Incident(s->dbName(),IncidentType::FailInputFile));
135  return StatusCode::FAILURE;
136 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
bool isInitialized() const
Check initialization status.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
virtual StatusCode finalizeStream(EventSelectorDataStream *)=0
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
virtual StatusCode resetCriteria(const std::string &cr, Context &c) const =0
Will set a new criteria for the selection of the next list of events and will change the state of the...
const std::string FailInputFile
could not open or read from this file
Definition: Incident.h:78
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode createContext(Context *&c) const =0
Create and return a context object that will keep track of the state of selection.
virtual EventSelectorDataStream * getStream(size_type)=0
virtual StatusCode releaseContext(Context *&) const =0
Release the Context object.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Definition of class EventSelectorDataStream.
Base class for all Incidents (computing events).
Definition: Incident.h:16
string s
Definition: gaudirun.py:210
Definition of class EventSelector.
Definition: EventSelector.h:53
virtual size_type size()=0
virtual StatusCode initializeStream(EventSelectorDataStream *)=0
const std::string & criteria() const
Retrieve stream criteria.
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:70
void ignore() const
Definition: StatusCode.h:94
virtual StatusCode getNextStream(const EventSelectorDataStream *&, size_type &)=0
const std::string & dbName() const
Retrieve stream dbName.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
void setChecked() const
Ignore the checking code;.
Definition: StatusCode.h:91
const std::string BeginInputFile
a new input file has been started
Definition: Incident.h:77
StatusCode EventSelector::initialize ( )
virtual

IService implementation: Db event selector override.

Reimplemented from Service.

Definition at line 379 of file EventSelector.cpp.

379  {
380  // Initialize base class
381  StatusCode status = Service::initialize();
382  MsgStream logger(msgSvc(), name());
383  if ( !status.isSuccess() ) {
384  logger << MSG::ERROR << "Error initializing base class Service!" << endmsg;
385  return status;
386  }
387  // Get the references to the services that are needed by the ApplicationMgr itself
388  m_incidentSvc = serviceLocator()->service("IncidentSvc");
389  if( !m_incidentSvc.isValid() ) {
390  logger << MSG::FATAL << "Error retrieving IncidentSvc." << endmsg;
391  return StatusCode::FAILURE;
392  }
393  if ( m_evtMax != INT_MAX ) {
394  logger << MSG::ERROR << "EvtMax is an obsolete property of the event selector." << endmsg;
395  logger << MSG::ERROR << "Please set \"ApplicationMgr.EvtMax = " << m_evtMax
396  << ";\" to process the requested number of events." << endmsg;
397  return StatusCode::FAILURE;
398  }
399 
400  m_toolSvc = serviceLocator()->service("ToolSvc");
401  if ( !m_toolSvc.isValid() ) {
402  logger << MSG::ERROR << " Could not locate the Tool Service! " << endmsg;
403  return StatusCode::FAILURE;
404  }
405 
406  status = m_toolSvc->retrieveTool(m_streamManager.c_str(), m_streamtool, this);
407 
408  if( status.isFailure() ) {
409  logger << MSG::ERROR << "Error initializing "
410  << m_streamManager << endmsg;
411  return status;
412  }
413 
414  status = m_streamtool->clear();
415  if( status.isFailure() ) {
416  // Message already printed by the tool
417  return status;
418  }
419 
421 
423 
424  m_streamID = 0;
425 
426  return status;
427 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_evtMax
Maximum number of events to be processed.
Definition: EventSelector.h:82
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
long int m_streamID
Definition: EventSelector.h:59
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
GAUDIPS_API Logger & logger()
Return the current logger instance.
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
Definition: EventSelector.h:74
virtual StatusCode addStreams(const StreamSpecs &)=0
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
virtual StatusCode clear()=0
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StreamSpecs m_streamSpecs
Input stream specifiers (for job options)
Definition: EventSelector.h:72
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
SmartIF< IToolSvc > m_toolSvc
Definition: EventSelector.h:65
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
std::string m_streamManager
Definition: EventSelector.h:86
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:336
StatusCode EventSelector::last ( Context c) const
virtual

Access last item in the iteration.

Parameters
cReference to the Context object.
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 302 of file EventSelector.cpp.

302  {
303  EvtSelectorContext *pIt = dynamic_cast<EvtSelectorContext*>(&refCtxt);
304  if ( pIt ) {
305  }
306  return StatusCode::FAILURE;
307 }
Definition of class EventIterator.
Definition: EventIterator.h:32
StatusCode EventSelector::lastOfPreviousStream ( bool  shutDown,
EvtSelectorContext it 
) const

Retrieve last entry of the previous data stream.

Definition at line 140 of file EventSelector.cpp.

140  {
142  if ( shutDown ) {
143  if ( iter.ID() >= 0 && iter.ID() < (long)m_streamtool->size() ) {
144  const EventSelectorDataStream* s = m_streamtool->getStream(iter.ID());
145  if ( s->isInitialized() ) {
146  EventSelector* thisPtr = const_cast<EventSelector*>(this);
147  if ( s->selector() && iter.context() ) {
148  Context* ctxt = iter.context();
149  s->selector()->releaseContext(ctxt);
150  iter.set(0,0);
151  }
152  status = thisPtr->m_streamtool->finalizeStream(const_cast<EventSelectorDataStream*>(s));
153  iter.set(0,0);
154  }
155  }
156  }
157 
158  IDataStreamTool::size_type iter_id = iter.ID()-1;
159  const EventSelectorDataStream* s ;
160  status = m_streamtool->getPreviousStream( s , iter_id );
161 
162  if ( status.isSuccess() ) {
163 
164  if ( !s->isInitialized() ) {
165  EventSelector* thisPtr = const_cast<EventSelector*>(this);
166  status = thisPtr->m_streamtool->initializeStream(const_cast<EventSelectorDataStream*>(s));
167  }
168  if ( status.isSuccess() ) {
169  const IEvtSelector* sel = s->selector();
170  if ( sel ) {
171  Context* ctxt = 0;
172  status = sel->createContext(ctxt);
173  if ( status.isSuccess() ) {
174  status = sel->resetCriteria(s->criteria(), *ctxt);
175  if ( status.isSuccess() ) {
176  MsgStream log(msgSvc(), name());
177  iter.set(this, iter_id, ctxt, 0);
178  log << MSG::INFO << *s << endmsg;
179  return StatusCode::SUCCESS;
180  }
181  }
182  }
183  }
184  }
185 
186  iter.set(this, -1, 0, 0);
187  return StatusCode::FAILURE;
188 }
bool isInitialized() const
Check initialization status.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
virtual StatusCode finalizeStream(EventSelectorDataStream *)=0
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
virtual StatusCode resetCriteria(const std::string &cr, Context &c) const =0
Will set a new criteria for the selection of the next list of events and will change the state of the...
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode createContext(Context *&c) const =0
Create and return a context object that will keep track of the state of selection.
virtual EventSelectorDataStream * getStream(size_type)=0
virtual StatusCode releaseContext(Context *&) const =0
Release the Context object.
virtual StatusCode getPreviousStream(const EventSelectorDataStream *&, size_type &)=0
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
Definition of class EventSelectorDataStream.
string s
Definition: gaudirun.py:210
Definition of class EventSelector.
Definition: EventSelector.h:53
virtual size_type size()=0
virtual StatusCode initializeStream(EventSelectorDataStream *)=0
const std::string & criteria() const
Retrieve stream criteria.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode EventSelector::next ( Context refCtxt) const
virtual

Get next iteration item from the event loop context.

Parameters
refCtxt[IN/OUT] Reference to the context
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 221 of file EventSelector.cpp.

221  {
222  return next(refCtxt, 1);
223 }
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
StatusCode EventSelector::next ( Context refCtxt,
int  jump 
) const
virtual

Get next iteration item from the event loop context, but skip jump elements.

Parameters
refCtxt[IN/OUT] Reference to the context
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 226 of file EventSelector.cpp.

226  {
227  EvtSelectorContext *pIt = dynamic_cast<EvtSelectorContext*>(&refCtxt);
228  if ( pIt ) {
229  if ( pIt->ID() != -1 ) {
231  Context* it = pIt->context();
232  IEvtSelector* sel = s->selector();
233  if ( it && sel ) { // First exploit the current stream
234  StatusCode sc = sel->next(*it); // This stream is empty: advance to the next stream
235  if ( !sc.isSuccess() ) {
237  sc = firstOfNextStream(true, *pIt);
238  if (sc.isSuccess() ) sc = next(*pIt);
239  }
240  else {
241  pIt->increaseCounters(false);
242  pIt->set(it, 0);
243  printEvtInfo(pIt);
244  }
245  return sc;
246  }
247  else if ( m_reconfigure ) {
248  StatusCode sc = firstOfNextStream(false, *pIt);
249  printEvtInfo(pIt);
250  return sc;
251  }
252  }
253  else if ( m_reconfigure ) {
254  StatusCode sc = firstOfNextStream(false, *pIt);
255  printEvtInfo(pIt);
256  return sc;
257  }
258  pIt->increaseCounters(false);
259  }
260  printEvtInfo(pIt);
261  return StatusCode::FAILURE;
262 }
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:78
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode next(Context &c) const =0
Fetch the next event or the first event if it will be use soon after the creation of the context...
const std::string EndInputFile
an input file has been finished
Definition: Incident.h:79
virtual EventSelectorDataStream * getStream(size_type)=0
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
Definition of class EventSelectorDataStream.
Base class for all Incidents (computing events).
Definition: Incident.h:16
virtual IDataStreamTool::size_type ID() const
Stream identifier.
string s
Definition: gaudirun.py:210
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition: EventIterator.h:82
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:70
const std::string & dbName() const
Retrieve stream dbName.
StatusCode EventSelector::previous ( Context refCtxt) const
virtual

Get previous iteration item from the event loop context.

Parameters
refCtxt[IN/OUT] Reference to the context
jump[IN] Number of events to be skipped
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 265 of file EventSelector.cpp.

265  {
266  return previous(refCtxt, 1);
267 }
virtual StatusCode previous(Context &refCtxt) const
Get previous iteration item from the event loop context.
StatusCode EventSelector::previous ( Context refCtxt,
int  jump 
) const
virtual

Get previous iteration item from the event loop context, but skip jump elements.

Parameters
refCtxt[IN/OUT] Reference to the context
jump[IN] Number of events to be skipped
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 270 of file EventSelector.cpp.

270  {
271  EvtSelectorContext *pIt = dynamic_cast<EvtSelectorContext*>(&refCtxt);
272  if ( pIt && jump > 0 ) {
274  for ( int i = 0; i < jump && sc.isSuccess(); ++i ) {
276  Context* it = pIt->context();
277  IEvtSelector* sel = s->selector();
278  if ( it && sel ) { // First exploit the current stream
279  // This stream is empty: advance to the next stream
280  sc = sel->previous(*it); // This stream is empty: advance to the next stream
281  if ( !sc.isSuccess() ) {
282  sc = lastOfPreviousStream(true, *pIt);
283  }
284  else {
285  pIt->increaseCounters(false);
286  pIt->set(it, 0);
287  }
288  printEvtInfo(pIt);
289  if ( !sc.isSuccess() ) {
290  return sc;
291  }
292  }
293  pIt->increaseCounters(false);
294  }
295  return sc;
296  }
297  printEvtInfo(pIt);
298  return StatusCode::FAILURE;
299 }
StatusCode lastOfPreviousStream(bool shutDown, EvtSelectorContext &it) const
Retrieve last entry of the previous data stream.
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:78
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual EventSelectorDataStream * getStream(size_type)=0
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
Definition of class EventSelectorDataStream.
virtual IDataStreamTool::size_type ID() const
Stream identifier.
string s
Definition: gaudirun.py:210
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition: EventIterator.h:82
virtual StatusCode previous(Context &c) const =0
Fetch the previous event.
list i
Definition: ana.py:128
void EventSelector::printEvtInfo ( const EvtSelectorContext iter) const
protectedvirtual

Progress report.

Definition at line 54 of file EventSelector.cpp.

54  {
55  if ( 0 != iter ) {
56  long count = iter->numEvent();
57  // Print an message every m_evtPrintFrequency events
58  if ( 0 == iter->context() ) {
59  MsgStream log(msgSvc(), name());
60  log << MSG::INFO << "End of event input reached." << endmsg;
61  }
62  else if( iter->numStreamEvent() == -1 ) {
63  // Intial value for this stream
64  }
65  else if( m_evtPrintFrequency != -1 && (count % m_evtPrintFrequency == 0)) {
66  MsgStream log(msgSvc(), name());
67  log << MSG::ALWAYS << "Reading Event record " << count+1
68  << ". Record number within stream " << iter->ID()+1
69  << ": " << iter->numStreamEvent()+1 << endmsg;
70  }
71  }
72  else {
73  MsgStream log(msgSvc(), name());
74  log << MSG::INFO << "End of event input reached." << endmsg;
75  }
76 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:78
int m_evtPrintFrequency
Printout frequency.
Definition: EventSelector.h:84
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
long numStreamEvent() const
Access counter within stream.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
virtual IDataStreamTool::size_type ID() const
Stream identifier.
long numEvent() const
Access counter.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode EventSelector::reinitialize ( )
virtual

Service override: Reinitialize service.

Reimplemented from Service.

Definition at line 430 of file EventSelector.cpp.

430  {
432  MsgStream logger(msgSvc(), name());
433  logger << MSG::ERROR << "Cannot reinitialize: service not in state initialized" << endmsg;
434  return StatusCode::FAILURE;
435  }
436 
438  StatusCode status = m_streamtool->clear();
439  if ( status.isFailure() ) return status;
441  m_reconfigure = true;
443  }
444 
445  return StatusCode::SUCCESS;
446 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
GAUDIPS_API Logger & logger()
Return the current logger instance.
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
Definition: EventSelector.h:74
virtual StatusCode addStreams(const StreamSpecs &)=0
virtual StatusCode clear()=0
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StreamSpecs m_streamSpecs
Input stream specifiers (for job options)
Definition: EventSelector.h:72
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition: Service.h:54
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:70
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243
StatusCode EventSelector::releaseContext ( Context *&  refCtxt) const
virtual

Release existing event iteration context.

Parameters
refCtxt[IN/OUT] Reference to the context
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 356 of file EventSelector.cpp.

356  {
357  const EvtSelectorContext *cpIt = dynamic_cast<const EvtSelectorContext*>(refCtxt);
358  EvtSelectorContext *pIt = const_cast<EvtSelectorContext*>(cpIt);
359  if ( pIt && pIt->ID() >= 0 && pIt->ID() < (long)m_streamtool->size() ) {
361  Context* it = pIt->context();
362  IEvtSelector* sel = s->selector();
363  if ( it && sel ) {
364  StatusCode sc = sel->releaseContext(it);
365  if ( sc.isSuccess() ) {
366  refCtxt = 0;
367  delete pIt;
368  return sc;
369  }
370  }
371  }
372  if ( pIt ) {
373  delete pIt;
374  }
375  return StatusCode::SUCCESS;
376 }
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:78
The Event Selector Interface.
Definition: IEvtSelector.h:19
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
IEvtSelector * selector() const
Retrieve event selector object.
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual EventSelectorDataStream * getStream(size_type)=0
virtual StatusCode releaseContext(Context *&) const =0
Release the Context object.
Definition of class EventSelectorDataStream.
virtual IDataStreamTool::size_type ID() const
Stream identifier.
string s
Definition: gaudirun.py:210
virtual size_type size()=0
StatusCode EventSelector::resetCriteria ( const std::string &  cr,
Context c 
) const
virtual

Will set a new criteria for the selection of the next list of events and will change the state of the context in a way to point to the new list.

Parameters
crThe new criteria string.
cReference pointer to the Context object.
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 47 of file EventSelector.cpp.

49 {
50  return StatusCode::FAILURE;
51 }
StatusCode EventSelector::rewind ( Context refCtxt) const
virtual

Rewind the dataset.

Parameters
refCtxt[IN/OUT] Reference to the context
Returns
StatusCode indicating success or failure

Implements IEvtSelector.

Definition at line 310 of file EventSelector.cpp.

310  {
311  EvtSelectorContext *ctxt = dynamic_cast<EvtSelectorContext*>(&refCtxt);
312  if ( ctxt ) {
313  ctxt->set(0, -1, 0, 0);
314  firstOfNextStream(true, *ctxt);
315  long nskip = m_firstEvent;
316  while( --nskip > 0 ) {
317  StatusCode sc = next(*ctxt);
318  if ( sc.isFailure() ) {
319  MsgStream log(msgSvc(), name());
320  log << MSG::ERROR << "rewind() failed to start with event number "
321  << m_firstEvent << endmsg;
322  return StatusCode::FAILURE;
323  }
324  }
325  return StatusCode::SUCCESS;
326  }
327  return StatusCode::FAILURE;
328 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
int m_firstEvent
First event to be processed.
Definition: EventSelector.h:80
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:72
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:243

Member Data Documentation

int EventSelector::m_evtMax
protected

Maximum number of events to be processed.

Definition at line 82 of file EventSelector.h.

int EventSelector::m_evtPrintFrequency
protected

Printout frequency.

Definition at line 84 of file EventSelector.h.

int EventSelector::m_firstEvent
protected

First event to be processed.

Definition at line 80 of file EventSelector.h.

SmartIF<IIncidentSvc> EventSelector::m_incidentSvc
protected

Reference to the indicent service.

Definition at line 63 of file EventSelector.h.

bool EventSelector::m_reconfigure
protected

Reconfigure occurred.

Definition at line 70 of file EventSelector.h.

int EventSelector::m_streamCount
protected

Input stream counter (0..oo, monotonely increasing)

Definition at line 78 of file EventSelector.h.

long int EventSelector::m_streamID

Definition at line 59 of file EventSelector.h.

std::string EventSelector::m_streamManager
protected

Definition at line 86 of file EventSelector.h.

Streams EventSelector::m_streams
protected

Input streams.

Definition at line 76 of file EventSelector.h.

StreamSpecs EventSelector::m_streamSpecs
protected

Input stream specifiers (for job options)

Definition at line 72 of file EventSelector.h.

StreamSpecs EventSelector::m_streamSpecsLast
protected

Input stream specifiers (last used)

Definition at line 74 of file EventSelector.h.

IDataStreamTool* EventSelector::m_streamtool
protected

Definition at line 67 of file EventSelector.h.

SmartIF<IToolSvc> EventSelector::m_toolSvc
protected

Definition at line 65 of file EventSelector.h.


The documentation for this class was generated from the following files: