ATLAS Offline Software
Loading...
Searching...
No Matches
PrintMsg.cxx
Go to the documentation of this file.
1//
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at
4// http://www.boost.org/LICENSE_1_0.txt)
5
6// Please feel free to contact me (krumnack@iastate.edu) for bug
7// reports, feature suggestions, praise and complaints.
8
9
10//
11// includes
12//
13
15
16#include <TString.h>
19#include <cstdlib>
20
21//
22// method implementations
23//
24
25namespace RCU
26{
27 void send_message (const char *package, const char *file, unsigned line,
28 MessageType type, const char *msg)
29 {
30 Message message;
31 message.package = package;
32 message.file = file;
33 message.line = line;
34 message.type = type;
35 message.message = msg;
36 message.send ();
37 }
38
39
40
41 void send_message (const char *package, const char *file, unsigned line,
42 MessageType type, const std::string& msg)
43 {
44 send_message (package, file, line, type, msg.c_str());
45 }
46
47
48
49 void send_message (const char *package, const char *file, unsigned line,
50 MessageType type, const TString& msg)
51 {
52 send_message (package, file, line, type, msg.Data());
53 }
54
55
56
57 void send_message_abort (const char *package, const char *file, unsigned line,
58 MessageType type, const char *msg)
59 {
60 Message message;
61 message.package = package;
62 message.file = file;
63 message.line = line;
64 message.type = type;
65 message.message = msg;
66 message.send ();
67 RCU_ASSERT0 ("shouldn't get here");
68 std::abort ();
69 }
70
71
72
73 void send_message_abort (const char *package, const char *file, unsigned line,
74 MessageType type, const std::string& msg)
75 {
76 send_message_abort (package, file, line, type, msg.c_str());
77 }
78
79
80
81 void send_message_abort (const char *package, const char *file, unsigned line,
82 MessageType type, const TString& msg)
83 {
84 send_message_abort (package, file, line, type, msg.Data());
85 }
86}
#define RCU_ASSERT0(y)
Definition Assert.h:226
This module defines a variety of assert style macros.
Definition Assert.cxx:26
void send_message(const char *package, const char *file, unsigned line, MessageType type, const char *msg)
Definition PrintMsg.cxx:27
void send_message_abort(const char *package, const char *file, unsigned line, MessageType type, const char *msg)
Definition PrintMsg.cxx:57
MessageType
Definition MessageType.h:24
MsgStream & msg
Definition testRead.cxx:32
TFile * file