Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_MSGSTREAM_H
12 #define GAUDIKERNEL_MSGSTREAM_H
211 if (
s.isActive() )
s.stream().fill( obj._Fill );
213 if (
s.isActive() )
s.stream().fill( obj._Ch );
220 if (
s.isActive() ) ( *manip._Pfun )(
s.stream(), manip._Manarg );
222 if (
s.isActive() ) ( *manip._Pf )(
s.stream(), manip._Manarg );
226 #elif defined( __GNUC__ )
231 if (
s.isActive() )
s.stream() << manip;
238 if (
s.isActive() )
s.stream() << manip;
245 if (
s.isActive() )
s.stream() << manip;
252 if (
s.isActive() )
s.stream() << manip;
259 if (
s.isActive() )
s.stream() << manip;
263 # endif // not __APPLE__
264 #else // GCC, version << 3
270 if (
s.isActive() )
s.stream() << manip;
274 #endif // WIN32 or (__GNUC__)
292 if (
s.isActive() )
s.stream() << arg;
298 template <
typename T>
308 #if defined( __GNUC__ ) and not defined( __APPLE__ )
309 template <
typename T>
320 #endif // GAUDIKERNEL_MSGSTREAM_H
Print levels enumeration.
MsgStream & hex(MsgStream &log)
MsgStream & operator<<(long long arg)
static GAUDI_API bool enableCountInactive(bool value=true)
Enable/disable the count of inactive messages.
IMessageSvc * m_service
Pointer to message service if buffer has send.
bool m_useColors
use colors
virtual GAUDI_API MsgStream & doOutput()
Output method.
MSG::Level currentLevel() const
Retrieve current stream output level.
const std::string & buffer() const
Access string buffer.
MsgStream & report(int lvl)
Initialize report of new message: activate if print level is sufficient.
MsgStream & write(const char *buff, int len)
int setf(FLAG_TYPE _f, FLAG_TYPE _m)
GAUDI_API void setColor(MSG::Color col)
Set the text color.
std::ios_base::iostate STATE_TYPE
MSG::Level m_level
Debug level of the message service.
MsgStream & operator<<(std::ios_base &(*_f)(std::ios_base &))
Accept ios base class modifiers.
std::streamsize width() const
IOS emulation.
std::ostringstream m_stream
String MsgStream associated to buffer.
MsgStream & operator<<(MsgStream &(*_f)(MsgStream &))
Accept MsgStream modifiers.
MsgStream & dec(MsgStream &log)
std::string m_source
Use std::string for source information to be passed to the message service.
MsgStream & operator<<(MsgStream &s, const std::smanip< _Tm > &manip)
I/O Manipulator for setfill.
std::string m_buffer
Use standard string for information buffering.
void deactivate()
Deactivate MsgStream.
void clear(STATE_TYPE _i=std::ios_base::failbit)
bool m_active
Flag set to true if formatting engine is active.
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
MsgStream & operator<<(MSG::Level level)
Accept MsgStream activation using MsgStreamer operator.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
MsgStream & operator<<(std::ios &(*_f)(std::ios &))
Accept ios modifiers.
MSG::Level m_currLevel
Current debug level.
void setMsgSvc(IMessageSvc *svc)
Update IMessageSvc pointer.
GAUDI_API MsgStream(IMessageSvc *svc, int buffer_length=128)
Standard constructor: Connect to message service for output.
std::streamsize width(std::streamsize v)
std::streamsize precision(int v)
MsgStream & operator<<(std::ostream &(*_f)(std::ostream &))
Accept oMsgStream modifiers.
virtual GAUDI_API ~MsgStream()=default
Standard destructor.
MsgStream(const MsgStream &msg)
Copy constructor.
void setLevel(int level)
Update outputlevel.
IInactiveMessageCounter * m_inactCounter
Pointer to service counting messages prepared but not printed because of wrong level.
void activate()
Activate MsgStream.
void unsetf(FLAG_TYPE _l)
virtual void incrInactiveCount(MSG::Level level, std::string_view src)=0
Increment deactivated message count.
bool isActive() const
Accessor: is MsgStream active.
std::ios_base::fmtflags FLAG_TYPE
Error return code in case ios modification is requested for inactive streams.
MSG::Level level() const
Retrieve output level.
std::ostringstream & stream()
Access string MsgStream.
GAUDI_API void resetColor()
Reset the colors to defaults.
static bool m_countInactive
Flag to state if the inactive messages has to be counted.
std::streamsize precision() const
static GAUDI_API bool countInactive()
Returns the state of the counting of inactive messages (enabled/disabled).