artdaq  v3_04_00
artdaq::Globals Class Reference

The artdaq::Globals class contains several variables which are useful across the entire artdaq system. More...

#include <artdaq/DAQdata/Globals.hh>

Static Public Member Functions

static uint32_t seedAndRandom_ ()
 Seed the C random number generator with the current time (if that has not been done already) and generate a random value. More...
 
static int getPartitionNumber_ ()
 Get the current partition number, as defined by the ARTDAQ_PARTITION_NUMBER environment variable. More...
 
static std::string GetMFIteration_ ()
 
static std::string GetMFModuleName_ ()
 
static void SetMFIteration_ (std::string name)
 
static void SetMFModuleName_ (std::string name)
 
static void CleanUpGlobals ()
 

Static Public Attributes

static int my_rank_ = -1
 The rank of the current application.
 
static std::unique_ptr
< MetricManager
metricMan_ = std::make_unique<artdaq::MetricManager>()
 A handle to MetricManager.
 
static std::unique_ptr
< PortManager
portMan_ = std::make_unique<artdaq::PortManager>()
 A handle to PortManager.
 
static std::string app_name_ = ""
 The name of the current application, to be used in logging and metrics.
 
static int partition_number_ = -1
 The partition number of the current application.
 
static std::mutex mftrace_mutex_
 
static std::string mftrace_module_ = "DAQ"
 MessageFacility's module and iteration are thread-local, but we want to use them to represent global state in artdaq.
 
static std::string mftrace_iteration_ = "Booted"
 MessageFacility's module and iteration are thread-local, but we want to use them to represent global state in artdaq.
 

Detailed Description

The artdaq::Globals class contains several variables which are useful across the entire artdaq system.

Definition at line 34 of file Globals.hh.

Member Function Documentation

static int artdaq::Globals::getPartitionNumber_ ( )
inlinestatic

Get the current partition number, as defined by the ARTDAQ_PARTITION_NUMBER environment variable.

Returns
The current partition number (defaults to 0 if unset, will be between 0 and 127)

Definition at line 77 of file Globals.hh.

static uint32_t artdaq::Globals::seedAndRandom_ ( )
inlinestatic

Seed the C random number generator with the current time (if that has not been done already) and generate a random value.

Returns
A random number.

Definition at line 51 of file Globals.hh.


The documentation for this class was generated from the following files: