BOSS 7.0.6
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 34 of file RawDataSelector.cxx.

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

◆ ~RawDataSelector()

RawDataSelector::~RawDataSelector ( )

Definition at line 48 of file RawDataSelector.cxx.

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

Member Function Documentation

◆ createAddress()

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

Definition at line 156 of file RawDataSelector.cxx.

157 {
158 iop = new RawDataAddress(CLID_Event, "EventHeader", "EventHeader");
159
160 return(StatusCode::SUCCESS);
161}
const CLID & CLID_Event
Definition: EventModel.cxx:193

◆ createContext()

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

Definition at line 102 of file RawDataSelector.cxx.

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

◆ initialize()

StatusCode RawDataSelector::initialize ( )
virtual

Definition at line 57 of file RawDataSelector.cxx.

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

◆ last()

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

Definition at line 141 of file RawDataSelector.cxx.

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

◆ 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 169 of file RawDataSelector.cxx.

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

◆ releaseContext()

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

Definition at line 164 of file RawDataSelector.cxx.

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

◆ resetCriteria()

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

Definition at line 145 of file RawDataSelector.cxx.

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

◆ rewind()

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

Definition at line 150 of file RawDataSelector.cxx.

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

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