TRACE NAME definition¶
TRACE_NAME can be defined before or after the trace.h include file (or whichever wrapper file is used).
However, we recommend defining TRACE_NAME after as this seems to be more robust, especially when the definition
includes a global variable. For example, several of our source files do this:
#include "artdaq/DAQdata/Globals.hh" #define TRACE_NAME (app_name + "_MulticastTransfer").c_str()
The Globals.hh file has standard order of (nested) includes at the top and the declaration
of app_name following. If any of the nested includes contains code that has a TLOG or TRACE
in it, then app_name would need to be declared, IFF the macro definition were before the
include above. Since it would not be declared, a compilation error would occur.