BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MessageSvcProvider Class Reference

Class that provides message services. Add to any classes that need message services. More...

#include <MessageSvcProvider.h>

Public Member Functions

 ~MessageSvcProvider ()
 
IMessageSvc * msgSvc ()
 
 ~MessageSvcProvider ()
 
IMessageSvc * msgSvc ()
 

Static Public Member Functions

static MessageSvcProviderinstance ()
 
static MessageSvcProviderinstance ()
 

Detailed Description

Class that provides message services. Add to any classes that need message services.

Warning
THIS CLASS IS NOT THREAD-SAFE!

Definition at line 17 of file EventFilter/HltUtilities/HltTools/HltTools-01-00-02/HltTools/MessageSvcProvider.h.

Constructor & Destructor Documentation

◆ ~MessageSvcProvider() [1/2]

MessageSvcProvider::~MessageSvcProvider ( )
inline

◆ ~MessageSvcProvider() [2/2]

MessageSvcProvider::~MessageSvcProvider ( )
inline

Member Function Documentation

◆ instance() [1/2]

MessageSvcProvider * MessageSvcProvider::instance ( )
static

Definition at line 5 of file MessageSvcProvider.cxx.

5 {
6 if (s_instancePointer == NULL) {
7 s_instancePointer = new MessageSvcProvider;
8 }
9 return s_instancePointer;
10}
Class that provides message services. Add to any classes that need message services.

Referenced by HltProcessor::MyFrame::MyFrame(), HltProcessor::Sequence::Sequence(), and HltProcessor::Signature::Signature().

◆ instance() [2/2]

static MessageSvcProvider * MessageSvcProvider::instance ( )
static

◆ msgSvc() [1/2]

IMessageSvc * MessageSvcProvider::msgSvc ( )
inline

Definition at line 30 of file EventFilter/HltUtilities/HltTools/HltTools-01-00-02/HltTools/MessageSvcProvider.h.

30 {
31// if(!m_pMsgSvc){
32 ISvcLocator* serviceLocator = Gaudi::svcLocator();
33 //IService* theSvc;
34 //std::cout<<"!!!!!!!!!!!!!!!!!1"<<std::endl;
35 StatusCode sc = serviceLocator->service("MessageSvc",m_pMsgSvc);
36 if(sc.isFailure()) exit(1); // Service [MessageSvc] not found
37 //std::cout<<"!!!!!!!!!!!!!!!!!2"<<std::endl;
38 //m_pMsgSvc = dynamic_cast<IMessageSvc*>(theSvc);
39 if(!m_pMsgSvc) exit(1); // Dynamic cast IService --> IMessageSvc failed
40// }
41 //std::cout<<"!!!!!!!!!!!!!!!!!3"<<std::endl;
42 return m_pMsgSvc;
43 }

Referenced by HltProcessor::Sequence::print(), and HltProcessor::Signature::print().

◆ msgSvc() [2/2]

IMessageSvc * MessageSvcProvider::msgSvc ( )
inline

Definition at line 30 of file InstallArea/include/HltTools/HltTools/MessageSvcProvider.h.

30 {
31// if(!m_pMsgSvc){
32 ISvcLocator* serviceLocator = Gaudi::svcLocator();
33 //IService* theSvc;
34 //std::cout<<"!!!!!!!!!!!!!!!!!1"<<std::endl;
35 StatusCode sc = serviceLocator->service("MessageSvc",m_pMsgSvc);
36 if(sc.isFailure()) exit(1); // Service [MessageSvc] not found
37 //std::cout<<"!!!!!!!!!!!!!!!!!2"<<std::endl;
38 //m_pMsgSvc = dynamic_cast<IMessageSvc*>(theSvc);
39 if(!m_pMsgSvc) exit(1); // Dynamic cast IService --> IMessageSvc failed
40// }
41 //std::cout<<"!!!!!!!!!!!!!!!!!3"<<std::endl;
42 return m_pMsgSvc;
43 }

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