15#include "GaudiKernel/Bootstrap.h"
16#include "GaudiKernel/ISvcLocator.h"
17#include "GaudiKernel/MsgStream.h"
18#include "GaudiKernel/PropertyMgr.h"
20#include "RawDataCnv/EventManagement/RAWEVENT.h"
21#include "RawDataCnv/RawDataAddress.h"
25#include "RawDataCnvSvc/IRawDataInputSvc.h"
31 : base_class( name, svcloc ), m_beginContext( 0 ), m_endContext( 0 ) {
32 declareProperty(
"InputSvc", m_eventSourceName );
38 if ( m_beginContext )
delete m_beginContext;
39 if ( m_endContext )
delete m_endContext;
45 MsgStream log(
msgSvc(), name() );
48 StatusCode sc = Service::initialize();
49 if ( !sc.isSuccess() )
51 log << MSG::ERROR <<
"RawDataSelector::initialize: Unable to "
52 <<
"initialize Service base class." << endmsg;
61 log << MSG::INFO << name() <<
" get RawDataInputSvc by name: " << m_eventSourceName
73 m_eventSource = service( m_eventSourceName );
76 log << MSG::ERROR <<
"Cannot get RawDataInputSvc " << endmsg;
77 return StatusCode::FAILURE;
90 return ( StatusCode::SUCCESS );
95 RAWEVENT* pre = m_eventSource->nextEvent();
97 return StatusCode::SUCCESS;
104 for (
int i = 0; i < jump; ++i )
106 StatusCode status =
next( ctxt );
107 if ( !status.isSuccess() ) {
return status; }
109 return StatusCode::SUCCESS;
111 return StatusCode::FAILURE;
115 MsgStream log(
msgSvc(), name() );
116 log << MSG::ERROR <<
"RawDataSelector::previous() not implemented" << endmsg;
117 return ( StatusCode::FAILURE );
125 return ( StatusCode::FAILURE );
129 IEvtSelector::Context& )
const {
130 return ( StatusCode::SUCCESS );
134 MsgStream log(
msgSvc(), name() );
135 log << MSG::ERROR <<
"RawDataSelector::rewind() not implemented" << endmsg;
136 return ( StatusCode::FAILURE );
140 IOpaqueAddress*& iop )
const {
143 return ( StatusCode::SUCCESS );
147 return ( StatusCode::SUCCESS );
151 if ( riid == IEvtSelector::interfaceID() ) { *ppvInterface = (IEvtSelector*)
this; }
152 else if ( riid == IProperty::interfaceID() ) { *ppvInterface = (IProperty*)
this; }
153 else {
return Service::queryInterface( riid, ppvInterface ); }
155 return StatusCode::SUCCESS;
DECLARE_COMPONENT(BesBdkRc)
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