| The Gaudi Framework v27r1

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

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

Public Types | Protected Member Functions | Private Member Functions | List of all members
CommonMessaging< BASE > Class Template Reference

`#include <GaudiKernel/CommonMessaging.h>`

Inheritance diagram for CommonMessaging< BASE >:
[legend]
Collaboration diagram for CommonMessaging< BASE >:
[legend]

## Public Types
using | base_class = CommonMessaging

## Protected Member Functions
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Private Member Functions
void | create_msgSvc () const overridefinal
| cold functionality More...
void | create_msgStream () const overridefinal

## Additional Inherited Members
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
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...

## Detailed Description

### template<typename BASE>
class CommonMessaging< BASE >

Definition at line 58 of file CommonMessaging.h.

## Member Typedef Documentation

template<typename BASE>

using CommonMessaging< BASE >::base_class = CommonMessaging

Definition at line 166 of file CommonMessaging.h.

## Member Function Documentation

template<typename BASE>

void CommonMessaging< BASE >::create_msgStream | ( |  | ) | const
| inline final override private virtual

Implements CommonMessagingBase.

Definition at line 177 of file CommonMessaging.h.

177 {
178 auto& ms = msgSvc();
179 m_msgStream.reset(new MsgStream(ms, this->name()));
180 m_createMsgStream = (!ms.isValid() || !m_msgStream);
181 m_level = m_msgStream ? m_msgStream->level() : MSG::NIL;
182 }
MsgStream
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
MsgStream::level
MSG::Level level()
Retrieve output level.
Definition: MsgStream.h:112
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
MSG::NIL
Definition: IMessageSvc.h:16
std::unique_ptr::reset
T reset(T...args)
CommonMessagingBase::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: CommonMessaging.h:73
AthenaScenario.ms
tuple ms
Definition: AthenaScenario.py:72
CommonMessagingBase::m_createMsgStream
bool m_createMsgStream
Flag to trigger a new MsgStream.
Definition: CommonMessaging.h:155
template<typename BASE>

void CommonMessaging< BASE >::create_msgSvc | ( |  | ) | const
| inline final override private virtual

cold functionality

Implements CommonMessagingBase.

Definition at line 173 of file CommonMessaging.h.

173 {
174 // Get default implementation of the message service.
175 m_msgsvc = this->serviceLocator();
176 }
CommonMessagingBase::m_msgsvc
SmartIF< IMessageSvc > m_msgsvc
Pointer to the message service;.
Definition: CommonMessaging.h:158
template<typename BASE>

void CommonMessaging< BASE >::updateMsgStreamOutputLevel | ( | int | level | ) |
| inline protected

Update the output level of the cached MsgStream.

This function is meant to be called by the update handler of the OutputLevel property.

Definition at line 187 of file CommonMessaging.h.

187 {
188 if (level != MSG::NIL && level != m_level) {
189 msgSvc()->setOutputLevel(this->name(), level);
190 if (m_msgStream) m_msgStream->setLevel(level);
191 if (UNLIKELY(MSG::Level(level) <= MSG::DEBUG))
192 debug() << "Property update for OutputLevel : new value = " << level << endmsg;
193 m_level = MSG::Level(level);
194 }
195 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
MSG::DEBUG
Definition: IMessageSvc.h:18
CommonMessagingBase::m_msgStream
std::unique_ptr< MsgStream > m_msgStream
The predefined message stream.
Definition: CommonMessaging.h:151
MSG::Level
Level
Definition: IMessageSvc.h:15
CommonMessagingBase::m_level
MSG::Level m_level
Definition: CommonMessaging.h:153
MSG::NIL
Definition: IMessageSvc.h:16
CommonMessagingBase::debug
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
Definition: CommonMessaging.h:127
MsgStream::setLevel
void setLevel(int level)
Update outputlevel.
Definition: MsgStream.h:106
CommonMessagingBase::msgSvc
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Definition: CommonMessaging.h:73
gaudirun.level
level
Definition: gaudirun.py:261
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IMessageSvc::setOutputLevel
virtual void setOutputLevel(int new_level)=0
Set new global output level threshold.

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

- GaudiKernel/GaudiKernel/CommonMessaging.h