The Gaudi Framework
v33r0 (d5ea422b)
IMessageSvc.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#ifndef GAUDIKERNEL_IMESSAGESVC_H
12
#define GAUDIKERNEL_IMESSAGESVC_H
13
14
// Include files
15
#include "
GaudiKernel/IInterface.h
"
16
#include <iostream>
17
#include <string>
18
19
// Forward declarations
20
class
StatusCode
;
21
class
Message
;
22
24
namespace
MSG
{
25
enum
Level
{
NIL
= 0,
VERBOSE
,
DEBUG
,
INFO
,
WARNING
,
ERROR
,
FATAL
,
ALWAYS
,
NUM_LEVELS
};
26
enum
Color
{
BLACK
= 0,
RED
,
GREEN
,
YELLOW
,
BLUE
,
PURPLE
,
CYAN
,
WHITE
,
NUM_COLORS
};
27
}
// namespace MSG
28
29
#ifdef _WIN32
30
// Avoid (hopefully) conflicts between Windows' headers and MSG.
31
# ifndef NOMSG
32
# define NOMSG
33
# ifndef NOGDI
34
# define NOGDI
35
# endif
36
# endif
37
#endif
38
47
class
GAUDI_API
IMessageSvc
:
virtual
public
IInterface
{
48
public
:
50
DeclareInterfaceID
(
IMessageSvc
, 2, 0 );
51
56
virtual
void
reportMessage(
const
Message
&
msg
,
int
outputLevel ) = 0;
57
61
virtual
void
reportMessage(
const
Message
& message ) = 0;
62
68
virtual
void
reportMessage(
const
StatusCode
& code,
const
std::string
& source =
""
) = 0;
69
75
virtual
void
reportMessage(
const
std::string
& source,
int
type
,
const
std::string
& message ) = 0;
76
83
virtual
void
reportMessage(
const
char
* source,
int
type
,
const
char
* message =
""
) = 0;
84
89
virtual
void
insertMessage(
const
StatusCode
& code,
const
Message
& message ) = 0;
90
92
virtual
void
eraseMessage() = 0;
93
95
virtual
void
eraseMessage(
const
StatusCode
& code ) = 0;
96
101
virtual
void
eraseMessage(
const
StatusCode
& code,
const
Message
& message ) = 0;
102
108
virtual
void
insertStream(
int
type
,
const
std::string
&
name
,
std::ostream
* stream ) = 0;
109
111
virtual
void
eraseStream() = 0;
112
114
virtual
void
eraseStream(
int
message_type ) = 0;
115
120
virtual
void
eraseStream(
int
type
,
std::ostream
* stream ) = 0;
121
125
virtual
void
eraseStream(
std::ostream
* stream ) = 0;
126
128
virtual
std::ostream
* defaultStream()
const
= 0;
129
133
virtual
void
setDefaultStream(
std::ostream
* stream ) = 0;
134
136
virtual
int
outputLevel()
const
= 0;
137
141
virtual
int
outputLevel(
const
std::string
& source )
const
= 0;
142
144
virtual
void
setOutputLevel(
int
new_level ) = 0;
145
150
virtual
void
setOutputLevel(
const
std::string
& source,
int
new_level ) = 0;
151
154
virtual
bool
useColor()
const
= 0;
155
159
virtual
std::string
getLogColor(
int
logLevel )
const
= 0;
160
163
virtual
int
messageCount(
MSG::Level
level
)
const
= 0;
164
};
165
166
class
GAUDI_API
IInactiveMessageCounter
:
virtual
public
IInterface
{
167
public
:
169
DeclareInterfaceID
(
IInactiveMessageCounter
, 1, 0 );
170
175
virtual
void
incrInactiveCount(
MSG::Level
level
,
const
std::string
& src ) = 0;
176
};
177
178
#endif // GAUDIKERNEL_IMESSAGESVC_H
gaudiComponentHelp.name
name
Definition:
gaudiComponentHelp.py:52
MSG::CYAN
Definition:
IMessageSvc.h:26
MSG::GREEN
Definition:
IMessageSvc.h:26
MSG::DEBUG
Definition:
IMessageSvc.h:25
IInactiveMessageCounter
Definition:
IMessageSvc.h:166
MSG::VERBOSE
Definition:
IMessageSvc.h:25
MSG::WHITE
Definition:
IMessageSvc.h:26
std::string
STL class.
MSG::FATAL
Definition:
IMessageSvc.h:25
MSG::Level
Level
Definition:
IMessageSvc.h:25
MSG::RED
Definition:
IMessageSvc.h:26
MSG::BLUE
Definition:
IMessageSvc.h:26
StatusCode
This class is used for returning status codes from appropriate routines.
Definition:
StatusCode.h:61
IInterface
Definition of the basic interface.
Definition:
IInterface.h:254
gaudirun.type
type
Definition:
gaudirun.py:154
IMessageSvc
The IMessage is the interface implemented by the message service.
Definition:
IMessageSvc.h:47
MSG::NUM_COLORS
Definition:
IMessageSvc.h:26
MSG::NIL
Definition:
IMessageSvc.h:25
DeclareInterfaceID
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
Definition:
IInterface.h:23
Message
The Message class.
Definition:
Message.h:27
MSG::NUM_LEVELS
Definition:
IMessageSvc.h:25
MSG
Print levels enumeration.
Definition:
IMessageSvc.h:24
MSG::BLACK
Definition:
IMessageSvc.h:26
GaudiMP.FdsRegistry.msg
msg
Definition:
FdsRegistry.py:18
MSG::ERROR
Definition:
IMessageSvc.h:25
MSG::PURPLE
Definition:
IMessageSvc.h:26
gaudirun.level
level
Definition:
gaudirun.py:346
MSG::WARNING
Definition:
IMessageSvc.h:25
MSG::INFO
Definition:
IMessageSvc.h:25
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:81
IInterface.h
MSG::YELLOW
Definition:
IMessageSvc.h:26
std::ostream
STL class.
MSG::ALWAYS
Definition:
IMessageSvc.h:25
MSG::Color
Color
Definition:
IMessageSvc.h:26
GaudiKernel
GaudiKernel
IMessageSvc.h
Generated on Mon Dec 16 2019 23:26:33 for The Gaudi Framework by
1.8.15