#include <RawDataSelector.h>
Public Member Functions | |
RawDataSelector (const std::string &name, ISvcLocator *svcloc) | |
~RawDataSelector () | |
virtual StatusCode | initialize () |
virtual StatusCode | createContext (Context *&it) const |
virtual StatusCode | next (Context &it) const |
virtual StatusCode | next (Context &it, int jump) const |
virtual StatusCode | previous (Context &it) const |
virtual StatusCode | previous (Context &it, int jump) const |
virtual StatusCode | last (Context &it) const |
virtual StatusCode | rewind (Context &it) const |
virtual StatusCode | createAddress (const Context &it, IOpaqueAddress *&iop) const |
virtual StatusCode | releaseContext (Context *&it) const |
virtual StatusCode | resetCriteria (const std::string &criteria, Context &context) const |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Private Attributes | |
IRawDataInputSvc * | m_eventSource |
RawDataContext * | m_beginContext |
RawDataContext * | m_endContext |
IAddressCreator * | m_addressCreator |
std::string | m_eventSourceName |
Definition at line 30 of file RawDataSelector.h.
RawDataSelector::RawDataSelector | ( | const std::string & | name, | |
ISvcLocator * | svcloc | |||
) |
Definition at line 34 of file RawDataSelector.cxx.
References m_eventSourceName.
00034 : 00035 Service( name, svcloc), 00036 m_beginContext(0), 00037 m_endContext(0) 00038 { 00039 // Get a pointer to the Job Options Service 00040 PropertyMgr m_propMgr; 00041 m_propMgr.declareProperty("InputSvc", m_eventSourceName); 00042 IJobOptionsSvc* jobSvc; 00043 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc); 00044 jobSvc->setMyProperties("RawDataSelector", &m_propMgr); 00045 00046 }
RawDataSelector::~RawDataSelector | ( | ) |
Definition at line 48 of file RawDataSelector.cxx.
References m_beginContext, and m_endContext.
00048 { 00049 //if (m_eventSource) 00050 //delete m_eventSource; 00051 if (m_beginContext) 00052 delete m_beginContext; 00053 if (m_endContext) 00054 delete m_endContext; 00055 }
virtual StatusCode RawDataSelector::createAddress | ( | const Context & | it, | |
IOpaqueAddress *& | iop | |||
) | const [virtual] |
virtual StatusCode RawDataSelector::createContext | ( | Context *& | it | ) | const [virtual] |
StatusCode RawDataSelector::initialize | ( | ) | [virtual] |
Definition at line 57 of file RawDataSelector.cxx.
References calibUtil::ERROR, Bes_Common::INFO, m_beginContext, m_eventSource, and m_eventSourceName.
00057 { 00058 00059 // Create a message stream. 00060 MsgStream log(messageService(), name()); 00061 00062 // Initialize the Service base class. 00063 StatusCode sc = Service::initialize(); 00064 if( sc.isSuccess() ) 00065 { 00066 setProperties(); 00067 } 00068 else 00069 { 00070 log << MSG::ERROR << "RawDataSelector::initialize: Unable to " << 00071 "initialize Service base class." << endreq; 00072 return sc; 00073 } 00074 00075 IService* svc ; 00076 00077 // for Mutil-thread by tianhl 00078 if (isGaudiThreaded(name()))m_eventSourceName += getGaudiThreadIDfromName(name()); 00079 log << MSG::INFO << name() << " get RawDataInputSvc by name: " << m_eventSourceName << endreq; 00080 // for Mutil-thread by tianhl 00081 00082 sc = serviceLocator()->getService(m_eventSourceName, svc); 00083 if(sc != StatusCode::SUCCESS ) { 00084 log<<MSG::ERROR << " Cant get RawDataInputSvc " <<endreq; 00085 return sc ; 00086 } 00087 00088 m_eventSource = dynamic_cast<RawDataInputSvc*> (svc); 00089 if(m_eventSource == 0 ) { 00090 log<<MSG::ERROR<< " Cant cast to RawDataInputSvc " <<endreq; 00091 return StatusCode::FAILURE ; 00092 } 00093 00094 m_beginContext = new RawDataContext(this); 00095 00096 //m_endContext = new RawDataContext(this, m_eventSource->end()); 00097 00098 return sc; 00099 }
virtual StatusCode RawDataSelector::last | ( | Context & | it | ) | const [virtual] |
virtual StatusCode RawDataSelector::next | ( | Context & | it, | |
int | jump | |||
) | const [virtual] |
virtual StatusCode RawDataSelector::next | ( | Context & | it | ) | const [virtual] |
virtual StatusCode RawDataSelector::previous | ( | Context & | it, | |
int | jump | |||
) | const [virtual] |
virtual StatusCode RawDataSelector::previous | ( | Context & | it | ) | const [virtual] |
StatusCode RawDataSelector::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [virtual] |
Definition at line 169 of file RawDataSelector.cxx.
00170 { 00171 if ( riid == IEvtSelector::interfaceID() ) { 00172 *ppvInterface = (IEvtSelector*)this; 00173 } 00174 else if ( riid == IProperty::interfaceID() ) { 00175 *ppvInterface = (IProperty*)this; 00176 } 00177 else { 00178 return Service::queryInterface( riid, ppvInterface ); 00179 } 00180 addRef(); 00181 return StatusCode::SUCCESS; 00182 }
virtual StatusCode RawDataSelector::releaseContext | ( | Context *& | it | ) | const [virtual] |
virtual StatusCode RawDataSelector::resetCriteria | ( | const std::string & | criteria, | |
Context & | context | |||
) | const [virtual] |
virtual StatusCode RawDataSelector::rewind | ( | Context & | it | ) | const [virtual] |
IAddressCreator* RawDataSelector::m_addressCreator [private] |
Definition at line 67 of file RawDataSelector.h.
RawDataContext* RawDataSelector::m_beginContext [private] |
Definition at line 65 of file RawDataSelector.h.
Referenced by initialize(), and ~RawDataSelector().
RawDataContext* RawDataSelector::m_endContext [private] |
IRawDataInputSvc* RawDataSelector::m_eventSource [private] |