| The Gaudi Framework v29r0 (ff2e7097)

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

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

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
Message Class Referencefinal

The Message class. More...

`#include <GaudiKernel/Message.h>`

Collaboration diagram for Message:
[legend]

## Public Member Functions
| Message ()
| Default constructor. More...
| Message (const char *src, int type, const char *msg)
| Constructor. More...
| Message (std::string src, int type, std::string msg)
| Constructor. More...
| ~Message ()=default
| Default destructor. More...
const std::string & | getMessage () const
| Get the message string. More...
void | setMessage (std::string msg)
| Set the message string. More...
int | getType () const
| Get the message type. More...
void | setType (int msg_type)
| Set the message type. More...
const std::string & | getSource () const
| Get the message source. More...
void | setSource (std::string src)
| Set the message source. More...
const std::string & | getFormat () const
| Get the format string. More...
void | setFormat (std::string msg) const
| Set the format string. More...
const std::string & | getTimeFormat () const
| Get the time format string. More...
void | setTimeFormat (std::string timeFormat) const
| Set the time format string. More...
bool | operator< (const Message &test)
| Needed to build maps. More...

## Static Public Member Functions
static const std::string | getDefaultFormat ()
| Get the default format string. More...
static const std::string | getDefaultTimeFormat ()
| Get the default time format string. More...

## Private Member Functions
void | invalidFormat () const
| Called when an invalid format string is encountered. More...
void | makeFormattedMsg (const std::string &format) const
| Format the message. More...
void | decodeFormat (const std::string &format) const
| Decode format. More...
void | sizeField (const std::string &text) const
| Truncate or pad the output string to the field width as necessary. More...
void | setWidth (const std::string &formatArg) const
| Set the width of a stream. More...

## Private Attributes
std::string | m_message
| The message. More...
std::string | m_source = "UNKNOWN"
| The source. More...
std::string | m_format = DEFAULT_FORMAT
| The format string. More...
std::string | m_time_format = DEFAULT_TIME_FORMAT
| Time format string. More...
int | m_type = 0
| The type. More...
std::string | m_formatted_msg
| Formatted message. More...
char | m_fill = ' '
| The current fill character. More...
int | m_width = 0
| The current field width. More...
bool | m_left = true
| Justification. More...
size_t | m_ecSlot
long int | m_ecEvt
pthread_t | m_ecThrd

## Static Private Attributes
static const char | FORMAT_PREFIX = '%'
| Formatting string characters. More...
static const char | JUSTIFY_LEFT = 'L'
| The character used to indicate start of left text justification. More...
static const char | JUSTIFY_RIGHT = 'R'
| The character used to indicate start of right text justification. More...
static const char | MESSAGE = 'M'
| The character used to indicate that the message should be printed. More...
static const char | TYPE = 'T'
| The character used to indicate that the message type should be printed. More...
static const char | TIME = 't'
| The character used to indicate that the message timestamp should be printed. More...
static const char | UTIME = 'u'
| The character used to indicate that the message timestamp should be printed in UTC time. More...
static const char | SOURCE = 'S'
| The character used to indicate that the message source should be printed. More...
static const char | FILL = 'F'
| The character used to indicate that the previous character is to be used for padding out fields if the text is not long enough. More...
static const char | WIDTH = 'W'
| The character used to indicate that the previous decimal characters should be taken as the field width. More...
static constexpr const char * | DEFAULT_FORMAT = "% F%18W%S%7W%R%T %0W%M"
| The default message format. More...
static constexpr const char * | DEFAULT_TIME_FORMAT = "%Y-%m-%d %H:%M:%S,%f"
| The default time format. More...
static const char | SLOT = 's'
| For slot and event number from EventContext. More...
static const char | EVTNUM = 'e'
static const char | THREAD = 'X'

## Friends
std::ostream & | operator<< (std::ostream &stream, const Message &msg)
| Insert the message into a stream. More...
bool | operator== (const Message &a, const Message &b)
| Insert the message into a stream. More...

## Detailed Description

The Message class.

This class is used to contain messages which can then be formatted and sent to a message service

Author
  Iain Last

Definition at line 15 of file Message.h.

## Constructor & Destructor Documentation

Message::Message | ( |  | ) |

Default constructor.

Definition at line 31 of file Message.cpp.

32 {
33 m_ecSlot = Gaudi::Hive::currentContextId();
34 m_ecEvt = Gaudi::Hive::currentContextEvt();
35 m_ecThrd = pthread_self();
36 }
Message::m_ecSlot
size_t m_ecSlot
Definition: Message.h:171
Message::m_ecEvt
long int m_ecEvt
Definition: Message.h:172
Gaudi::Hive::currentContextId
GAUDI_API ContextIdType currentContextId()
Return the current context id.
Definition: ThreadLocalContext.cpp:22
Gaudi::Hive::currentContextEvt
GAUDI_API ContextIdType currentContextEvt()
Definition: ThreadLocalContext.cpp:23
Message::m_ecThrd
pthread_t m_ecThrd
Definition: Message.h:173

Message::Message | ( | const char * | src,
|  | int | type,
|  | const char * | msg
| ) |  |

Constructor.

Definition at line 44 of file Message.cpp.

44 : m_message( msg ), m_source( src ), m_type( type )
45 {
46 m_ecSlot = Gaudi::Hive::currentContextId();
47 m_ecEvt = Gaudi::Hive::currentContextEvt();
48 m_ecThrd = pthread_self();
49 }
Message::m_ecSlot
size_t m_ecSlot
Definition: Message.h:171
Message::m_ecEvt
long int m_ecEvt
Definition: Message.h:172
Gaudi::Hive::currentContextId
GAUDI_API ContextIdType currentContextId()
Return the current context id.
Definition: ThreadLocalContext.cpp:22
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
gaudirun.type
type
Definition: gaudirun.py:133
Gaudi::Hive::currentContextEvt
GAUDI_API ContextIdType currentContextEvt()
Definition: ThreadLocalContext.cpp:23
Message::m_ecThrd
pthread_t m_ecThrd
Definition: Message.h:173
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:8
Message::m_source
std::string m_source
The source.
Definition: Message.h:95
Message::m_type
int m_type
The type.
Definition: Message.h:104

Message::Message | ( | std::string | src,
|  | int | type,
|  | std::string | msg
| ) |  |

Constructor.

Definition at line 57 of file Message.cpp.

58 : m_message( std::move( msg ) ), m_source( std::move( src ) ), m_type( type )
59 {
60 m_ecSlot = Gaudi::Hive::currentContextId();
61 m_ecEvt = Gaudi::Hive::currentContextEvt();
62 m_ecThrd = pthread_self();
63 }
Message::m_ecSlot
size_t m_ecSlot
Definition: Message.h:171
Message::m_ecEvt
long int m_ecEvt
Definition: Message.h:172
Gaudi::Hive::currentContextId
GAUDI_API ContextIdType currentContextId()
Return the current context id.
Definition: ThreadLocalContext.cpp:22
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
gaudirun.type
type
Definition: gaudirun.py:133
std::move
T move(T...args)
Gaudi::Hive::currentContextEvt
GAUDI_API ContextIdType currentContextEvt()
Definition: ThreadLocalContext.cpp:23
Message::m_ecThrd
pthread_t m_ecThrd
Definition: Message.h:173
Message::m_source
std::string m_source
The source.
Definition: Message.h:95
Message::m_type
int m_type
The type.
Definition: Message.h:104

Message::~Message | ( |  | ) |
| default

Default destructor.

## Member Function Documentation

void Message::decodeFormat | ( | const std::string & | format | ) | const
| private

Decode format.

Definition at line 252 of file Message.cpp.

253 {
254 if ( !format.empty() ) {
255 const char FORMAT_TYPE = format[format.length() - 1];
256 const std::string FORMAT_PARAM = format.substr( 0, format.length() - 1 );
257
258 // Now test the format.
259 std::string level;
260 switch ( FORMAT_TYPE ) {
261 case FILL:
262 if ( FORMAT_PARAM.length() == 1 ) {
263 m_fill = FORMAT_PARAM[0];
264 } else
265 invalidFormat();
266 break;
267
268 case TIME: {
269 sizeField( formattedTime( m_time_format ) );
270 } break;
271
272 case UTIME: {
273 sizeField( formattedTime( m_time_format, true ) );
274 } break;
275
276 case THREAD: {
277 std::ostringstream ost;
278 // ost << "0x" << std::hex << pthread_self();
279 ost << "0x" << std::hex << m_ecThrd;
280 const std::string& thrStr( ost.str() );
281 sizeField( thrStr );
282 } break;
283
284 case SLOT: {
285 if ( m_ecEvt >= 0 ) {
286 std::ostringstream ost;
287 ost << m_ecSlot;
288 const std::string& slotStr( ost.str() );
289 sizeField( slotStr );
290 } else {
291 const std::string& slotStr( "" );
292 sizeField( slotStr );
293 }
294 } break;
295
296 case EVTNUM: {
297 if ( m_ecEvt >= 0 ) {
298 std::ostringstream ost;
299 ost << m_ecEvt;
300 const std::string& slotStr( ost.str() );
301 sizeField( slotStr );
302 } else {
303 const std::string& slotStr( "" );
304 sizeField( slotStr );
305 }
306 } break;
307
308 case MESSAGE:
309 sizeField( m_message );
310 break;
311
312 case SOURCE:
313 sizeField( m_source );
314 break;
315
316 case TYPE:
317 switch ( m_type ) {
318 #define SET( x ) \
319 case x: \
320 level = #x; \
321 break
322 SET( NIL );
323 SET( VERBOSE );
324 SET( DEBUG );
325 SET( INFO );
326 SET( WARNING );
327 SET( ERROR );
328 SET( FATAL );
329 case ALWAYS:
330 level = "SUCCESS";
331 break;
332 default:
333 level = "UNKNOWN";
334 break;
335 #undef SET
336 }
337 sizeField( level );
338 break;
339
340 case FORMAT_PREFIX:
341 m_formatted_msg += FORMAT_PREFIX;
342 break;
343 case JUSTIFY_RIGHT:
344 m_left = false;
345 break;
346 case JUSTIFY_LEFT:
347 m_left = true;
348 break;
349 case WIDTH:
350 setWidth( FORMAT_PARAM );
351 break;
352 default:
353 invalidFormat();
354 break;
355 }
356 } else
357 invalidFormat();
358 }
Message::m_ecSlot
size_t m_ecSlot
Definition: Message.h:171
Message::m_ecEvt
long int m_ecEvt
Definition: Message.h:172
Message::TYPE
static const char TYPE
The character used to indicate that the message type should be printed.
Definition: Message.h:133
Message::m_left
bool m_left
Justification.
Definition: Message.h:116
Message::MESSAGE
static const char MESSAGE
The character used to indicate that the message should be printed.
Definition: Message.h:130
Message::m_fill
char m_fill
The current fill character.
Definition: Message.h:110
Message::JUSTIFY_LEFT
static const char JUSTIFY_LEFT
The character used to indicate start of left text justification.
Definition: Message.h:124
std::string::empty
T empty(T...args)
Message::m_formatted_msg
std::string m_formatted_msg
Formatted message.
Definition: Message.h:107
Message::THREAD
static const char THREAD
Definition: Message.h:169
Message::m_time_format
std::string m_time_format
Time format string.
Definition: Message.h:101
Message::setWidth
void setWidth(const std::string &formatArg) const
Set the width of a stream.
Definition: Message.cpp:388
ReadAndWriteWhiteBoard.DEBUG
DEBUG
Definition: ReadAndWriteWhiteBoard.py:24
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
MSG::VERBOSE
Definition: IMessageSvc.h:16
Message::invalidFormat
void invalidFormat() const
Called when an invalid format string is encountered.
Definition: Message.cpp:367
std::string
STL class.
MSG::FATAL
Definition: IMessageSvc.h:16
std::ostringstream
STL class.
MSG::NIL
Definition: IMessageSvc.h:16
std::ostringstream::str
T str(T...args)
Message::EVTNUM
static const char EVTNUM
Definition: Message.h:168
Message::TIME
static const char TIME
The character used to indicate that the message timestamp should be printed.
Definition: Message.h:136
std::string::length
T length(T...args)
Message::JUSTIFY_RIGHT
static const char JUSTIFY_RIGHT
The character used to indicate start of right text justification.
Definition: Message.h:127
Message::UTIME
static const char UTIME
The character used to indicate that the message timestamp should be printed in UTC time...
Definition: Message.h:140
Message::SLOT
static const char SLOT
For slot and event number from EventContext.
Definition: Message.h:167
Message::m_ecThrd
pthread_t m_ecThrd
Definition: Message.h:173
Message::FILL
static const char FILL
The character used to indicate that the previous character is to be used for padding out fields if th...
Definition: Message.h:148
SET
#define SET(x)
std::hex
T hex(T...args)
MSG::ERROR
Definition: IMessageSvc.h:16
std::string::substr
T substr(T...args)
Message::sizeField
void sizeField(const std::string &text) const
Truncate or pad the output string to the field width as necessary.
Definition: Message.cpp:404
gaudirun.level
level
Definition: gaudirun.py:271
MSG::WARNING
Definition: IMessageSvc.h:16
MSG::INFO
Definition: IMessageSvc.h:16
Message::FORMAT_PREFIX
static const char FORMAT_PREFIX
Formatting string characters.
Definition: Message.h:121
Message::m_source
std::string m_source
The source.
Definition: Message.h:95
Message::WIDTH
static const char WIDTH
The character used to indicate that the previous decimal characters should be taken as the field widt...
Definition: Message.h:153
Message::SOURCE
static const char SOURCE
The character used to indicate that the message source should be printed.
Definition: Message.h:143
MSG::ALWAYS
Definition: IMessageSvc.h:16
Message::m_type
int m_type
The type.
Definition: Message.h:104

const std::string Message::getDefaultFormat | ( |  | ) |
| static

Get the default format string.

Definition at line 162 of file Message.cpp.

162 { return DEFAULT_FORMAT; }
Message::DEFAULT_FORMAT
static constexpr const char * DEFAULT_FORMAT
The default message format.
Definition: Message.h:160

const std::string Message::getDefaultTimeFormat | ( |  | ) |
| static

Get the default time format string.

Definition at line 194 of file Message.cpp.

194 { return DEFAULT_TIME_FORMAT; }
Message::DEFAULT_TIME_FORMAT
static constexpr const char * DEFAULT_TIME_FORMAT
The default time format.
Definition: Message.h:164

const std::string & Message::getFormat | ( |  | ) | const

Get the format string.

Definition at line 154 of file Message.cpp.

154 { return m_format; }
Message::m_format
std::string m_format
The format string.
Definition: Message.h:98

const std::string & Message::getMessage | ( |  | ) | const

Get the message string.

Definition at line 71 of file Message.cpp.

71 { return m_message; }
Message::m_message
std::string m_message
The message.
Definition: Message.h:92

const std::string & Message::getSource | ( |  | ) | const

Get the message source.

Definition at line 103 of file Message.cpp.

103 { return m_source; }
Message::m_source
std::string m_source
The source.
Definition: Message.h:95

const std::string & Message::getTimeFormat | ( |  | ) | const

Get the time format string.

Definition at line 186 of file Message.cpp.

186 { return m_time_format; }
Message::m_time_format
std::string m_time_format
Time format string.
Definition: Message.h:101

int Message::getType | ( |  | ) | const

Get the message type.

Definition at line 87 of file Message.cpp.

87 { return m_type; }
Message::m_type
int m_type
The type.
Definition: Message.h:104

void Message::invalidFormat | ( |  | ) | const
| private

Called when an invalid format string is encountered.

Definition at line 367 of file Message.cpp.

367 { makeFormattedMsg( DEFAULT_FORMAT ); }
Message::makeFormattedMsg
void makeFormattedMsg(const std::string &format) const
Format the message.
Definition: Message.cpp:214
Message::DEFAULT_FORMAT
static constexpr const char * DEFAULT_FORMAT
The default message format.
Definition: Message.h:160

void Message::makeFormattedMsg | ( | const std::string & | format | ) | const
| private

Format the message.

Definition at line 214 of file Message.cpp.

215 {
216 m_formatted_msg.clear();
217 auto i = format.begin();
218 while ( i != format.end() ) {
219
220 // Output format string until format statement found.
221 while ( i != format.end() && *i != FORMAT_PREFIX ) m_formatted_msg += *i++;
222
223 // Test for end of format string.
224 if ( i == format.end() ) break;
225 i++;
226
227 // Find type of formatting.
228 std::string this_format;
229 while ( i != format.end() && *i != FORMAT_PREFIX && *i != MESSAGE && *i != TYPE && *i != SOURCE && *i != FILL &&
230 *i != WIDTH && *i != TIME && *i != UTIME && *i != SLOT && *i != EVTNUM && *i != THREAD &&
231 *i != JUSTIFY_LEFT && *i != JUSTIFY_RIGHT ) {
232 this_format += *i++;
233 }
234
235 // Reached end of string with improper format.
236 if ( i == format.end() ) {
237 invalidFormat();
238 break;
239 }
240
241 this_format += *i++;
242 decodeFormat( this_format );
243 }
244 }
Message::TYPE
static const char TYPE
The character used to indicate that the message type should be printed.
Definition: Message.h:133
Message::MESSAGE
static const char MESSAGE
The character used to indicate that the message should be printed.
Definition: Message.h:130
Message::JUSTIFY_LEFT
static const char JUSTIFY_LEFT
The character used to indicate start of left text justification.
Definition: Message.h:124
Message::m_formatted_msg
std::string m_formatted_msg
Formatted message.
Definition: Message.h:107
Message::THREAD
static const char THREAD
Definition: Message.h:169
Message::decodeFormat
void decodeFormat(const std::string &format) const
Decode format.
Definition: Message.cpp:252
std::string::end
T end(T...args)
Message::invalidFormat
void invalidFormat() const
Called when an invalid format string is encountered.
Definition: Message.cpp:367
std::string
STL class.
Message::EVTNUM
static const char EVTNUM
Definition: Message.h:168
std::string::clear
T clear(T...args)
Message::TIME
static const char TIME
The character used to indicate that the message timestamp should be printed.
Definition: Message.h:136
Message::JUSTIFY_RIGHT
static const char JUSTIFY_RIGHT
The character used to indicate start of right text justification.
Definition: Message.h:127
Message::UTIME
static const char UTIME
The character used to indicate that the message timestamp should be printed in UTC time...
Definition: Message.h:140
Message::SLOT
static const char SLOT
For slot and event number from EventContext.
Definition: Message.h:167
std::string::begin
T begin(T...args)
Message::FILL
static const char FILL
The character used to indicate that the previous character is to be used for padding out fields if th...
Definition: Message.h:148
Message::FORMAT_PREFIX
static const char FORMAT_PREFIX
Formatting string characters.
Definition: Message.h:121
Message::WIDTH
static const char WIDTH
The character used to indicate that the previous decimal characters should be taken as the field widt...
Definition: Message.h:153
Message::SOURCE
static const char SOURCE
The character used to indicate that the message source should be printed.
Definition: Message.h:143

bool Message::operator< | ( | const Message & | test | ) |

Needed to build maps.

Definition at line 132 of file Message.cpp.

133 {
134 return m_type < b.m_type || m_source < b.m_source || m_message < b.m_message;
135 }
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
Message::m_source
std::string m_source
The source.
Definition: Message.h:95
Message::m_type
int m_type
The type.
Definition: Message.h:104

void Message::setFormat | ( | std::string | msg | ) | const

Set the format string.

Definition at line 171 of file Message.cpp.

172 {
173 if ( LIKELY( !format.empty() ) ) {
174 m_format = std::move( format );
175 } else {
176 m_format = DEFAULT_FORMAT;
177 }
178 }
std::string::empty
T empty(T...args)
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
std::move
T move(T...args)
LIKELY
#define LIKELY(x)
Definition: Kernel.h:127
Message::m_format
std::string m_format
The format string.
Definition: Message.h:98
Message::DEFAULT_FORMAT
static constexpr const char * DEFAULT_FORMAT
The default message format.
Definition: Message.h:160

void Message::setMessage | ( | std::string | msg | ) |

Set the message string.

Definition at line 79 of file Message.cpp.

79 { m_message = std::move( msg ); }
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
std::move
T move(T...args)

void Message::setSource | ( | std::string | src | ) |

Set the message source.

Definition at line 111 of file Message.cpp.

111 { m_source = std::move( src ); }
std::move
T move(T...args)
Message::m_source
std::string m_source
The source.
Definition: Message.h:95

void Message::setTimeFormat | ( | std::string | timeFormat | ) | const

Set the time format string.

Definition at line 203 of file Message.cpp.

204 {
205 m_time_format = ( timeFormat.empty() ? DEFAULT_TIME_FORMAT : std::move( timeFormat ) );
206 }
std::string::empty
T empty(T...args)
Message::m_time_format
std::string m_time_format
Time format string.
Definition: Message.h:101
std::move
T move(T...args)
Message::DEFAULT_TIME_FORMAT
static constexpr const char * DEFAULT_TIME_FORMAT
The default time format.
Definition: Message.h:164

void Message::setType | ( | int | msg_type | ) |

Set the message type.

Definition at line 95 of file Message.cpp.

95 { m_type = msg_type; }
Message::m_type
int m_type
The type.
Definition: Message.h:104

void Message::setWidth | ( | const std::string & | formatArg | ) | const
| private

Set the width of a stream.

Definition at line 388 of file Message.cpp.

389 {
390 // Convert string to int, if string contains digits only...
391 if ( all_digits( formatArg ) )
392 m_width = std::stoi( formatArg );
393 else
394 invalidFormat();
395 }
Message::invalidFormat
void invalidFormat() const
Called when an invalid format string is encountered.
Definition: Message.cpp:367
Message::m_width
int m_width
The current field width.
Definition: Message.h:113
std::stoi
T stoi(T...args)

void Message::sizeField | ( | const std::string & | text | ) | const
| private

Truncate or pad the output string to the field width as necessary.

Definition at line 404 of file Message.cpp.

405 {
406 std::string newText;
407 if ( m_width == 0 || m_width == static_cast<int>( text.length() ) ) {
408 newText = text;
409 } else {
410
411 // Truncate the text if it is too long.
412 if ( m_width < static_cast<int>( text.length() ) ) {
413 newText = text.substr( 0, m_width );
414 for ( int i = 0, j = newText.length() - 1; i < 3 && j >= 0; ++i, --j ) newText[j] = '.';
415 }
416
417 // Pad the text.
418 else {
419 newText = std::string( m_width, m_fill );
420 if ( m_left )
421 newText.replace( newText.begin(), newText.begin() + text.length(), text.begin(), text.end() );
422 else
423 newText.replace( newText.end() - text.length(), newText.end(), text.begin(), text.end() );
424 }
425 }
426
427 m_formatted_msg += newText;
428 }
Message::m_left
bool m_left
Justification.
Definition: Message.h:116
Message::m_fill
char m_fill
The current fill character.
Definition: Message.h:110
Message::m_formatted_msg
std::string m_formatted_msg
Formatted message.
Definition: Message.h:107
std::string::end
T end(T...args)
std::string
STL class.
std::string::replace
T replace(T...args)
Message::m_width
int m_width
The current field width.
Definition: Message.h:113
std::string::length
T length(T...args)
std::string::begin
T begin(T...args)
std::string::substr
T substr(T...args)

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | stream,
|  | const Message & | msg
| ) |  |
| friend

Insert the message into a stream.

Definition at line 119 of file Message.cpp.

120 {
121 msg.makeFormattedMsg( msg.m_format );
122 stream << msg.m_formatted_msg;
123 return stream;
124 }
Message::m_formatted_msg
std::string m_formatted_msg
Formatted message.
Definition: Message.h:107
Message::m_format
std::string m_format
The format string.
Definition: Message.h:98
Message::makeFormattedMsg
void makeFormattedMsg(const std::string &format) const
Format the message.
Definition: Message.cpp:214

bool operator== | ( | const Message & | a,
|  | const Message & | b
| ) |  |
| friend

Insert the message into a stream.

Definition at line 143 of file Message.cpp.

144 {
145 return a.m_source == b.m_source && a.m_type == b.m_type && a.m_message == b.m_message;
146 }
Message::m_message
std::string m_message
The message.
Definition: Message.h:92
Message::m_source
std::string m_source
The source.
Definition: Message.h:95
Message::m_type
int m_type
The type.
Definition: Message.h:104

## Member Data Documentation

constexpr const char* Message::DEFAULT_FORMAT = "% F%18W%S%7W%R%T %0W%M"
| static private

The default message format.

Definition at line 160 of file Message.h.

constexpr const char* Message::DEFAULT_TIME_FORMAT = "%Y-%m-%d %H:%M:%S,%f"
| static private

The default time format.

Definition at line 164 of file Message.h.

const char Message::EVTNUM = 'e'
| static private

Definition at line 168 of file Message.h.

const char Message::FILL = 'F'
| static private

The character used to indicate that the previous character is to be used for padding out fields if the text is not long enough.

Definition at line 148 of file Message.h.

const char Message::FORMAT_PREFIX = '%'
| static private

Formatting string characters.

The character used to prefix formatting commands.

Definition at line 121 of file Message.h.

const char Message::JUSTIFY_LEFT = 'L'
| static private

The character used to indicate start of left text justification.

Definition at line 124 of file Message.h.

const char Message::JUSTIFY_RIGHT = 'R'
| static private

The character used to indicate start of right text justification.

Definition at line 127 of file Message.h.

long int Message::m_ecEvt
| private

Definition at line 172 of file Message.h.

size_t Message::m_ecSlot
| private

Definition at line 171 of file Message.h.

pthread_t Message::m_ecThrd
| private

Definition at line 173 of file Message.h.

char Message::m_fill = ' '
| mutable private

The current fill character.

Definition at line 110 of file Message.h.

std::string Message::m_format = DEFAULT_FORMAT
| mutable private

The format string.

Definition at line 98 of file Message.h.

std::string Message::m_formatted_msg
| mutable private

Formatted message.

Definition at line 107 of file Message.h.

bool Message::m_left = true
| mutable private

Justification.

Definition at line 116 of file Message.h.

std::string Message::m_message
| private

The message.

Definition at line 92 of file Message.h.

std::string Message::m_source = "UNKNOWN"
| private

The source.

Definition at line 95 of file Message.h.

std::string Message::m_time_format = DEFAULT_TIME_FORMAT
| mutable private

Time format string.

Definition at line 101 of file Message.h.

int Message::m_type = 0
| private

The type.

Definition at line 104 of file Message.h.

int Message::m_width = 0
| mutable private

The current field width.

Definition at line 113 of file Message.h.

const char Message::MESSAGE = 'M'
| static private

The character used to indicate that the message should be printed.

Definition at line 130 of file Message.h.

const char Message::SLOT = 's'
| static private

For slot and event number from EventContext.

Definition at line 167 of file Message.h.

const char Message::SOURCE = 'S'
| static private

The character used to indicate that the message source should be printed.

Definition at line 143 of file Message.h.

const char Message::THREAD = 'X'
| static private

Definition at line 169 of file Message.h.

const char Message::TIME = 't'
| static private

The character used to indicate that the message timestamp should be printed.

Definition at line 136 of file Message.h.

const char Message::TYPE = 'T'
| static private

The character used to indicate that the message type should be printed.

Definition at line 133 of file Message.h.

const char Message::UTIME = 'u'
| static private

The character used to indicate that the message timestamp should be printed in UTC time.

Definition at line 140 of file Message.h.

const char Message::WIDTH = 'W'
| static private

The character used to indicate that the previous decimal characters should be taken as the field width.

Definition at line 153 of file Message.h.

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

- GaudiKernel/GaudiKernel/Message.h
- GaudiKernel/src/Lib/Message.cpp