$treeview $search $mathjax $extrastylesheet
artdaq  v3_04_01
$projectbrief
$projectbrief
$searchbox

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>

List of all members.

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.
static int getPartitionNumber_ ()
 Get the current partition number, as defined by the ARTDAQ_PARTITION_NUMBER environment variable.
static std::string GetMFIteration_ ()
 Get the current iteration for MessageFacility messages.
static std::string GetMFModuleName_ ()
 Get the current module name for MessageFacility messages.
static void SetMFIteration_ (std::string name)
 Set the current iteration for MessageFacility messages.
static void SetMFModuleName_ (std::string name)
 Set the current module name for MessageFacility messages.
static void CleanUpGlobals ()
 Clean up statically-allocated Manager class instances.

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_
 Mutex to protect mftrace_module_ and mftrace_iteration_.
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 std::string artdaq::Globals::GetMFIteration_ (  )  [inline, static]

Get the current iteration for MessageFacility messages.

Returns:
The current iteration

Definition at line 111 of file Globals.hh.

static std::string artdaq::Globals::GetMFModuleName_ (  )  [inline, static]

Get the current module name for MessageFacility messages.

Returns:
The current module name

Definition at line 121 of file Globals.hh.

static int artdaq::Globals::getPartitionNumber_ (  )  [inline, static]

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_ (  )  [inline, static]

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.

static void artdaq::Globals::SetMFIteration_ ( std::string  name  )  [inline, static]

Set the current iteration for MessageFacility messages.

Parameters:
name The current iteration

Definition at line 131 of file Globals.hh.

static void artdaq::Globals::SetMFModuleName_ ( std::string  name  )  [inline, static]

Set the current module name for MessageFacility messages.

Parameters:
name The current module name

Definition at line 141 of file Globals.hh.


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

Generated on 28 Mar 2019 for artdaq by  doxygen 1.6.1