| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- File List
- File Members

IMessageSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_IMESSAGESVC_H
2 #define GAUDIKERNEL_IMESSAGESVC_H
3
4 // Include files
5 #include "GaudiKernel/IInterface.h"
6 #include <iostream>
7 #include <string>
8
9 // Forward declarations
10 class StatusCode;
11 class Message;
12
14 namespace MSG {
15 enum Level {
16 NIL = 0,
17 VERBOSE,
18 DEBUG,
19 INFO,
20 WARNING,
21 ERROR,
22 FATAL,
23 ALWAYS,
24 NUM_LEVELS
25 };
26 enum Color {
27 BLACK = 0,
28 RED,
29 GREEN,
30 YELLOW,
31 BLUE,
32 PURPLE,
33 CYAN,
34 WHITE,
35 NUM_COLORS
36 };
37 }
38
39 #ifdef _WIN32
40 // Avoid (hopefully) conflicts between Windows' headers and MSG.
41 # ifndef NOMSG
42 # define NOMSG
43 # ifndef NOGDI
44 # define NOGDI
45 # endif
46 # endif
47 #endif
48
57 class GAUDI_API IMessageSvc: virtual public IInterface {
58 public:
60 DeclareInterfaceID(IMessageSvc,2,0);
61
66 virtual void reportMessage( const Message& msg, int outputLevel ) = 0;
67
71 virtual void reportMessage( const Message& message ) = 0;
72
78 virtual void reportMessage( const StatusCode& code,
79 const std::string& source = "" ) = 0;
80
86 virtual void reportMessage( const std::string& source,
87 int type,
88 const std::string& message ) = 0;
89
96 virtual void reportMessage( const char* source,
97 int type,
98 const char* message = "" ) = 0;
99
104 virtual void insertMessage( const StatusCode& code,
105 const Message& message ) = 0;
106
108 virtual void eraseMessage() = 0;
109
111 virtual void eraseMessage( const StatusCode& code ) = 0;
112
117 virtual void eraseMessage( const StatusCode& code,
118 const Message& message ) = 0;
119
125 virtual void insertStream( int type,
126 const std::string& name,
127 std::ostream* stream ) = 0;
128
130 virtual void eraseStream() = 0;
131
133 virtual void eraseStream( int message_type ) = 0;
134
139 virtual void eraseStream( int type,
140 std::ostream* stream ) = 0;
141
145 virtual void eraseStream( std::ostream* stream ) = 0;
146
148 virtual std::ostream* defaultStream() const = 0;
149
153 virtual void setDefaultStream( std::ostream* stream ) = 0;
154
156 virtual int outputLevel() const = 0;
157
161 virtual int outputLevel( const std::string& source ) const = 0;
162
164 virtual void setOutputLevel( int new_level ) = 0;
165
170 virtual void setOutputLevel( const std::string& source,
171 int new_level) = 0;
172
173
176 virtual bool useColor() const = 0;
177
181 virtual std::string getLogColor(int logLevel) const = 0;
182
185 virtual int messageCount( MSG::Level level ) const = 0;
186
187 };
188
189 class GAUDI_API IInactiveMessageCounter: virtual public IInterface {
190 public:
192 DeclareInterfaceID(IInactiveMessageCounter,1,0);
193
198 virtual void incrInactiveCount( MSG::Level level,
199 const std::string& src ) = 0;
200 };
201
202 #endif // GAUDIKERNEL_IMESSAGESVC_H
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
MSG::CYAN
Definition: IMessageSvc.h:33
MSG::GREEN
Definition: IMessageSvc.h:29
MSG::DEBUG
Definition: IMessageSvc.h:18
IInactiveMessageCounter
Definition: IMessageSvc.h:189
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:14
MSG::VERBOSE
Definition: IMessageSvc.h:17
MSG::WHITE
Definition: IMessageSvc.h:34
std::string
STL class.
MSG::FATAL
Definition: IMessageSvc.h:22
MSG::Level
Level
Definition: IMessageSvc.h:15
MSG::RED
Definition: IMessageSvc.h:28
MSG::BLUE
Definition: IMessageSvc.h:31
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
gaudirun.type
type
Definition: gaudirun.py:125
IMessageSvc
The IMessage is the interface implemented by the message service.
Definition: IMessageSvc.h:57
MSG::NUM_COLORS
Definition: IMessageSvc.h:35
MSG::NIL
Definition: IMessageSvc.h:16
Message
The Message class.
Definition: Message.h:15
MSG::NUM_LEVELS
Definition: IMessageSvc.h:24
MSG
Print levels enumeration.
Definition: IMessageSvc.h:14
MSG::BLACK
Definition: IMessageSvc.h:27
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:8
MSG::ERROR
Definition: IMessageSvc.h:21
MSG::PURPLE
Definition: IMessageSvc.h:32
gaudirun.level
level
Definition: gaudirun.py:261
MSG::WARNING
Definition: IMessageSvc.h:20
MSG::INFO
Definition: IMessageSvc.h:19
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
IInterface.h
MSG::YELLOW
Definition: IMessageSvc.h:30
std::ostream
STL class.
MSG::ALWAYS
Definition: IMessageSvc.h:23
MSG::Color
Color
Definition: IMessageSvc.h:26