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"
36 Service( name, svcloc),
41 PropertyMgr m_propMgr;
42 m_propMgr.declareProperty(
"InputSvc", m_eventSourceName);
43 IJobOptionsSvc* jobSvc;
44 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc);
45 jobSvc->setMyProperties(
"RawDataSelector", &m_propMgr);
53 delete m_beginContext;
61 MsgStream log(messageService(), name());
64 StatusCode sc = Service::initialize();
71 log << MSG::ERROR <<
"RawDataSelector::initialize: Unable to " <<
72 "initialize Service base class." << endreq;
79 if (isGaudiThreaded(name()))m_eventSourceName += getGaudiThreadIDfromName(name());
80 log << MSG::INFO << name() <<
" get RawDataInputSvc by name: " << m_eventSourceName << endreq;
83 sc = serviceLocator()->getService(m_eventSourceName, svc);
84 if(sc != StatusCode::SUCCESS ) {
85 log<<MSG::ERROR <<
" Cant get RawDataInputSvc " <<endreq;
90 if(m_eventSource == 0 ) {
91 log<<MSG::ERROR<<
" Cant cast to RawDataInputSvc " <<endreq;
92 return StatusCode::FAILURE ;
107 return(StatusCode::SUCCESS);
115 return StatusCode::SUCCESS;
121 for (
int i = 0; i < jump; ++i ) {
122 StatusCode status =
next(ctxt);
123 if ( !status.isSuccess() ) {
127 return StatusCode::SUCCESS;
129 return StatusCode::FAILURE;
133 MsgStream log(messageService(), name());
134 log << MSG::ERROR <<
"RawDataSelector::previous() not implemented" << endreq;
135 return(StatusCode::FAILURE);
143 return (StatusCode::FAILURE);
147 return(StatusCode::SUCCESS);
152 MsgStream log(messageService(), name());
153 log << MSG::ERROR <<
"RawDataSelector::rewind() not implemented" << endreq;
154 return(StatusCode::FAILURE);
158 IOpaqueAddress*& iop)
const {
161 return(StatusCode::SUCCESS);
166 return(StatusCode::SUCCESS);
172 if ( riid == IEvtSelector::interfaceID() ) {
173 *ppvInterface = (IEvtSelector*)
this;
175 else if ( riid == IProperty::interfaceID() ) {
176 *ppvInterface = (IProperty*)
this;
179 return Service::queryInterface( riid, ppvInterface );
182 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()
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