The Gaudi Framework  master (594c33fa)
CommonMessagingBase Class Referenceabstract

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

Collaboration diagram for CommonMessagingBase:

Public Member Functions

virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
virtual void create_msgStream () const =0
 cold functionality More...
 
const 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...
 

Private Attributes

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

Friends

template<typename Base >
class CommonMessaging
 

Detailed Description

Definition at line 68 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 99 of file CommonMessaging.h.

99 { return msgStream( MSG::ALWAYS ); }

◆ create_msgStream()

virtual void CommonMessagingBase::create_msgStream ( ) const
pure virtual

cold functionality

◆ debug()

MsgStream& CommonMessagingBase::debug ( ) const
inline

shortcut for the method msgStream(MSG::DEBUG)

Definition at line 117 of file CommonMessaging.h.

117 { return msgStream( MSG::DEBUG ); }

◆ err()

MsgStream& CommonMessagingBase::err ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 105 of file CommonMessaging.h.

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

◆ error()

MsgStream& CommonMessagingBase::error ( ) const
inline

shortcut for the method msgStream(MSG::ERROR)

Definition at line 108 of file CommonMessaging.h.

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

◆ fatal()

MsgStream& CommonMessagingBase::fatal ( ) const
inline

shortcut for the method msgStream(MSG::FATAL)

Definition at line 102 of file CommonMessaging.h.

102 { return msgStream( MSG::FATAL ); }

◆ info()

MsgStream& CommonMessagingBase::info ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 114 of file CommonMessaging.h.

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

◆ msg()

MsgStream& CommonMessagingBase::msg ( ) const
inline

shortcut for the method msgStream(MSG::INFO)

Definition at line 123 of file CommonMessaging.h.

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

◆ msgStream() [1/2]

MsgStream& CommonMessagingBase::msgStream ( ) const
inline

Return an uninitialized MsgStream.

Definition at line 81 of file CommonMessaging.h.

81  {
82  if ( !m_msgStream.get() ) create_msgStream();
83  return *m_msgStream;
84  }

◆ 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 ; }
Returns
Reference to the predefined stream

Definition at line 96 of file CommonMessaging.h.

96 { 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 78 of file CommonMessaging.h.

78 { return m_msgsvc; }

◆ verbose()

MsgStream& CommonMessagingBase::verbose ( ) const
inline

shortcut for the method msgStream(MSG::VERBOSE)

Definition at line 120 of file CommonMessaging.h.

120 { return msgStream( MSG::VERBOSE ); }

◆ warning()

MsgStream& CommonMessagingBase::warning ( ) const
inline

shortcut for the method msgStream(MSG::WARNING)

Definition at line 111 of file CommonMessaging.h.

111 { return msgStream( MSG::WARNING ); }

Friends And Related Function Documentation

◆ CommonMessaging

template<typename Base >
friend class CommonMessaging
friend

Definition at line 127 of file CommonMessaging.h.

Member Data Documentation

◆ m_commonMessagingReady

bool CommonMessagingBase::m_commonMessagingReady = false
mutableprivate

Definition at line 129 of file CommonMessaging.h.

◆ m_level

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

Definition at line 130 of file CommonMessaging.h.

◆ m_msgStream

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

The predefined message stream.

Definition at line 133 of file CommonMessaging.h.

◆ m_msgsvc

SmartIF<IMessageSvc> CommonMessagingBase::m_msgsvc
mutableprivate

Pointer to the message service;.

Definition at line 136 of file CommonMessaging.h.


The documentation for this class was generated from the following file:
MSG::DEBUG
@ DEBUG
Definition: IMessageSvc.h:25
MSG::INFO
@ INFO
Definition: IMessageSvc.h:25
CommonMessagingBase::m_msgsvc
SmartIF< IMessageSvc > m_msgsvc
Pointer to the message service;.
Definition: CommonMessaging.h:136
MSG::WARNING
@ WARNING
Definition: IMessageSvc.h:25
CommonMessagingBase::create_msgStream
virtual void create_msgStream() const =0
cold functionality
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:203
gaudirun.level
level
Definition: gaudirun.py:364
MSG::FATAL
@ FATAL
Definition: IMessageSvc.h:25
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:81
CommonMessagingBase::m_msgStream
boost::thread_specific_ptr< MsgStream > m_msgStream
The predefined message stream.
Definition: CommonMessaging.h:133
MSG::VERBOSE
@ VERBOSE
Definition: IMessageSvc.h:25
MSG::ALWAYS
@ ALWAYS
Definition: IMessageSvc.h:25
MSG::ERROR
@ ERROR
Definition: IMessageSvc.h:25