| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

TBBMessageSvc.cpp
Go to the documentation of this file.
1 // Include files
2
3 // From Gaudi
4 #include "GaudiKernel/SvcFactory.h"
5 // local
6 #include "TBBMessageSvc.h"
7
8 // ----------------------------------------------------------------------------
9 // Implementation file for class: TBBMessageSvc
10 //
11 // 22/06/2012: Marco Clemencic
12 // ----------------------------------------------------------------------------
13 DECLARE_SERVICE_FACTORY(TBBMessageSvc)
14
15 // ============================================================================
16 // Standard constructor, initializes variables
17 // ============================================================================
18 TBBMessageSvc::TBBMessageSvc(const std::string& name, ISvcLocator* pSvcLocator)
19 : MessageSvc(name, pSvcLocator)
20 {
21 }
22
23 // ============================================================================
24 // Destructor
25 // ============================================================================
26 TBBMessageSvc::~TBBMessageSvc() {
27 }
28
29 // ============================================================================
30 // Initialization
31 // ============================================================================
32 StatusCode TBBMessageSvc::initialize() {
33 StatusCode sc = MessageSvc::initialize(); // must be executed first
34 if ( sc.isFailure() ) return sc; // error printed already by MessageSvc
35
36 return StatusCode::SUCCESS;
37 }
38
39 // ============================================================================
40 // Finalize
41 // ============================================================================
42 StatusCode TBBMessageSvc::finalize() {
43 return MessageSvc::finalize(); // must be called after all other actions
44 }
45
46 void TBBMessageSvc::reportMessage(const Message& msg, int outputLevel) {
47 m_messageQueue.add(new MessageWithLevel(*this, msg, outputLevel));
48 }
49
50 void TBBMessageSvc::reportMessage(const Message& msg) {
51 m_messageQueue.add(new MessageWithoutLevel(*this, msg));
52 }
53
54 void TBBMessageSvc::reportMessage(const StatusCode& code, const std::string& source) {
55 m_messageQueue.add(new StatusCodeMessage(*this, code, source));
56 }
57
58 // ============================================================================
TBBMessageSvc::m_messageQueue
Gaudi::SerialTaskQueue m_messageQueue
Definition: TBBMessageSvc.h:104
StatusCode::SUCCESS
Definition: StatusCode.h:30
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:132
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
TBBMessageSvc::reportMessage
void reportMessage(const Message &msg) override
Implementation of IMessageSvc::reportMessage()
Definition: TBBMessageSvc.cpp:50
std
STL namespace.
TBBMessageSvc.h
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
std::string
STL class.
TBBMessageSvc::MessageWithLevel
Specialized class to report a message with explicit output level.
Definition: TBBMessageSvc.h:62
SvcFactory.h
TBBMessageSvc::StatusCodeMessage
Specialized class to report a StatusCode message.
Definition: TBBMessageSvc.h:90
MessageSvc::initialize
StatusCode initialize() override
Initialize Service.
Definition: MessageSvc.cpp:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
DECLARE_SERVICE_FACTORY
#define DECLARE_SERVICE_FACTORY(x)
Definition: Service.h:242
TBBMessageSvc
Definition: TBBMessageSvc.h:20
TBBMessageSvc::finalize
StatusCode finalize() override
Finalization of the service.
Definition: TBBMessageSvc.cpp:42
Message
The Message class.
Definition: Message.h:15
Gaudi::SerialTaskQueue::add
void add(WorkItem *item)
Enqueue a WorkItem for execution.
Definition: SerialTaskQueue.cpp:22
MessageSvc::finalize
StatusCode finalize() override
Finalize Service.
Definition: MessageSvc.cpp:227
MessageSvc::outputLevel
int outputLevel() const override
Definition: MessageSvc.cpp:576
TBBMessageSvc::initialize
StatusCode initialize() override
Initialization of the service.
Definition: TBBMessageSvc.cpp:32
MessageSvc
Definition: MessageSvc.h:30
TBBMessageSvc::MessageWithoutLevel
Specialized class to report a message with implicit output level.
Definition: TBBMessageSvc.h:76
TBBMessageSvc::~TBBMessageSvc
~TBBMessageSvc() override
Destructor.
Definition: TBBMessageSvc.cpp:26