15#include "GaudiKernel/MsgStream.h"
16#include "GaudiKernel/Bootstrap.h"
17#include "GaudiKernel/PropertyMgr.h"
18#include "GaudiKernel/IJobOptionsSvc.h"
19#include "GaudiKernel/ISvcLocator.h"
21#include "GaudiKernel/ThreadGaudi.h"
35 Service( name, svcloc),
40 PropertyMgr m_propMgr;
41 m_propMgr.declareProperty(
"InputSvc", m_eventSourceName);
42 IJobOptionsSvc* jobSvc;
43 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
44 jobSvc->setMyProperties(
"RawDataSelector", &m_propMgr);
52 delete m_beginContext;
60 MsgStream log(messageService(), name());
63 StatusCode sc = Service::initialize();
70 log << MSG::ERROR <<
"RawDataSelector::initialize: Unable to " <<
71 "initialize Service base class." << endreq;
78 if (isGaudiThreaded(name()))m_eventSourceName += getGaudiThreadIDfromName(name());
79 log << MSG::INFO << name() <<
" get RawDataInputSvc by name: " << m_eventSourceName << endreq;
82 sc = serviceLocator()->getService(m_eventSourceName, svc);
83 if(sc != StatusCode::SUCCESS ) {
84 log<<MSG::ERROR <<
" Cant get RawDataInputSvc " <<endreq;
89 if(m_eventSource == 0 ) {
90 log<<MSG::ERROR<<
" Cant cast to RawDataInputSvc " <<endreq;
91 return StatusCode::FAILURE ;
106 return(StatusCode::SUCCESS);
114 return StatusCode::SUCCESS;
120 for (
int i = 0; i < jump; ++i ) {
121 StatusCode status =
next(ctxt);
122 if ( !status.isSuccess() ) {
126 return StatusCode::SUCCESS;
128 return StatusCode::FAILURE;
132 MsgStream log(messageService(), name());
133 log << MSG::ERROR <<
"RawDataSelector::previous() not implemented" << endreq;
134 return(StatusCode::FAILURE);
142 return (StatusCode::FAILURE);
146 return(StatusCode::SUCCESS);
151 MsgStream log(messageService(), name());
152 log << MSG::ERROR <<
"RawDataSelector::rewind() not implemented" << endreq;
153 return(StatusCode::FAILURE);
157 IOpaqueAddress*& iop)
const {
160 return(StatusCode::SUCCESS);
165 return(StatusCode::SUCCESS);
171 if ( riid == IEvtSelector::interfaceID() ) {
172 *ppvInterface = (IEvtSelector*)
this;
174 else if ( riid == IProperty::interfaceID() ) {
175 *ppvInterface = (IProperty*)
this;
178 return Service::queryInterface( riid, ppvInterface );
181 return StatusCode::SUCCESS;
This class provides the Context for RawDataSelector.
virtual StatusCode previous(Context &it) const
virtual StatusCode createAddress(const Context &it, IOpaqueAddress *&iop) const
virtual StatusCode initialize()
RawDataSelector(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
virtual StatusCode resetCriteria(const std::string &criteria, Context &context) const
virtual StatusCode last(Context &it) const
virtual StatusCode rewind(Context &it) const
virtual StatusCode next(Context &it) const
virtual StatusCode createContext(Context *&it) const
virtual StatusCode releaseContext(Context *&it) const