| The Gaudi Framework v29r1 (5cd95fa2)

- 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 ) : MessageSvc( name, pSvcLocator ) {}
19
20 // ============================================================================
21 // Destructor
22 // ============================================================================
23 TBBMessageSvc::~TBBMessageSvc() {}
24
25 // ============================================================================
26 // Initialization
27 // ============================================================================
28 StatusCode TBBMessageSvc::initialize()
29 {
30 StatusCode sc = MessageSvc::initialize(); // must be executed first
31 if ( sc.isFailure() ) return sc; // error printed already by MessageSvc
32
33 return StatusCode::SUCCESS;
34 }
35
36 // ============================================================================
37 // Finalize
38 // ============================================================================
39 StatusCode TBBMessageSvc::finalize()
40 {
41 return MessageSvc::finalize(); // must be called after all other actions
42 }
43
44 void TBBMessageSvc::reportMessage( const Message& msg, int outputLevel )
45 {
46 m_messageQueue.add( new MessageWithLevel( *this, msg, outputLevel ) );
47 }
48
49 void TBBMessageSvc::reportMessage( const Message& msg ) { m_messageQueue.add( new MessageWithoutLevel( *this, msg ) ); }
50
51 void TBBMessageSvc::reportMessage( const StatusCode& code, const std::string& source )
52 {
53 m_messageQueue.add( new StatusCodeMessage( *this, code, source ) );
54 }
55
56 // ============================================================================
TBBMessageSvc::m_messageQueue
Gaudi::SerialTaskQueue m_messageQueue
Definition: TBBMessageSvc.h:106
StatusCode::SUCCESS
Definition: StatusCode.h:31
CommonMessagingBase::msg
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:121
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:32
TBBMessageSvc::reportMessage
void reportMessage(const Message &msg) override
Implementation of IMessageSvc::reportMessage()
Definition: TBBMessageSvc.cpp:49
std
STL namespace.
TBBMessageSvc.h
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:92
MessageSvc::initialize
StatusCode initialize() override
Initialize Service.
Definition: MessageSvc.cpp:113
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
DECLARE_SERVICE_FACTORY
#define DECLARE_SERVICE_FACTORY(x)
Definition: Service.h:211
TBBMessageSvc
Definition: TBBMessageSvc.h:20
TBBMessageSvc::finalize
StatusCode finalize() override
Finalization of the service.
Definition: TBBMessageSvc.cpp:39
Message
The Message class.
Definition: Message.h:15
Gaudi::SerialTaskQueue::add
void add(WorkItem *item)
Enqueue a WorkItem for execution.
Definition: SerialTaskQueue.cpp:19
MessageSvc::finalize
StatusCode finalize() override
Finalize Service.
Definition: MessageSvc.cpp:249
MessageSvc::outputLevel
int outputLevel() const override
Definition: MessageSvc.cpp:598
TBBMessageSvc::initialize
StatusCode initialize() override
Initialization of the service.
Definition: TBBMessageSvc.cpp:28
MessageSvc
Definition: MessageSvc.h:30
TBBMessageSvc::MessageWithoutLevel
Specialized class to report a message with implicit output level.
Definition: TBBMessageSvc.h:77
TBBMessageSvc::~TBBMessageSvc
~TBBMessageSvc() override
Destructor.
Definition: TBBMessageSvc.cpp:23