ATLAS Offline Software
PrintMsg.h
Go to the documentation of this file.
1 #ifndef ROOT_CORE_UTILS__PRINT_MSG_H
2 #define ROOT_CORE_UTILS__PRINT_MSG_H
3 
4 // - 2012.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 
9 // Please feel free to contact me (krumnack@iastate.edu) for bug
10 // reports, feature suggestions, praise and complaints.
11 
12 
16 
17 
18 
19 #include <RootCoreUtils/Global.h>
20 
21 #include <string>
23 
24 class TString;
25 
26 namespace RCU
27 {
28  void send_message (const char *package, const char *file, unsigned line,
29  MessageType type, const char *msg);
30  void send_message (const char *package, const char *file, unsigned line,
31  MessageType type, const std::string& msg);
32  void send_message (const char *package, const char *file, unsigned line,
33  MessageType type, const TString& msg);
34  [[noreturn]] void
35  send_message_abort (const char *package, const char *file, unsigned line,
36  MessageType type, const char *msg);
37  [[noreturn]] void
38  send_message_abort (const char *package, const char *file, unsigned line,
39  MessageType type, const std::string& msg);
40  [[noreturn]] void
41  send_message_abort (const char *package, const char *file, unsigned line,
42  MessageType type, const TString& msg);
43 }
44 
45 #ifndef ROOTCORE_PACKAGE
46 #define ROOTCORE_PACKAGE 0
47 #endif
48 
49 #define RCU_PRINT_MSG(message) \
50  ::RCU::send_message (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::MESSAGE_REGULAR, (message));
51 
52 #define RCU_WARN_MSG(message) \
53  ::RCU::send_message (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::MESSAGE_WARNING, (message));
54 
55 #define RCU_ERROR_MSG(message) \
56  ::RCU::send_message (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::MESSAGE_ERROR, (message));
57 
58 #define RCU_THROW_MSG(message) \
59  ::RCU::send_message_abort (ROOTCORE_PACKAGE, __FILE__, __LINE__, ::RCU::MESSAGE_EXCEPTION, (message));
60 
61 #endif
checkFileSG.line
line
Definition: checkFileSG.py:75
Global.h
RCU
This module defines a variety of assert style macros.
Definition: Assert.cxx:26
RCU::send_message_abort
void send_message_abort(const char *package, const char *file, unsigned line, MessageType type, const char *msg)
Definition: PrintMsg.cxx:57
file
TFile * file
Definition: tile_monitor.h:29
RCU::send_message
void send_message(const char *package, const char *file, unsigned line, MessageType type, const char *msg)
Definition: PrintMsg.cxx:27
RCU::MessageType
MessageType
Definition: MessageType.h:24
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
MessageType.h