The Gaudi Framework  v29r0 (ff2e7097)
CommonMessagingBase Class Referenceabstract

#include <GaudiKernel/CommonMessaging.h>

Inheritance diagram for CommonMessagingBase:
Collaboration diagram for CommonMessagingBase:

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...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () 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

boost::thread_specific_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
boost::thread_specific_ptr< MSG::Levelm_level
 
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 

Friends

template<typename Base >
class CommonMessaging
 

Detailed Description

Definition at line 64 of file CommonMessaging.h.

Constructor & Destructor Documentation

virtual CommonMessagingBase::~CommonMessagingBase ( )
virtualdefault

Virtual destructor.

Member Function Documentation

MsgStream& CommonMessagingBase::always ( ) const
inline

shortcut for the method msgStream(MSG::ALWAYS)

Definition at line 102 of file CommonMessaging.h.

102 { return msgStream( MSG::ALWAYS ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::debug ( ) const
inline

shortcut for the method msgStream(MSG::DEBUG)

Definition at line 120 of file CommonMessaging.h.

120 { return msgStream( MSG::DEBUG ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::err ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 108 of file CommonMessaging.h.

108 { return msgStream( MSG::ERROR ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::error ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 111 of file CommonMessaging.h.

111 { return msgStream( MSG::ERROR ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::fatal ( ) const
inline

shortcut for the method msgStream(MSG::FATAL)

Definition at line 105 of file CommonMessaging.h.

105 { return msgStream( MSG::FATAL ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::info ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 117 of file CommonMessaging.h.

117 { return msgStream( MSG::INFO ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::msg ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 126 of file CommonMessaging.h.

126 { return msgStream( MSG::INFO ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MSG::Level CommonMessagingBase::msgLevel ( ) const
inline

get the output level from the embedded MsgStream

Definition at line 129 of file CommonMessaging.h.

130  {
131  if ( UNLIKELY( ( !m_msgStream.get() ) ) ) create_msgStream();
132  if ( UNLIKELY( ( !m_level.get() ) ) ) {
133  return MSG::NIL;
134  }
135  return *m_level;
136  }
#define UNLIKELY(x)
Definition: Kernel.h:128
virtual void create_msgStream() const =0
boost::thread_specific_ptr< MSG::Level > m_level
boost::thread_specific_ptr< MsgStream > m_msgStream
The predefined message stream.
bool CommonMessagingBase::msgLevel ( MSG::Level  lvl) const
inline

get the output level from the embedded MsgStream

Definition at line 142 of file CommonMessaging.h.

142 { return UNLIKELY( msgLevel() <= lvl ); }
#define UNLIKELY(x)
Definition: Kernel.h:128
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
MsgStream& CommonMessagingBase::msgStream ( ) const
inline

Return an uninitialized MsgStream.

Definition at line 83 of file CommonMessaging.h.

84  {
85  if ( UNLIKELY( ( !m_msgStream.get() ) ) ) create_msgStream();
86  return *m_msgStream;
87  }
#define UNLIKELY(x)
Definition: Kernel.h:128
virtual void create_msgStream() const =0
boost::thread_specific_ptr< MsgStream > m_msgStream
The predefined message stream.
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 99 of file CommonMessaging.h.

99 { return msgStream() << level; }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
SmartIF<IMessageSvc>& CommonMessagingBase::msgSvc ( ) const
inline

The standard message service.

Returns a pointer to the standard message service.

Definition at line 76 of file CommonMessaging.h.

77  {
78  if ( UNLIKELY( !m_msgsvc ) ) create_msgSvc();
79  return m_msgsvc;
80  }
#define UNLIKELY(x)
Definition: Kernel.h:128
SmartIF< IMessageSvc > m_msgsvc
Pointer to the message service;.
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 139 of file CommonMessaging.h.

139 { return msgLevel(); }
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
MsgStream& CommonMessagingBase::verbose ( ) const
inline

shortcut for the method msgStream(MSG::VERBOSE)

Definition at line 123 of file CommonMessaging.h.

123 { return msgStream( MSG::VERBOSE ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.
MsgStream& CommonMessagingBase::warning ( ) const
inline

shortcut for the method msgStream(MSG::WARNING)

Definition at line 114 of file CommonMessaging.h.

114 { return msgStream( MSG::WARNING ); }
MsgStream & msgStream() const
Return an uninitialized MsgStream.

Friends And Related Function Documentation

template<typename Base >
friend class CommonMessaging
friend

Definition at line 146 of file CommonMessaging.h.

Member Data Documentation

boost::thread_specific_ptr<MSG::Level> CommonMessagingBase::m_level
mutableprivate

Definition at line 152 of file CommonMessaging.h.

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

The predefined message stream.

Definition at line 149 of file CommonMessaging.h.

SmartIF<IMessageSvc> CommonMessagingBase::m_msgsvc
mutableprivate

Pointer to the message service;.

Definition at line 155 of file CommonMessaging.h.


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