1 #ifndef ARTDAQ_DAQDATA_GLOBALS_HH
2 #define ARTDAQ_DAQDATA_GLOBALS_HH
5 #include "artdaq-utilities/Plugins/MetricManager.hh"
7 #define my_rank artdaq::Globals::my_rank_
8 #define app_name artdaq::Globals::app_name_
9 #define metricMan artdaq::Globals::metricMan_
10 #define seedAndRandom() artdaq::Globals::seedAndRandom_()
12 #define mftrace_iteration artdaq::Globals::mftrace_iteration_
13 #define mftrace_module artdaq::Globals::mftrace_module_
14 #define SetMFModuleName(name) mftrace_module = name
15 #define SetMFIteration(name) mftrace_iteration = name
39 static std::string mftrace_module_;
40 static std::string mftrace_iteration_;
48 static bool initialized_ =
false;
50 int fp = open(
"/dev/random", O_RDONLY);
51 if (fp == -1) abort();
54 while (pos <
sizeof(seed))
56 int amt = read(fp, (
char *)&seed + pos,
sizeof(seed) - pos);
57 if (amt <= 0) abort();
69 #include "artdaq-core/Utilities/configureMessageFacility.hh"
71 #include "artdaq-core/Utilities/TimeUtils.hh"
72 #endif // ARTDAQ_DAQDATA_GLOBALS_HH
static uint32_t seedAndRandom_()
Seed the C random number generator with the current time (if that has not been done already) and gene...
static int my_rank_
The rank of the current application.
static std::string app_name_
The name of the current application, to be used in logging and metrics.
static MetricManager * metricMan_
A handle to MetricManager.
The artdaq::Globals class contains several variables which are useful across the entire artdaq system...