The Gaudi Framework  master (34daa81a)
Loading...
Searching...
No Matches
CommonMessagingBase Class Referenceabstract

#include </builds/gaudi/Gaudi/GaudiKernel/include/GaudiKernel/CommonMessaging.h>

Inheritance diagram for CommonMessagingBase:
Collaboration diagram for CommonMessagingBase:

Public Member Functions

virtual ~CommonMessagingBase ()=default
 Virtual destructor.
 
virtual void create_msgStream () const =0
 cold functionality
 
virtual MSG::Level setUpMessaging () const =0
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream)
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 

Private Attributes

bool m_commonMessagingReady = false
 
MSG::Level m_level = MSG::NIL
 
boost::thread_specific_ptr< MsgStreamm_msgStream
 The predefined message stream.
 
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;.
 

Friends

template<typename Base>
class CommonMessaging
 

Detailed Description

Definition at line 67 of file CommonMessaging.h.

Constructor & Destructor Documentation

◆ ~CommonMessagingBase()

virtual CommonMessagingBase::~CommonMessagingBase ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ always()

MsgStream & CommonMessagingBase::always ( ) const
inline

shortcut for the method msgStream(MSG::ALWAYS)

Definition at line 100 of file CommonMessaging.h.

100{ return msgStream( MSG::ALWAYS ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
@ ALWAYS
Definition IMessageSvc.h:22

◆ create_msgStream()

◆ debug()

MsgStream & CommonMessagingBase::debug ( ) const
inline

shortcut for the method msgStream(MSG::DEBUG)

Definition at line 118 of file CommonMessaging.h.

118{ return msgStream( MSG::DEBUG ); }
@ DEBUG
Definition IMessageSvc.h:22

◆ err()

MsgStream & CommonMessagingBase::err ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 106 of file CommonMessaging.h.

106{ return msgStream( MSG::ERROR ); }
@ ERROR
Definition IMessageSvc.h:22

◆ error()

MsgStream & CommonMessagingBase::error ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 109 of file CommonMessaging.h.

109{ return msgStream( MSG::ERROR ); }

◆ fatal()

MsgStream & CommonMessagingBase::fatal ( ) const
inline

shortcut for the method msgStream(MSG::FATAL)

Definition at line 103 of file CommonMessaging.h.

103{ return msgStream( MSG::FATAL ); }
@ FATAL
Definition IMessageSvc.h:22

◆ info()

MsgStream & CommonMessagingBase::info ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 115 of file CommonMessaging.h.

115{ return msgStream( MSG::INFO ); }
@ INFO
Definition IMessageSvc.h:22

◆ msg()

MsgStream & CommonMessagingBase::msg ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 124 of file CommonMessaging.h.

124{ return msgStream( MSG::INFO ); }

◆ msgLevel() [1/2]

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

get the cached level (originally extracted from the embedded MsgStream)

Definition at line 127 of file CommonMessaging.h.

127 {
128 if ( m_commonMessagingReady ) return m_level;
129 return setUpMessaging();
130 };
virtual MSG::Level setUpMessaging() const =0

◆ msgLevel() [2/2]

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

get the output level from the embedded MsgStream

Definition at line 133 of file CommonMessaging.h.

133{ return msgLevel() <= lvl; }
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)

◆ msgStream() [1/2]

MsgStream & CommonMessagingBase::msgStream ( ) const
inline

Return an uninitialized MsgStream.

Definition at line 82 of file CommonMessaging.h.

82 {
83 if ( !m_msgStream.get() ) create_msgStream();
84 return *m_msgStream;
85 }
boost::thread_specific_ptr< MsgStream > m_msgStream
The predefined message stream.
virtual void create_msgStream() const =0
cold functionality

◆ msgStream() [2/2]

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 ; }
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
Returns
Reference to the predefined stream

Definition at line 97 of file CommonMessaging.h.

97{ return msgStream() << level; }

◆ msgSvc()

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

The standard message service.

Returns a pointer to the standard message service.

Definition at line 79 of file CommonMessaging.h.

79{ return m_msgsvc; }
SmartIF< IMessageSvc > m_msgsvc
Pointer to the message service;.

◆ setUpMessaging()

◆ verbose()

MsgStream & CommonMessagingBase::verbose ( ) const
inline

shortcut for the method msgStream(MSG::VERBOSE)

Definition at line 121 of file CommonMessaging.h.

121{ return msgStream( MSG::VERBOSE ); }
@ VERBOSE
Definition IMessageSvc.h:22

◆ warning()

MsgStream & CommonMessagingBase::warning ( ) const
inline

shortcut for the method msgStream(MSG::WARNING)

Definition at line 112 of file CommonMessaging.h.

112{ return msgStream( MSG::WARNING ); }
@ WARNING
Definition IMessageSvc.h:22

Friends And Related Symbol Documentation

◆ CommonMessaging

template<typename Base>
friend class CommonMessaging
friend

Definition at line 137 of file CommonMessaging.h.

Member Data Documentation

◆ m_commonMessagingReady

bool CommonMessagingBase::m_commonMessagingReady = false
mutableprivate

Definition at line 139 of file CommonMessaging.h.

◆ m_level

MSG::Level CommonMessagingBase::m_level = MSG::NIL
mutableprivate

Definition at line 140 of file CommonMessaging.h.

◆ m_msgStream

boost::thread_specific_ptr<MsgStream> CommonMessagingBase::m_msgStream
mutableprivate

The predefined message stream.

Definition at line 143 of file CommonMessaging.h.

◆ m_msgsvc

SmartIF<IMessageSvc> CommonMessagingBase::m_msgsvc
mutableprivate

Pointer to the message service;.

Definition at line 146 of file CommonMessaging.h.


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