| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions

# IMessageSvc Class Reference

The IMessage is the interface implemented by the message service. More...

`#include <GaudiKernel/IMessageSvc.h>`

Inheritance diagram for IMessageSvc:
[legend]
Collaboration diagram for IMessageSvc:
[legend]

List of all members.

## Public Member Functions
| DeclareInterfaceID (IMessageSvc, 2, 0)
| InterfaceID.
virtual void | reportMessage (const Message &msg, int outputLevel)=0
| Report a message by sending a Message object to the message service.
virtual void | reportMessage (const Message &message)=0
| Report a message by sending a Message object to the message service.
virtual void | reportMessage (const StatusCode &code, const std::string &source="")=0
| Report an error to the message service.
virtual void | reportMessage (const std::string &source, int type, const std::string &message)=0
| Report a message by specifying the source, severity level and text.
virtual void | reportMessage (const char *source, int type, const char *message="")=0
| Report a message by specifying the source, severity level and text.
virtual void | insertMessage (const StatusCode &code, const Message &message)=0
| Insert a message to be sent for a given status code into the error code repository.
virtual void | eraseMessage ()=0
| Erase all messages associated to all status codes.
virtual void | eraseMessage (const StatusCode &code)=0
| Erase message associated to a given status code.
virtual void | eraseMessage (const StatusCode &code, const Message &message)=0
| Erase a given message associated to a given status code.
virtual void | insertStream (int type, const std::string &name, std::ostream *stream)=0
| Add a new stream for a message type (severity level).
virtual void | eraseStream ()=0
| Delete all the streams.
virtual void | eraseStream (int message_type)=0
| Delete all the streams for a given message type (severity level).
virtual void | eraseStream (int type, std::ostream *stream)=0
| Delete a single stream for a given message type (severity level)
virtual void | eraseStream (std::ostream *stream)=0
| Delete all occurrences of a stream.
virtual std::ostream * | defaultStream () const =0
| Get the default stream.
virtual void | setDefaultStream (std::ostream *stream)=0
| Set the default stream.
virtual int | outputLevel () const =0
| Retrieve the current output level threshold.
virtual int | outputLevel (const std::string &source) const =0
| Retrieve the current output level threshold for a given message source.
virtual void | setOutputLevel (int new_level)=0
| Set new global output level threshold.
virtual void | setOutputLevel (const std::string &source, int new_level)=0
| Set new output level threshold for a given message source.
virtual bool | useColor () const =0
| Show whether colors are used.
virtual std::string | getLogColor (int logLevel) const =0
| Get the color codes for various log levels.
virtual int | messageCount (MSG::Level level) const =0
| Get the number of messages issued at a particular level.

## Detailed Description

The IMessage is the interface implemented by the message service.

This interface is used by any algorithm or services wanting to report messages to the end-user.

Author:
  Iain Last

Definition at line 57 of file IMessageSvc.h.

## Member Function Documentation

IMessageSvc::DeclareInterfaceID | ( | IMessageSvc | ,
|  | 2 | ,
|  | 0 |
| ) |  |

InterfaceID.

virtual std::ostream* IMessageSvc::defaultStream | ( | ) | const`[pure virtual]`

Get the default stream.

virtual void IMessageSvc::eraseMessage | ( | ) | `[pure virtual]`

Erase all messages associated to all status codes.

virtual void IMessageSvc::eraseMessage | ( | const StatusCode & | code ) | `[pure virtual]`

Erase message associated to a given status code.

virtual void IMessageSvc::eraseMessage | ( | const StatusCode & | code,
|  | const Message & | message
| ) |  | `[pure virtual]`

Erase a given message associated to a given status code.

Parameters:

  code | Status error code
  message | Message associated

virtual void IMessageSvc::eraseStream | ( | ) | `[pure virtual]`

Delete all the streams.

virtual void IMessageSvc::eraseStream | ( | int | message_type ) | `[pure virtual]`

Delete all the streams for a given message type (severity level).

virtual void IMessageSvc::eraseStream | ( | int | type,
|  | std::ostream * | stream
| ) |  | `[pure virtual]`

Delete a single stream for a given message type (severity level)

Parameters:

  type | Severity level
  stream | Pointer to a C++ stream

virtual void IMessageSvc::eraseStream | ( | std::ostream * | stream ) | `[pure virtual]`

Delete all occurrences of a stream.

Parameters:

  stream | Pointer to a C++ stream

virtual std::string IMessageSvc::getLogColor | ( | int | logLevel ) | const`[pure virtual]`

Get the color codes for various log levels.

Parameters:

  logLevel | Logging level

virtual void IMessageSvc::insertMessage | ( | const StatusCode & | code,
|  | const Message & | message
| ) |  | `[pure virtual]`

Insert a message to be sent for a given status code into the error code repository.

Parameters:

  code | Status error code
  message | Message associated

virtual void IMessageSvc::insertStream | ( | int | type,
|  | const std::string & | name,
|  | std::ostream * | stream
| ) |  | `[pure virtual]`

Add a new stream for a message type (severity level).

Parameters:

  type | Severity level
  name | Stream name
  stream | Pointer to a C++ stream

virtual int IMessageSvc::messageCount | ( | MSG::Level | level ) | const`[pure virtual]`

Get the number of messages issued at a particular level.

virtual int IMessageSvc::outputLevel | ( | ) | const`[pure virtual]`

Retrieve the current output level threshold.

virtual int IMessageSvc::outputLevel | ( | const std::string & | source ) | const`[pure virtual]`

Retrieve the current output level threshold for a given message source.

Parameters:

  source | Message source. Typically the alg/svc name

virtual void IMessageSvc::reportMessage | ( | const Message & | message ) | `[pure virtual]`

Report a message by sending a Message object to the message service.

Parameters:

  message | Reference to a message object

virtual void IMessageSvc::reportMessage | ( | const char * | source,
|  | int | type,
|  | const char * | message = `""`
| ) |  | `[pure virtual]`

Report a message by specifying the source, severity level and text.

The text is passed as C like character string to avoid extra copying.

Parameters:

  source | Message source. Typically the alg/svc name
  type | Severity level
  message | Text message

virtual void IMessageSvc::reportMessage | ( | const StatusCode & | code,
|  | const std::string & | source = `""`
| ) |  | `[pure virtual]`

Report an error to the message service.

The service will use the error code number for formating a human readable message

Parameters:

  code | Error code number
  source | Message source. Typically the alg/svc name

virtual void IMessageSvc::reportMessage | ( | const std::string & | source,
|  | int | type,
|  | const std::string & | message
| ) |  | `[pure virtual]`

Report a message by specifying the source, severity level and text.

Parameters:

  source | Message source. Typically the alg/svc name
  type | Severity level
  message | Text message

virtual void IMessageSvc::reportMessage | ( | const Message & | msg,
|  | int | outputLevel
| ) |  | `[pure virtual]`

Report a message by sending a Message object to the message service.

Parameters:

  message | Reference to a message object
  outputLevel | Output level of the message source for this message

virtual void IMessageSvc::setDefaultStream | ( | std::ostream * | stream ) | `[pure virtual]`

Set the default stream.

Parameters:

  stream | Pointer to a C++ stream

virtual void IMessageSvc::setOutputLevel | ( | int | new_level ) | `[pure virtual]`

Set new global output level threshold.

virtual void IMessageSvc::setOutputLevel | ( | const std::string & | source,
|  | int | new_level
| ) |  | `[pure virtual]`

Set new output level threshold for a given message source.

Parameters:

  source | Message source
  new_level | Severity level

virtual bool IMessageSvc::useColor | ( | ) | const`[pure virtual]`

Show whether colors are used.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiKernel/GaudiKernel/IMessageSvc.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines