30 info() <<
"End of event input reached." <<
endmsg;
34 always() <<
"Reading Event record " << count + 1 <<
". Record number within stream " << iter->
ID() + 1 <<
": " 38 info() <<
"End of event input reached." <<
endmsg;
46 if (
m_reconfigure ) const_cast<EventSelector*>(
this )->m_reconfigure =
false;
50 if (
s->isInitialized() ) {
52 if (
s->selector() && iter.
context() ) {
54 s->selector()->releaseContext( ctxt ).ignore();
69 if ( !
s->isInitialized() ) {
77 Context* ctxt =
nullptr;
78 status =
sel->createContext( ctxt );
80 status =
sel->resetCriteria(
s->criteria(), *ctxt );
82 iter.
set(
this, iter_id, ctxt, 0 );
95 iter.
set(
this, -1, 0, 0 );
107 if (
s->isInitialized() ) {
109 if (
s->selector() && iter.
context() ) {
110 Context* ctxt = iter.
context();
111 s->selector()->releaseContext( ctxt );
126 if ( !
s->isInitialized() ) {
133 Context* ctxt =
nullptr;
134 status =
sel->createContext( ctxt );
136 status =
sel->resetCriteria(
s->criteria(), *ctxt );
138 iter.
set(
this, iter_id, ctxt, 0 );
147 iter.
set(
this, -1, 0, 0 );
162 ctxt->set( 0, -1, 0, 0 );
165 while ( --nskip > 0 ) {
184 if ( pIt->
ID() != -1 ) {
222 if ( pIt && jump > 0 ) {
224 for (
int i = 0; i < jump && sc.
isSuccess(); ++i ) {
230 sc =
sel->previous( *it );
259 ctxt->
set( 0, -1, 0, 0 );
262 while ( --nskip > 0 ) {
276 auto cpIt = dynamic_cast<const EvtSelectorContext*>( &refCtxt );
277 auto pIt = const_cast<EvtSelectorContext*>( cpIt );
282 auto it = pIt->context();
283 auto sel =
s->selector();
286 sc =
sel->createAddress( *it, pAddr );
287 if ( sc.
isSuccess() ) { refpAddr = pAddr; }
288 pIt->set( it, pAddr );
297 auto cpIt = dynamic_cast<const EvtSelectorContext*>( refCtxt );
301 auto it = pIt->context();
302 auto sel =
s->selector();
303 if ( it &&
sel ) { sc =
sel->releaseContext( it ); }
314 error() <<
"Error initializing base class Service!" <<
endmsg;
320 fatal() <<
"Error retrieving IncidentSvc." <<
endmsg;
324 error() <<
"EvtMax is an obsolete property of the event selector." <<
endmsg;
325 error() <<
"Please set \"ApplicationMgr.EvtMax = " <<
m_evtMax <<
";\" to process the requested number of events." 332 error() <<
" Could not locate the Tool Service! " <<
endmsg;
367 error() <<
"Cannot reinitialize: service not in state initialized" <<
endmsg;
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
StatusCode initialize() override
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
StatusCode finalize() override
Gaudi::StateMachine::State FSMState() const override
IEvtSelector::Context * context() const
Access "real" iterator.
The Event Selector Interface.
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
IDataStreamTool * m_streamtool
constexpr static const auto SUCCESS
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
#define DECLARE_COMPONENT(type)
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
const std::string & name() const override
Retrieve name of the service.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Gaudi::Property< int > m_evtPrintFrequency
virtual void fireIncident(const Incident &incident)=0
Fire an Incident.
Gaudi::Property< std::string > m_streamManager
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
StatusCode reinitialize() override
Service override: Reinitialize service.
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
Definition of class EventIterator.
long numEvent() const
Access counter.
This class is used for returning status codes from appropriate routines.
StatusCode resetCriteria(const std::string &cr, Context &c) const override
Will set a new criteria for the selection of the next list of events and will change the state of the...
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
Gaudi::Property< int > m_evtMax
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
StatusCode initialize() override
IService implementation: Db event selector override.
Gaudi::Property< StreamSpecs > m_streamSpecs
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Gaudi::Property< int > m_firstEvent
virtual StatusCode setPriority(const std::string &name, int pri)=0
StatusCode finalize() override
IService implementation: Service finalization.
SmartIF< IToolSvc > m_toolSvc
StatusCode lastOfPreviousStream(bool shutDown, EvtSelectorContext &it) const
Retrieve last entry of the previous data stream.
const StatusCode & ignore() const
Ignore/check StatusCode.
virtual unsigned long release()=0
Release Interface instance.
virtual int getPriority(const std::string &name) const =0
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition of class EventSelectorDataStream.
Base class for all Incidents (computing events).
constexpr static const auto FAILURE
virtual IDataStreamTool::size_type ID() const
Stream identifier.
long numStreamEvent() const
Access counter within stream.
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition of class EventSelector.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const override
Create new Opaque address corresponding to the current record.
bool m_reconfigure
Reconfigure occurred.
Opaque address interface definition.
StatusCode last(Context &c) const override
Access last item in the iteration.
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
const StatusCode & setChecked(bool checked=true) const
Check/uncheck StatusCode.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.