BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataSelector Class Reference

#include <RawDataSelector.h>

+ Inheritance diagram for RawDataSelector:

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)
 

Detailed Description

Definition at line 30 of file RawDataSelector.h.

Constructor & Destructor Documentation

◆ RawDataSelector()

RawDataSelector::RawDataSelector ( const std::string & name,
ISvcLocator * svcloc )

Definition at line 35 of file RawDataSelector.cxx.

35 :
36 Service( name, svcloc),
37 m_beginContext(0),
38 m_endContext(0)
39{
40 // Get a pointer to the Job Options Service
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);
46
47}

◆ ~RawDataSelector()

RawDataSelector::~RawDataSelector ( )

Definition at line 49 of file RawDataSelector.cxx.

49 {
50 //if (m_eventSource)
51 //delete m_eventSource;
52 if (m_beginContext)
53 delete m_beginContext;
54 if (m_endContext)
55 delete m_endContext;
56}

Member Function Documentation

◆ createAddress()

StatusCode RawDataSelector::createAddress ( const Context & it,
IOpaqueAddress *& iop ) const
virtual

Definition at line 157 of file RawDataSelector.cxx.

158 {
159 iop = new RawDataAddress(CLID_Event, "EventHeader", "EventHeader");
160
161 return(StatusCode::SUCCESS);
162}
const CLID & CLID_Event

◆ createContext()

StatusCode RawDataSelector::createContext ( Context *& it) const
virtual

Definition at line 103 of file RawDataSelector.cxx.

104{
105 m_eventSource->initialize();
106 it = m_beginContext;
107 return(StatusCode::SUCCESS);
108}
StatusCode initialize()

◆ initialize()

StatusCode RawDataSelector::initialize ( )
virtual

Definition at line 58 of file RawDataSelector.cxx.

58 {
59
60 // Create a message stream.
61 MsgStream log(messageService(), name());
62
63 // Initialize the Service base class.
64 StatusCode sc = Service::initialize();
65 if( sc.isSuccess() )
66 {
67 setProperties();
68 }
69 else
70 {
71 log << MSG::ERROR << "RawDataSelector::initialize: Unable to " <<
72 "initialize Service base class." << endreq;
73 return sc;
74 }
75
76 IService* svc ;
77
78 // for Mutil-thread by tianhl
79 if (isGaudiThreaded(name()))m_eventSourceName += getGaudiThreadIDfromName(name());
80 log << MSG::INFO << name() << " get RawDataInputSvc by name: " << m_eventSourceName << endreq;
81 // for Mutil-thread by tianhl
82
83 sc = serviceLocator()->getService(m_eventSourceName, svc);
84 if(sc != StatusCode::SUCCESS ) {
85 log<<MSG::ERROR << " Cant get RawDataInputSvc " <<endreq;
86 return sc ;
87 }
88
89 m_eventSource = dynamic_cast<RawDataInputSvc*> (svc);
90 if(m_eventSource == 0 ) {
91 log<<MSG::ERROR<< " Cant cast to RawDataInputSvc " <<endreq;
92 return StatusCode::FAILURE ;
93 }
94
95 m_beginContext = new RawDataContext(this);
96
97 //m_endContext = new RawDataContext(this, m_eventSource->end());
98
99 return sc;
100}
This class provides the Context for RawDataSelector.

◆ last()

StatusCode RawDataSelector::last ( Context & it) const
virtual

Definition at line 142 of file RawDataSelector.cxx.

142 {
143 return (StatusCode::FAILURE);
144}

◆ next() [1/2]

virtual StatusCode RawDataSelector::next ( Context & it) const
virtual

◆ next() [2/2]

virtual StatusCode RawDataSelector::next ( Context & it,
int jump ) const
virtual

◆ previous() [1/2]

virtual StatusCode RawDataSelector::previous ( Context & it) const
virtual

◆ previous() [2/2]

virtual StatusCode RawDataSelector::previous ( Context & it,
int jump ) const
virtual

◆ queryInterface()

StatusCode RawDataSelector::queryInterface ( const InterfaceID & riid,
void ** ppvInterface )
virtual

Definition at line 170 of file RawDataSelector.cxx.

171{
172 if ( riid == IEvtSelector::interfaceID() ) {
173 *ppvInterface = (IEvtSelector*)this;
174 }
175 else if ( riid == IProperty::interfaceID() ) {
176 *ppvInterface = (IProperty*)this;
177 }
178 else {
179 return Service::queryInterface( riid, ppvInterface );
180 }
181 addRef();
182 return StatusCode::SUCCESS;
183}

◆ releaseContext()

StatusCode RawDataSelector::releaseContext ( Context *& it) const
virtual

Definition at line 165 of file RawDataSelector.cxx.

165 {
166 return(StatusCode::SUCCESS);
167}

◆ resetCriteria()

StatusCode RawDataSelector::resetCriteria ( const std::string & criteria,
Context & context ) const
virtual

Definition at line 146 of file RawDataSelector.cxx.

146 {
147 return(StatusCode::SUCCESS);
148}

◆ rewind()

StatusCode RawDataSelector::rewind ( Context & it) const
virtual

Definition at line 151 of file RawDataSelector.cxx.

151 {
152 MsgStream log(messageService(), name());
153 log << MSG::ERROR << "RawDataSelector::rewind() not implemented" << endreq;
154 return(StatusCode::FAILURE);
155}

The documentation for this class was generated from the following files: