CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
RawDataProviderBase Class Reference

#include <RawDataProviderBase.h>

+ Inheritance diagram for RawDataProviderBase:

Public Member Functions

 RawDataProviderBase (const char *name)
 
virtual ~RawDataProviderBase ()
 
StatusCode initialize (ISvcLocator *svcLoc=0, IMessageSvc *pMsg=0)
 
void setSvcLocator (ISvcLocator *svcLoc)
 
void setMsgSvc (IMessageSvc *svc)
 
void setMsgName (const char *name)
 

Protected Member Functions

 RawDataProviderBase ()
 

Protected Attributes

ISvcLocator * m_svcLocator
 
IMessageSvc * m_msgSvc
 
std::string m_name
 

Detailed Description

Definition at line 15 of file RawDataProviderBase.h.

Constructor & Destructor Documentation

◆ RawDataProviderBase() [1/2]

RawDataProviderBase::RawDataProviderBase ( const char * name)

Definition at line 19 of file RawDataProviderBase.cxx.

19 :
20 m_svcLocator(0),
21 m_msgSvc(0),
22 m_name(name)
23{}

◆ ~RawDataProviderBase()

virtual RawDataProviderBase::~RawDataProviderBase ( )
inlinevirtual

Definition at line 21 of file RawDataProviderBase.h.

21{};

◆ RawDataProviderBase() [2/2]

RawDataProviderBase::RawDataProviderBase ( )
protected

Definition at line 12 of file RawDataProviderBase.cxx.

12 :
13 m_svcLocator(0),
14 m_msgSvc(0),
15 m_name()
16{}

Member Function Documentation

◆ initialize()

StatusCode RawDataProviderBase::initialize ( ISvcLocator * svcLoc = 0,
IMessageSvc * pMsg = 0 )

Definition at line 26 of file RawDataProviderBase.cxx.

26 {
27 if(pSvcLoc!=0){
28 // test service point
29 // tianhl for mt
30 std::string evtDataSvc_name("EventDataSvc");
31 if(isGaudiThreaded(m_name)){
32 evtDataSvc_name += getGaudiThreadIDfromName(m_name);
33 std::cout << "---------------------------------- " << evtDataSvc_name << std::endl;
34 }
35 // tianhl for mt
36 IDataProviderSvc* evtSvc;
37 StatusCode sc = pSvcLoc->service(evtDataSvc_name.c_str(),evtSvc,true);
38 if (!sc.isSuccess()){
39 std::cout << "RawDataProviderBase::initialize() ERROR Could not load EventDataSvc" << std::endl;
40 return StatusCode::FAILURE;
41 }
42 m_svcLocator= pSvcLoc;
43 }
44 else {
45 m_svcLocator= Gaudi::svcLocator();
46 }
47 try{
48 if(pMsg!=0){
49 MsgStream log(pMsg, m_name);
50 log << MSG::INFO << "RawDataProviderBase::initialize() Test..." << endreq;
51 m_msgSvc=pMsg;
52 }
53 else{
54 StatusCode sc = m_svcLocator->service("MessageSvc", m_msgSvc ,true);
55 if (!sc.isSuccess()) throw SvcDisable("MessageSvc");
56 }
57 }
58 catch(...){
59 std::cout << "RawDataProviderBase::initialize() ERROR Could not get MessageSvc" << std::endl;
60 }
61
62 return StatusCode::SUCCESS;
63}
Exception class.

Referenced by EmcRawDataProvider::initialize(), MdcRawDataProvider::initialize(), and TofRawDataProvider::initialize().

◆ setMsgName()

void RawDataProviderBase::setMsgName ( const char * name)
inline

Definition at line 29 of file RawDataProviderBase.h.

29{ m_name = std::string(name); };

◆ setMsgSvc()

void RawDataProviderBase::setMsgSvc ( IMessageSvc * svc)
inline

Definition at line 28 of file RawDataProviderBase.h.

28{ m_msgSvc=svc; };

◆ setSvcLocator()

void RawDataProviderBase::setSvcLocator ( ISvcLocator * svcLoc)
inline

Definition at line 27 of file RawDataProviderBase.h.

27{ m_svcLocator=svcLoc; };

Member Data Documentation

◆ m_msgSvc

◆ m_name

◆ m_svcLocator


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