| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# MsgStream.h File Reference

`#include "GaudiKernel/IMessageSvc.h"`
`#include "GaudiKernel/SerializeSTL.h"`
`#include <cstdio>`
`#include <string>`
`#include <iomanip>`
`#include <vector>`
`#include <sstream>`

Include dependency graph for MsgStream.h:

Go to the source code of this file.

## Classes
class | MsgStream
| Definition of the MsgStream class used to transmit messages. More...
## Functions
MsgStream & | endreq (MsgStream &s)
| MsgStream Modifier: endreq. Calls the output method of the MsgStream.
MsgStream & | endmsg (MsgStream &s)
| MsgStream Modifier: endreq. Calls the output method of the MsgStream.
std::string | format (const char *,...)
| MsgStream format utility "a la sprintf(...)".
template<class _Tm>
MsgStream & | operator<< (MsgStream &s, const std::smanip< _Tm > &manip)
| I/O Manipulator for setfill.
template<typename T>
MsgStream & | operator<< (MsgStream &lhs, const T &arg)
| General templated stream operator.

## Function Documentation

MsgStream& endmsg | ( | MsgStream & | s | ) | `[inline]`

MsgStream Modifier: endreq. Calls the output method of the MsgStream.

Definition at line 227 of file MsgStream.h.

    00227                                          {
    00228   return s.doOutput();
    00229 }

MsgStream& endreq | ( | MsgStream & | s | ) | `[inline]`

MsgStream Modifier: endreq. Calls the output method of the MsgStream.

Definition at line 223 of file MsgStream.h.

    00223                                          {
    00224   return s.doOutput();
    00225 }

std::string format | ( | const char * | ,
|  |  | ... |
| ) |  |  |

MsgStream format utility "a la sprintf(...)".

Definition at line 96 of file MsgStream.cpp.

    00097 {
    00098   const int buffsize = 2048;
    00099   static char buffer[buffsize];
    00100   va_list arguments;
    00101   va_start( arguments, fmt );
    00102   if( vsprintf(buffer, fmt, arguments) >= buffsize )
    00103     throw GaudiException("Insufficient buffer size (2048) when formatting message",
    00104                          "MsgStream", 0);
    00105   return std::string(buffer);
    00106 }

template<typename T>

MsgStream& operator<< | ( | MsgStream & | lhs,
|  | const T & | arg |
| ) |  |  | `[inline]`

General templated stream operator.

Definition at line 304 of file MsgStream.h.

    00304                                                       {
    00305   using namespace GaudiUtils;
    00306   if(lhs.isActive()) lhs.stream() << arg;
    00307   return lhs;
    00308 }

template<class _Tm>

MsgStream& operator<< | ( | MsgStream & | s,
|  | const std::smanip< _Tm > & | manip |
| ) |  |  | `[inline]`

I/O Manipulator for setfill.

Definition at line 296 of file MsgStream.h.

    00296                                                                     {
    00297   if ( s.isActive() ) s.stream() << manip;
    00298   return s;
    00299 }