| The Gaudi Framework v27r1

- 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
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
GaudiMP.FdsRegistry.msg
tuple msg
Definition: FdsRegistry.py:8
std
STL namespace.
TBBMessageSvc.h
merge_files.sc
int sc
Definition: merge_files.py:167
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:86
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:123
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
TBBMessageSvc::~TBBMessageSvc
virtual ~TBBMessageSvc()
Destructor.
Definition: TBBMessageSvc.cpp:26
DECLARE_SERVICE_FACTORY
#define DECLARE_SERVICE_FACTORY(x)
Definition: Service.h:361
TBBMessageSvc
Definition: TBBMessageSvc.h:20
Message
The Message class.
Definition: Message.h:14
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:321
TBBMessageSvc::reportMessage
virtual void reportMessage(const Message &msg)
Implementation of IMessageSvc::reportMessage()
Definition: TBBMessageSvc.cpp:50
TBBMessageSvc::initialize
virtual StatusCode initialize()
Initialization of the service.
Definition: TBBMessageSvc.cpp:32
MessageSvc
Definition: MessageSvc.h:30
TBBMessageSvc::finalize
virtual StatusCode finalize()
Finalization of the service.
Definition: TBBMessageSvc.cpp:42
TBBMessageSvc::MessageWithoutLevel
Specialized class to report a message with implicit output level.
Definition: TBBMessageSvc.h:76