DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
macro.hpp File Reference
Include dependency graph for macro.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TRACE_LOG_FUNCTION   erstrace_user
#define TLOG(...)
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message_, base_attributes, attributes)
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message_, attributes)

Macro Definition Documentation

◆ ERS_DECLARE_ISSUE

#define ERS_DECLARE_ISSUE ( namespace_name,
class_name,
message_,
attributes )
Value:
__ERS_DECLARE_ISSUE_BASE__(namespace_name, class_name, ers::Issue, ERS_EMPTY message_, ERS_EMPTY, attributes) \
__ERS_DEFINE_ISSUE_BASE__(inline, namespace_name, class_name, ers::Issue, ERS_EMPTY message_, ERS_EMPTY, attributes) \
namespace namespace_name { \
static inline TraceStreamer& operator<<(TraceStreamer& x, const class_name& r) \
{ \
if (x.do_m) { \
x.line_ = r.context().line_number(); \
x.msg_append(r.message().c_str()); \
\
} \
if (x.do_s) { \
if (x.lvl_ == TLVL_INFO) \
ers::info(r); \
else if (x.lvl_ == TLVL_LOG) \
ers::log(r); \
else \
ers::debug(r, x.lvl_ - TLVL_DEBUG); \
x.do_s = 0; \
} \
return x; \
} \
}
#define __ERS_DECLARE_ISSUE_BASE__(namespace_name, class_name, base_class_name, message, base_attributes, attributes)
#define ERS_EMPTY
void operator<<(TraceStreamer &x, const ers::Issue &r)
Definition Logger.hxx:128
Base class for any user define issue.
Definition Issue.hpp:76

Definition at line 71 of file macro.hpp.

◆ ERS_DECLARE_ISSUE_BASE

#define ERS_DECLARE_ISSUE_BASE ( namespace_name,
class_name,
base_class_name,
message_,
base_attributes,
attributes )
Value:
__ERS_DECLARE_ISSUE_BASE__(namespace_name, class_name, base_class_name, message_, base_attributes, attributes) \
__ERS_DEFINE_ISSUE_BASE__( \
inline, namespace_name, class_name, base_class_name, message_, base_attributes, attributes) \
namespace namespace_name { \
static inline TraceStreamer& operator<<(TraceStreamer& x, const class_name& r) \
{ \
if (x.do_m) { \
x.line_ = r.context().line_number(); \
x.msg_append(r.message().c_str()); \
\
} \
if (x.do_s) { \
if (x.lvl_ == TLVL_INFO) \
ers::info(r); \
else if (x.lvl_ == TLVL_LOG) \
ers::log(r); \
else \
ers::debug(r, x.lvl_ - TLVL_DEBUG); \
x.do_s = 0; \
} \
return x; \
} \
}

Definition at line 45 of file macro.hpp.

◆ TLOG

#define TLOG ( ...)
Value:
TRACE_STREAMER(TLVL_LOG, \
_tlog_ARG2(not_used, CHOOSE_(__VA_ARGS__)(__VA_ARGS__) 0, need_at_least_one), \
_tlog_ARG3(not_used, CHOOSE_(__VA_ARGS__)(__VA_ARGS__) 0, "", need_at_least_one), \
1, \
1)
#define _tlog_ARG2(a1, a2,...)
Definition Logger.hxx:321
#define _tlog_ARG3(a1, a2, a3,...)
Definition Logger.hxx:322
#define CHOOSE_(...)
Definition Logger.hxx:317

6 logging "streams" are defined: fatal, error, warning, info, log and debug. The first 4 are accessed via the ers:: methods with a TRACE destination added. THe last 2 are accessed via TRACE macros with an ers:: user method configured.

Definition at line 21 of file macro.hpp.

◆ TRACE_LOG_FUNCTION

#define TRACE_LOG_FUNCTION   erstrace_user

Definition at line 8 of file macro.hpp.