Go to the documentation of this file.
40 info() <<
"End of event input reached." <<
endmsg;
44 always() <<
"Reading Event record " << count + 1 <<
". Record number within stream " << iter->
ID() + 1 <<
": "
48 info() <<
"End of event input reached." <<
endmsg;
60 if (
s->isInitialized() ) {
62 if (
s->selector() && iter.
context() ) {
64 s->selector()->releaseContext( ctxt ).ignore();
79 if ( !
s->isInitialized() ) {
87 Context* ctxt =
nullptr;
88 status =
sel->createContext( ctxt );
90 status =
sel->resetCriteria(
s->criteria(), *ctxt );
92 iter.
set(
this, iter_id, ctxt, 0 );
105 iter.
set(
this, -1, 0, 0 );
116 if (
s->isInitialized() ) {
118 if (
s->selector() && iter.
context() ) {
119 Context* ctxt = iter.
context();
120 if ( status =
s->selector()->releaseContext( ctxt ); !status )
return status;
135 if ( !
s->isInitialized() ) {
142 Context* ctxt =
nullptr;
143 status =
sel->createContext( ctxt );
145 status =
sel->resetCriteria(
s->criteria(), *ctxt );
147 iter.
set(
this, iter_id, ctxt, 0 );
156 iter.
set(
this, -1, 0, 0 );
166 error() <<
"It should be > 0 " <<
endmsg;
171 ctxt->set( 0, -1, 0, 0 );
174 while ( --nskip > 0 ) {
177 error() <<
" createContext() failed to start with event number " <<
m_firstEvent <<
endmsg;
193 if ( pIt->
ID() != -1 ) {
231 if ( pIt && jump > 0 ) {
233 for (
int i = 0; i < jump && sc.
isSuccess(); ++i ) {
239 sc =
sel->previous( *it );
269 ctxt->
set( 0, -1, 0, 0 );
272 while ( --nskip > 0 ) {
288 auto it = pIt->context();
289 auto sel =
s->selector();
292 sc =
sel->createAddress( *it, pAddr );
293 if ( sc.
isSuccess() ) { refpAddr = pAddr; }
294 pIt->set( it, pAddr );
307 auto it = pIt->context();
308 auto sel =
s->selector();
309 if ( it &&
sel ) { sc =
sel->releaseContext( it ); }
320 error() <<
"Error initializing base class Service!" <<
endmsg;
326 fatal() <<
"Error retrieving IncidentSvc." <<
endmsg;
330 error() <<
"EvtMax is an obsolete property of the event selector." <<
endmsg;
331 error() <<
"Please set \"ApplicationMgr.EvtMax = " <<
m_evtMax <<
";\" to process the requested number of events."
338 error() <<
" Could not locate the Tool Service! " <<
endmsg;
345 auto prio = mgr->getPriority(
"ToolSvc" );
346 mgr->setPriority(
name(), prio + 1 ).ignore();
373 error() <<
"Cannot reinitialize: service not in state initialized" <<
endmsg;
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...
StatusCode initialize() override
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
StatusCode lastOfPreviousStream(bool shutDown, EvtSelectorContext &it) const
Retrieve last entry of the previous data stream.
Gaudi::Property< int > m_firstEvent
SmartIF< IToolSvc > m_toolSvc
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
IEvtSelector::Context * context() const
Access "real" iterator.
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
StatusCode reinitialize() override
Service override: Reinitialize service.
virtual IDataStreamTool::size_type ID() const
Stream identifier.
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
StatusCode finalize() override
IService implementation: Service finalization.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
StatusCode finalize() override
Gaudi::StateMachine::State FSMState() const override
Definition of class EventIterator.
IDataStreamTool * m_streamtool
long numEvent() const
Access counter.
Gaudi::Property< int > m_evtPrintFrequency
const std::string & name() const override
Retrieve name of the service
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const override
Create new Opaque address corresponding to the current record.
long numStreamEvent() const
Access counter within stream.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Gaudi::Property< int > m_evtMax
StatusCode initialize() override
IService implementation: Db event selector override.
Gaudi::Property< std::string > m_streamManager
StatusCode last(Context &c) const override
Access last item in the iteration.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
#define DECLARE_COMPONENT(type)
Gaudi::Property< StreamSpecs > m_streamSpecs
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
Definition of class EventSelectorDataStream.
bool m_reconfigure
Reconfigure occurred.
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
constexpr static const auto FAILURE
virtual unsigned long release()=0
Release Interface instance.
Definition of class EventSelector.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.