| The Gaudi Framework v27r1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | Friends | List of all members
CommonMessagingBase Class Referenceabstract

`#include <GaudiKernel/CommonMessaging.h>`

Inheritance diagram for CommonMessagingBase:
[legend]
Collaboration diagram for CommonMessagingBase:
[legend]

## Public Member Functions
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
virtual void | create_msgSvc () const =0
| cold functionality More...
virtual void | create_msgStream () const =0
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...

## Private Attributes
std::unique_ptr< MsgStream > | m_msgStream
| The predefined message stream. More...
MSG::Level | m_level = MSG::NIL
bool | m_createMsgStream = true
| Flag to trigger a new MsgStream. More...
SmartIF< IMessageSvc > | m_msgsvc
| Pointer to the message service;. More...

## Friends
template<typename Base >
class | CommonMessaging

## Detailed Description

Definition at line 60 of file CommonMessaging.h.

## Constructor & Destructor Documentation

virtual CommonMessagingBase::~CommonMessagingBase | ( |  | ) |
| virtual default

Virtual destructor.

## Member Function Documentation

MsgStream& CommonMessagingBase::always | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::ALWAYS)

Definition at line 109 of file CommonMessaging.h.

109 { return msgStream(MSG::ALWAYS); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::ALWAYS
Definition: IMessageSvc.h:23

virtual void CommonMessagingBase::create_msgStream | ( |  | ) | const
| pure virtual

Implemented in CommonMessaging< BASE >, CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >, CommonMessaging< implements< IAppMgrUI, IEventProcessor, IService, IStateful > >, CommonMessaging< implements< IAuditor, IProperty > >, CommonMessaging< IExecutionFlowGraph >, CommonMessaging< implements< IService, IProperty, IStateful > >, CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >, CommonMessaging< IExecutionFlowManager >, and CommonMessaging< implements< IComponentManager > >.

virtual void CommonMessagingBase::create_msgSvc | ( |  | ) | const
| pure virtual

cold functionality

Implemented in CommonMessaging< BASE >, CommonMessaging< implements< IAlgTool, IDataHandleHolder, IProperty, IStateful > >, CommonMessaging< implements< IAppMgrUI, IEventProcessor, IService, IStateful > >, CommonMessaging< implements< IAuditor, IProperty > >, CommonMessaging< IExecutionFlowGraph >, CommonMessaging< implements< IService, IProperty, IStateful > >, CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >, CommonMessaging< IExecutionFlowManager >, and CommonMessaging< implements< IComponentManager > >.

MsgStream& CommonMessagingBase::debug | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::DEBUG)

Definition at line 127 of file CommonMessaging.h.

127 { return msgStream(MSG::DEBUG); }
MSG::DEBUG
Definition: IMessageSvc.h:18
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89

MsgStream& CommonMessagingBase::err | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 115 of file CommonMessaging.h.

115 { return msgStream(MSG::ERROR); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::ERROR
Definition: IMessageSvc.h:21

MsgStream& CommonMessagingBase::error | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 118 of file CommonMessaging.h.

118 { return msgStream(MSG::ERROR); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::ERROR
Definition: IMessageSvc.h:21

MsgStream& CommonMessagingBase::fatal | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::FATAL)

Definition at line 112 of file CommonMessaging.h.

112 { return msgStream(MSG::FATAL); }
MSG::FATAL
Definition: IMessageSvc.h:22
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89

MsgStream& CommonMessagingBase::info | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 124 of file CommonMessaging.h.

124 { return msgStream(MSG::INFO); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::INFO
Definition: IMessageSvc.h:19

MsgStream& CommonMessagingBase::msg | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 133 of file CommonMessaging.h.

133 { return msgStream(MSG::INFO); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::INFO
Definition: IMessageSvc.h:19

MSG::Level CommonMessagingBase::msgLevel | ( |  | ) | const
| inline

get the output level from the embedded MsgStream

Definition at line 136 of file CommonMessaging.h.

136 {
137 if (UNLIKELY(!m_msgStream)) create_msgStream();
138 return m_level;
139 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
CommonMessagingBase::m_msgStream
std::unique_ptr< MsgStream > m_msgStream
The predefined message stream.
Definition: CommonMessaging.h:151
CommonMessagingBase::m_level
MSG::Level m_level
Definition: CommonMessaging.h:153
CommonMessagingBase::create_msgStream
virtual void create_msgStream() const =0

bool CommonMessagingBase::msgLevel | ( | MSG::Level | lvl | ) | const
| inline

get the output level from the embedded MsgStream

Definition at line 145 of file CommonMessaging.h.

145 { return UNLIKELY(msgLevel() <= lvl); }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
CommonMessagingBase::msgLevel
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
Definition: CommonMessaging.h:136

MsgStream& CommonMessagingBase::msgStream | ( |  | ) | const
| inline

Return an uninitialized MsgStream.

Definition at line 89 of file CommonMessaging.h.

89 {
90 if (UNLIKELY((m_createMsgStream))) create_msgStream();
91 return *m_msgStream;
92 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
CommonMessagingBase::m_msgStream
std::unique_ptr< MsgStream > m_msgStream
The predefined message stream.
Definition: CommonMessaging.h:151
CommonMessagingBase::create_msgStream
virtual void create_msgStream() const =0
CommonMessagingBase::m_createMsgStream
bool m_createMsgStream
Flag to trigger a new MsgStream.
Definition: CommonMessaging.h:155

MsgStream& CommonMessagingBase::msgStream | ( | const MSG::Level | level | ) | const
| inline

Predefined configurable message stream for the efficient printouts.

if ( a < 0 ) { msgStream( MSG::ERROR ) << "a = " << endmsg ; }

Returns
  Reference to the predefined stream

Definition at line 104 of file CommonMessaging.h.

104 {
105 return msgStream() << level;
106 }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
gaudirun.level
level
Definition: gaudirun.py:261

SmartIF<IMessageSvc>& CommonMessagingBase::msgSvc | ( |  | ) | const
| inline

The standard message service.

Returns a pointer to the standard message service.

Definition at line 73 of file CommonMessaging.h.

73 {
74 if (UNLIKELY(!m_msgsvc)) create_msgSvc();
75 return m_msgsvc;
76 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
CommonMessagingBase::m_msgsvc
SmartIF< IMessageSvc > m_msgsvc
Pointer to the message service;.
Definition: CommonMessaging.h:158
CommonMessagingBase::create_msgSvc
virtual void create_msgSvc() const =0
cold functionality

MSG::Level CommonMessagingBase::outputLevel | ( |  | ) | const
| inline

Backward compatibility function for getting the output level.

Definition at line 142 of file CommonMessaging.h.

142 { return m_level; }
CommonMessagingBase::m_level
MSG::Level m_level
Definition: CommonMessaging.h:153

MsgStream& CommonMessagingBase::verbose | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::VERBOSE)

Definition at line 130 of file CommonMessaging.h.

130 { return msgStream(MSG::VERBOSE); }
MSG::VERBOSE
Definition: IMessageSvc.h:17
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89

MsgStream& CommonMessagingBase::warning | ( |  | ) | const
| inline

shortcut for the method msgStream(MSG::WARNING)

Definition at line 121 of file CommonMessaging.h.

121 { return msgStream(MSG::WARNING); }
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:89
MSG::WARNING
Definition: IMessageSvc.h:20

## Friends And Related Function Documentation

template<typename Base >

friend class CommonMessaging
| friend

Definition at line 148 of file CommonMessaging.h.

## Member Data Documentation

bool CommonMessagingBase::m_createMsgStream = true
| mutable private

Flag to trigger a new MsgStream.

Definition at line 155 of file CommonMessaging.h.

MSG::Level CommonMessagingBase::m_level = MSG::NIL
| mutable private

Definition at line 153 of file CommonMessaging.h.

std::unique_ptr<MsgStream> CommonMessagingBase::m_msgStream
| mutable private

The predefined message stream.

Definition at line 151 of file CommonMessaging.h.

SmartIF<IMessageSvc> CommonMessagingBase::m_msgsvc
| mutable private

Pointer to the message service;.

Definition at line 158 of file CommonMessaging.h.

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

- GaudiKernel/GaudiKernel/CommonMessaging.h