/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Member Functions | Private Attributes
GaudiMsgStreams Class Reference

A class that gives access to standard messages stream levelss. More...

#include <GaudiMessages.h>

List of all members.

Public Member Functions

 GaudiMsgStreams (const std::string &streamName="")
MsgStream & log (MSG::Level level)
MsgStream & verbose ()
MsgStream & debug ()
MsgStream & info ()
MsgStream & warning ()
MsgStream & error ()
MsgStream & fatal ()
MsgStream & always ()

Private Member Functions

GaudiMsgStreamsoperator= (const GaudiMsgStreams &)

Private Attributes

MsgStream m_msgStream

Detailed Description

A class that gives access to standard messages stream levelss.

Use like:

void my_function() { // a useful label would be the function/method name GaudiMsgStreams log("Some useful label");

log.error() << "Uh oh!" << endreq; log.warning() << "Oh My!" << endreq; log.info() << "Blah blah" << endreq; log.debug() << "Boooring" << endreq; log.verbose() << "Shut up!" << endreq;

// needs #include "GaudiKernel/IMessageSvc.h" to define levels int level = MSG::INFO; log.log(level) << "Specify the level" << endreq; }

Definition at line 43 of file GaudiMessages.h.


Constructor & Destructor Documentation

GaudiMsgStreams::GaudiMsgStreams ( const std::string &  streamName = "")

Definition at line 15 of file GaudiMessages.cc.

    : m_msgStream(msgSvc(),streamName)
{
    
}

Member Function Documentation

GaudiMsgStreams& GaudiMsgStreams::operator= ( const GaudiMsgStreams ) [private]
MsgStream & GaudiMsgStreams::log ( MSG::Level  level)

Definition at line 21 of file GaudiMessages.cc.

{
    m_msgStream << level;
    return m_msgStream;
}
MsgStream & GaudiMsgStreams::verbose ( )

Definition at line 27 of file GaudiMessages.cc.

{
    return this->log(MSG::VERBOSE);
}
MsgStream & GaudiMsgStreams::debug ( )

Definition at line 31 of file GaudiMessages.cc.

{
    return this->log(MSG::DEBUG);
}
MsgStream & GaudiMsgStreams::info ( )

Definition at line 35 of file GaudiMessages.cc.

{
    return this->log(MSG::INFO);
}
MsgStream & GaudiMsgStreams::warning ( )

Definition at line 39 of file GaudiMessages.cc.

{
    return this->log(MSG::WARNING);
}
MsgStream & GaudiMsgStreams::error ( )

Definition at line 43 of file GaudiMessages.cc.

{
    return this->log(MSG::ERROR);
}
MsgStream & GaudiMsgStreams::fatal ( )

Definition at line 47 of file GaudiMessages.cc.

{
    return this->log(MSG::FATAL);
}
MsgStream & GaudiMsgStreams::always ( )

Definition at line 51 of file GaudiMessages.cc.

{
    return this->log(MSG::ALWAYS);
}

Member Data Documentation

MsgStream GaudiMsgStreams::m_msgStream [private]

Definition at line 45 of file GaudiMessages.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:53:42 for GaudiMessages by doxygen 1.7.4