| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
IMessageSvc Class Referenceabstract

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]

## Public Member Functions
| DeclareInterfaceID (IMessageSvc, 2, 0)
| InterfaceID. More...
virtual void | reportMessage (const Message &msg, int outputLevel)=0
| Report a message by sending a Message object to the message service. More...
virtual void | reportMessage (const Message &message)=0
| Report a message by sending a Message object to the message service. More...
virtual void | reportMessage (const StatusCode &code, const std::string &source="")=0
| Report an error to the message service. More...
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. More...
virtual void | reportMessage (const char *source, int type, const char *message="")=0
| Report a message by specifying the source, severity level and text. More...
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. More...
virtual void | eraseMessage ()=0
| Erase all messages associated to all status codes. More...
virtual void | eraseMessage (const StatusCode &code)=0
| Erase message associated to a given status code. More...
virtual void | eraseMessage (const StatusCode &code, const Message &message)=0
| Erase a given message associated to a given status code. More...
virtual void | insertStream (int type, const std::string &name, std::ostream *stream)=0
| Add a new stream for a message type (severity level). More...
virtual void | eraseStream ()=0
| Delete all the streams. More...
virtual void | eraseStream (int message_type)=0
| Delete all the streams for a given message type (severity level). More...
virtual void | eraseStream (int type, std::ostream *stream)=0
| Delete a single stream for a given message type (severity level) More...
virtual void | eraseStream (std::ostream *stream)=0
| Delete all occurrences of a stream. More...
virtual std::ostream * | defaultStream () const =0
| Get the default stream. More...
virtual void | setDefaultStream (std::ostream *stream)=0
| Set the default stream. More...
virtual int | outputLevel () const =0
| Retrieve the current output level threshold. More...
virtual int | outputLevel (const std::string &source) const =0
| Retrieve the current output level threshold for a given message source. More...
virtual void | setOutputLevel (int new_level)=0
| Set new global output level threshold. More...
virtual void | setOutputLevel (const std::string &source, int new_level)=0
| Set new output level threshold for a given message source. More...
virtual bool | useColor () const =0
| Show whether colors are used. More...
virtual std::string | getLogColor (int logLevel) const =0
| Get the color codes for various log levels. More...
virtual int | messageCount (MSG::Level level) const =0
| Get the number of messages issued at a particular level. More...
Public Member Functions inherited from IInterface
virtual void * | i_cast (const InterfaceID &) const =0
| main cast function More...
virtual std::vector< std::string > | getInterfaceNames () const =0
| Returns a vector of strings containing the names of all the implemented interfaces. More...
virtual unsigned long | addRef ()=0
| Increment the reference count of Interface instance. More...
virtual unsigned long | release ()=0
| Release Interface instance. More...
virtual unsigned long | refCount () const =0
| Current reference count. More...
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0
| Set the void** to the pointer to the requested interface of the instance. More...
virtual | ~IInterface ()=default
| Virtual destructor. More...

## Additional Inherited Members
Public Types inherited from IInterface
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
| Return status. More...
using | iid = Gaudi::InterfaceId< IInterface, 0, 0 >
| Interface ID. More...
using | ext_iids = Gaudi::interface_list< iid >
| Extra interfaces. More...
Static Public Member Functions inherited from IInterface
static const InterfaceID & | interfaceID ()
| Return an instance of InterfaceID identifying the interface. More...

## 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 38 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 & | 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::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 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 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::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:

- GaudiKernel/GaudiKernel/IMessageSvc.h