Project
Loading...
Searching...
No Matches
o2::dcs Namespace Reference

Namespaces

namespace  test
 

Classes

struct  DataPointCompositeObject
 
class  DataPointIdentifier
 
struct  DataPointValue
 
class  DCSConfigConsumer
 
class  DCSConsumer
 
struct  DPIDHash
 
class  RunStatusChecker
 

Typedefs

typedef std::vector< charDCSconfigObject_t
 
using DPID = o2::dcs::DataPointIdentifier
 
using DPVAL = o2::dcs::DataPointValue
 
using DPCOM = o2::dcs::DataPointCompositeObject
 

Enumerations

enum  DeliveryType {
  VOID = 0 , RAW_BINARY = 64 , DPVAL_BINARY = 192 , RAW_INT = 21 ,
  DPVAL_INT = 149 , RAW_UINT = 20 , DPVAL_UINT = 148 , RAW_DOUBLE = 22 ,
  DPVAL_DOUBLE = 150 , RAW_FLOAT = 28 , DPVAL_FLOAT = 156 , RAW_BOOL = 23 ,
  DPVAL_BOOL = 151 , RAW_CHAR = 19 , DPVAL_CHAR = 147 , RAW_STRING = 25 ,
  DPVAL_STRING = 153 , RAW_TIME = 4 , DPVAL_TIME = 132
}
 

Functions

template<typename T >
void addConfigItem (DCSconfigObject_t &configVector, std::string key, const T value)
 
template<>
void addConfigItem (DCSconfigObject_t &configVector, std::string key, const std::string value)
 
template<>
void addConfigItem (DCSconfigObject_t &configVector, std::string key, const char value)
 
template<>
void addConfigItem (DCSconfigObject_t &configVector, std::string key, const char *value)
 
template<>
void addConfigItem (DCSconfigObject_t &configVector, std::string key, const TString value)
 
void printDCSConfig (const DCSconfigObject_t &configVector)
 
std::vector< std::string > expandAlias (const std::string &pattern)
 
std::vector< std::string > expandAliases (const std::vector< std::string > &patternedAliases)
 
uint64_t time_since (const std::chrono::steady_clock::time_point beginning) noexcept
 
uint64_t epoch_time () noexcept
 
uint64_t now () noexcept
 
std::string timestamp () noexcept
 
std::string timestamp (const std::string &format) noexcept
 
std::string fs_timestamp () noexcept
 
template<typename T >
getValue (const DataPointCompositeObject &dpcom)
 
template<typename T >
o2::dcs::DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, T val, uint32_t seconds, uint16_t msec, uint16_t flags=0)
 
template<typename T >
std::vector< DataPointCompositeObjectgenerateRandomDataPoints (const std::vector< std::string > &aliases, T min, T max, std::string refDate="")
 
template<>
DeliveryType read (const std::string &str)
 
template<>
std::string show (const DeliveryType type)
 
bool DPVAL_variant (const DeliveryType type)
 
std::string dim_description (const DeliveryType type)
 
size_t dim_buffer_size (const DeliveryType type)
 
template<typename T >
std::string show (const T input)
 
template<typename T >
read (const std::string &input)
 
std::string random_string (const size_t length) noexcept
 
std::string random_string2 (const size_t length) noexcept
 
uint64_t hash_code (const std::string &input) noexcept
 
std::unique_ptr< std::vector< std::string > > convert_strings (const int argc, char **argv) noexcept
 
void to_upper_case (std::string &str) noexcept
 
void to_lower_case (std::string &str) noexcept
 
std::unique_ptr< std::vector< std::string > > split (const std::string &source, const char separator) noexcept
 
std::unique_ptr< std::vector< std::string > > split_by_whitespace (const std::string &source) noexcept
 
std::string to_hex_big_endian (const char *const start, size_t length) noexcept
 
std::string to_hex_little_endian (const char *const start, size_t length) noexcept
 
void print_k_v_list (const std::string &list_name, const std::list< std::pair< std::string, std::string > > &parameters) noexcept
 
template<typename T , o2::dcs::DeliveryType dt>
getValueImpl (const DataPointCompositeObject &dpcom)
 
template<>
double getValue (const DataPointCompositeObject &dpcom)
 
template<>
float getValue (const DataPointCompositeObject &dpcom)
 
template<>
uint32_t getValue (const DataPointCompositeObject &dpcom)
 
template<>
int32_t getValue (const DataPointCompositeObject &dpcom)
 
template<>
char getValue (const DataPointCompositeObject &dpcom)
 
template<>
bool getValue (const DataPointCompositeObject &dpcom)
 
template<>
std::string getValue (const DataPointCompositeObject &dpcom)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, double val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, float val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, int32_t val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, uint32_t val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, long long val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, char val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, bool val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<>
DataPointCompositeObject createDataPointCompositeObject (const std::string &alias, std::string val, uint32_t seconds, uint16_t msec, uint16_t flags)
 
template<typename T >
std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints (const std::vector< std::string > &aliases, T minValue, T maxValue, std::string refDate)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< double > (const std::vector< std::string > &aliases, double minValue, double maxValue, std::string)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< float > (const std::vector< std::string > &aliases, float minValue, float maxValue, std::string)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< uint32_t > (const std::vector< std::string > &aliases, uint32_t minValue, uint32_t maxValue, std::string)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< int32_t > (const std::vector< std::string > &aliases, int32_t minValue, int32_t maxValue, std::string)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< long long > (const std::vector< std::string > &aliases, long long minValue, long long maxValue, std::string)
 
template std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< char > (const std::vector< std::string > &aliases, char minValue, char maxValue, std::string)
 
template<>
std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< bool > (const std::vector< std::string > &aliases, bool minValue, bool maxValue, std::string refDate)
 
template<>
std::vector< o2::dcs::DataPointCompositeObjectgenerateRandomDataPoints< std::string > (const std::vector< std::string > &aliases, std::string minLength, std::string maxLength, std::string refDate)
 
o2f::InjectorFunction dcs2dpl (std::unordered_map< DPID, std::vector< o2h::DataDescription > > &dpid2group, bool fbiFirst, bool verbose=false, int FBIPerInterval=1)
 

Detailed Description

Typedef Documentation

◆ DCSconfigObject_t

typedef std::vector<char> o2::dcs::DCSconfigObject_t

Definition at line 28 of file DCSConfigObject.h.

◆ DPCOM

Definition at line 48 of file DCStoDPLconverter.h.

◆ DPID

Definition at line 46 of file DCStoDPLconverter.h.

◆ DPVAL

Definition at line 47 of file DCStoDPLconverter.h.

Enumeration Type Documentation

◆ DeliveryType

DeliveryType is a piece of meta-information used for deducing types of DPVAL payloads and DIM service description strings used with services providing data to ADAPOS. DPCOMs use the DeliveryType of DPIDs to infer the correct interpretation of payload data when being put into a std::ofstream. Also, ADAPOS Engine uses DeliveryTypes for DIM service subscription (and Load Generator for generating services).

Every DeliveryType, except VOID, has a raw and DPVAL variant. A DIM service publishing payloads in DPVALs has a different format and binary layout than a DIM service publishing only raw data, so this distinction is critical to ADAPOS Engine.

See also
ADAPRO::ADAPOS::DataPointCompositeObject
ADAPRO::ADAPOS::DataPointIdentifier
ADAPRO::ADAPOS::DataPointValue
Enumerator
VOID 

This DeliveryType is included only for testing and debugging when the payload of a DPVAL is not going to be accessed. Accessing the payload of a DPVAL with this DeliveryType results in a domain error.

RAW_BINARY 

Binary is the general payload data type. This is the raw variant.

DPVAL_BINARY 

Binary is the general payload data type. This is the DPVAL variant.

RAW_INT 

Int stands for a 32-bit signed integer. This is the raw variant. The numerical value of RAW_INT corresponds with the WinCC constant DPEL_INT.

DPVAL_INT 

Int stands for a 32-bit signed integer. This is the DPVAL variant.

RAW_UINT 

Uint stands for a 32-bit unsigned integer. This is the raw variant. The numerical value of RAW_UINT corresponds with the WinCC constant DPEL_UINT.

DPVAL_UINT 

Uint stands for a 32-bit insigned integer. This is the DPVAL variant.

RAW_DOUBLE 

Double stands for IEEE 754 double precision floating point number (64 bit). This is the raw variant. The numerical value of RAW_INT corresponds with the WinCC constant DPEL_FLOAT.

DPVAL_DOUBLE 

Double stands for IEEE 754 double precision floating point number (64 bit). This is the DPVAL variant.

RAW_FLOAT 

Bool stands for a boolean. This is the raw variant. The numerical value of RAW_BOOL corresponds with the WinCC constant DPEL_BOOL.

DPVAL_FLOAT 

Float stands for IEEE 754 single precision floating point number (64 bit). This is the raw variant. The numerical value of RAW_INT corresponds with the WinCC constant DPEL_FLOAT.

RAW_BOOL 

Float stands for IEEE 754 single precision floating point number (64 bit). This is the DPVAL variant.

DPVAL_BOOL 

Bool stands for a boolean. This is the DPVAL variant.

RAW_CHAR 

Char stands for an ASCII character. This is the raw variant. The numerical value of RAW_CHAR corresponds with the WinCC constant DPEL_CHAR.

DPVAL_CHAR 

Char stands for an ASCII character. This is the raw variant.

RAW_STRING 

String stands for a null-terminated array of ASCII characters. This is the raw variant. The numerical value of RAW_STRING corresponds with the WinCC constant DPEL_STRING.

DPVAL_STRING 

String stands for a null-terminated array of ASCII characters. This is the DPVAL variant.

RAW_TIME 

Time stands for two 32-bit (unsigned) integers containing the milliseconds and secodns of a UNIX timestamp. This is the raw variant. The numerical value of RAW_TIME corresponds with the WinCC constant DPEL_DYN_UINT.

DPVAL_TIME 

Time stands for two 32-bit (unsigned) integers containing the milliseconds and secodns of a UNIX timestamp. This is the DPVAL variant.

Definition at line 45 of file DeliveryType.h.

Function Documentation

◆ addConfigItem() [1/5]

template<>
void o2::dcs::addConfigItem ( DCSconfigObject_t configVector,
std::string  key,
const char value 
)
inline

Definition at line 55 of file DCSConfigObject.h.

◆ addConfigItem() [2/5]

template<>
void o2::dcs::addConfigItem ( DCSconfigObject_t configVector,
std::string  key,
const char  value 
)
inline

Definition at line 47 of file DCSConfigObject.h.

◆ addConfigItem() [3/5]

template<>
void o2::dcs::addConfigItem ( DCSconfigObject_t configVector,
std::string  key,
const std::string  value 
)
inline

Definition at line 39 of file DCSConfigObject.h.

◆ addConfigItem() [4/5]

template<typename T >
void o2::dcs::addConfigItem ( DCSconfigObject_t configVector,
std::string  key,
const T  value 
)
inline

Definition at line 31 of file DCSConfigObject.h.

◆ addConfigItem() [5/5]

template<>
void o2::dcs::addConfigItem ( DCSconfigObject_t configVector,
std::string  key,
const TString  value 
)
inline

Definition at line 63 of file DCSConfigObject.h.

◆ convert_strings()

unique_ptr< vector< string > > o2::dcs::convert_strings ( const int  argc,
char **  argv 
)
noexcept

Converts the C-style strings of the command line parameters to a more civilized data type.

Definition at line 237 of file StringUtils.cxx.

◆ createDataPointCompositeObject() [1/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
bool  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 74 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [2/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
char  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 68 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [3/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
double  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 32 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [4/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
float  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 38 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [5/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
int32_t  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 47 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [6/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
long long  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 61 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [7/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
std::string  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 81 of file DataPointCreator.cxx.

◆ createDataPointCompositeObject() [8/9]

template<typename T >
o2::dcs::DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags = 0 
)

createDataPointCompositeObject is a convenience function to simplify the creation of a DataPointCompositeObject.

Parameters
aliasthe DataPoint alias name (max 56 characters)
valthe value of the datapoint
flagsvalue for ADAPOS flags.
millisecondsvalue for milliseconds.
secondsvalue for seconds.
Returns
a DataPointCompositeObject

The actual DeliveryType of the returned DataPointCompositeObject is deduced from the type of val.

Note that only a few relevant specialization are actually provided

  • T=int32_t : DeliveryType = DPVAL_INT
  • T=uint32_t : DeliveryType = DPVAL_UINT
  • T=float : DeliveryType = DPVAL_FLOAT
  • T=double : DeliveryType = DPVAL_DOUBLE
  • T=bool : DeliveryType = DPVAL_BOOL
  • T=char : DeliveryType = DPVAL_CHAR
  • T=std::string : DeliveryType = DPVAL_STRING

◆ createDataPointCompositeObject() [9/9]

template<>
DataPointCompositeObject o2::dcs::createDataPointCompositeObject ( const std::string &  alias,
uint32_t  val,
uint32_t  seconds,
uint16_t  msec,
uint16_t  flags 
)

Definition at line 54 of file DataPointCreator.cxx.

◆ dcs2dpl()

o2f::InjectorFunction o2::dcs::dcs2dpl ( std::unordered_map< DPID, std::vector< o2h::DataDescription > > &  dpid2group,
bool  fbiFirst,
bool  verbose = false,
int  FBIPerInterval = 1 
)

A callback function to retrieve the FairMQChannel name to be used for sending messages of the specified OutputSpec

Definition at line 53 of file DCStoDPLconverter.h.

◆ dim_buffer_size()

size_t o2::dcs::dim_buffer_size ( const DeliveryType  type)
inline

Returns the size of a buffer required to store the binary contents of a DIM service of the given data type.

Parameters
typeThe DeliveryType.
Returns
Size of the payload.
Exceptions
std::domain_errorIf applied to an invalid value.

Definition at line 369 of file DeliveryType.h.

◆ dim_description()

std::string o2::dcs::dim_description ( const DeliveryType  type)
inline

Returns the DIM description string for a DIM service with the given DeliveryType.

Parameters
typeThe DeliveryType.
Returns
The corresponding DIM service description string.
Exceptions
std::domain_errorIf applied to an invalid value.

Definition at line 315 of file DeliveryType.h.

◆ DPVAL_variant()

bool o2::dcs::DPVAL_variant ( const DeliveryType  type)
inline

Returns true if and only if the given DeliveryType is a DPVAL variant.

Parameters
typeThe DeliveryType to be checked.
Returns
The result.
Exceptions
std::domain_errorIf applied to an invalid value.

Definition at line 278 of file DeliveryType.h.

◆ epoch_time()

uint64_t o2::dcs::epoch_time ( )
inlinenoexcept

Returns the measured number of milliseconds passed since UNIX epoch (1 January 1970 01:00:00.000). This function uses system clock.

Returns
Number of milliseconds since epoch.
See also
ADAPRO::Library::now

Definition at line 54 of file Clock.h.

◆ expandAlias()

std::vector< std::string > o2::dcs::expandAlias ( const std::string &  pattern)

expandAlias converts a single pattern into a list of strings.

Parameters
patterna pattern is made of a number of "XX[YY]" blocks (at least one)

where :

  • XX is any text
  • YY describes either a integral range or a textual list

An integral range is [a..b] where the formatting of the biggest of the two integers a and b dictates, by default, the formatting of the output alias. For instance [0..3] is expanded to the set 0,1,2,3 while [00..03] is expanded to 00,01,02,03. If you want more control on the formatting, you can use a python/fmt format {} e.g. [0..15{:d}] would yields 0,1, 2,...,14,15 simply (no 0 filling).

A textual list is simply a list of values separated by commas, e.g. "vMon,iMon"

Returns
a vector of strings containing all the possible expansions of the pattern. That vector is not guaranteed to be sorted.

For example, pattern=DET[A,B]/Channel[000,002]/[iMon,vMon] yields :

  • DETA/Channel000/iMon
  • DETA/Channel001/iMon
  • DETA/Channel002/iMon
  • DETA/Channel000/vMon
  • DETA/Channel001/vMon
  • DETA/Channel002/vMon
  • DETB/Channel000/iMon
  • DETB/Channel001/iMon
  • DETB/Channel002/iMon
  • DETB/Channel000/vMon
  • DETB/Channel001/vMon
  • DETB/Channel002/vMon

Definition at line 94 of file AliasExpander.cxx.

◆ expandAliases()

std::vector< std::string > o2::dcs::expandAliases ( const std::vector< std::string > &  patternedAliases)

expandAliases converts a list of patterns into a list of strings.

each input pattern is treated by expandAlias()

Returns
a sorted vector of strings containing all the possible expansions of the pattern.

Definition at line 134 of file AliasExpander.cxx.

◆ fs_timestamp()

std::string o2::dcs::fs_timestamp ( )
inlinenoexcept

Generates a simple timestamp usable file paths. This function is like ADAPRO::Control::timestamp, but with spaces replaced with underscores and colons with dots in order to ensure compatibility with (Linux) filesystems. This function uses local timezone.

Returns
A simple ISO-8601-esque timestamp (YYYY-MM-DD_HH.MM.SS). Every decimal number in the date string has leading zeros and therefore fixed length.
See also
ADAPRO::Control::timestamp

Definition at line 120 of file Clock.h.

◆ generateRandomDataPoints() [1/2]

template<typename T >
std::vector< DataPointCompositeObject > o2::dcs::generateRandomDataPoints ( const std::vector< std::string > &  aliases,
min,
max,
std::string  refDate = "" 
)

Generate random data points, uniformly distributed between two values.

Template Parameters
Tthe type of value of the data points to be generated. Only a few types are supported : double, float, uint32_t, int32_t, char, bool
Parameters
aliasesthe list of aliases to be generated. Those can use patterns that will be expanded,
See also
AliasExpander
Parameters
minValuethe minimum value of the values to be generated
maxValuethe maximum value of the values to be generated
refDatethe date to be associated with all data points in Y-b-d H:M:S format. If refDate="" the current date is used.
Returns
a vector of DataPointCompositeObject objects

Definition at line 70 of file DataPointGenerator.cxx.

◆ generateRandomDataPoints() [2/2]

template<typename T >
std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints ( const std::vector< std::string > &  aliases,
min,
max,
std::string  refDate = "" 
)

Generate random data points, uniformly distributed between two values.

Template Parameters
Tthe type of value of the data points to be generated. Only a few types are supported : double, float, uint32_t, int32_t, char, bool
Parameters
aliasesthe list of aliases to be generated. Those can use patterns that will be expanded,
See also
AliasExpander
Parameters
minValuethe minimum value of the values to be generated
maxValuethe maximum value of the values to be generated
refDatethe date to be associated with all data points in Y-b-d H:M:S format. If refDate="" the current date is used.
Returns
a vector of DataPointCompositeObject objects

Definition at line 70 of file DataPointGenerator.cxx.

◆ generateRandomDataPoints< bool >()

template<>
std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< bool > ( const std::vector< std::string > &  aliases,
bool  minValue,
bool  maxValue,
std::string  refDate 
)

Need a specific specialization for bool as got into trouble compiling uniform_int_distribution<bool> on some platform (e.g. CC7).

Definition at line 110 of file DataPointGenerator.cxx.

◆ generateRandomDataPoints< char >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< char > ( const std::vector< std::string > &  aliases,
char  minValue,
char  maxValue,
std::string   
)

◆ generateRandomDataPoints< double >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< double > ( const std::vector< std::string > &  aliases,
double  minValue,
double  maxValue,
std::string   
)

◆ generateRandomDataPoints< float >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< float > ( const std::vector< std::string > &  aliases,
float  minValue,
float  maxValue,
std::string   
)

◆ generateRandomDataPoints< int32_t >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< int32_t > ( const std::vector< std::string > &  aliases,
int32_t  minValue,
int32_t  maxValue,
std::string   
)

◆ generateRandomDataPoints< long long >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< long long > ( const std::vector< std::string > &  aliases,
long long  minValue,
long long  maxValue,
std::string   
)

◆ generateRandomDataPoints< std::string >()

template<>
std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< std::string > ( const std::vector< std::string > &  aliases,
std::string  minLength,
std::string  maxLength,
std::string  refDate 
)

Generate data points of type string, where each string is random, with a length between the length of the two input strings (minLength,maxLength)

Definition at line 110 of file DataPointGenerator.cxx.

◆ generateRandomDataPoints< uint32_t >()

template std::vector< o2::dcs::DataPointCompositeObject > o2::dcs::generateRandomDataPoints< uint32_t > ( const std::vector< std::string > &  aliases,
uint32_t  minValue,
uint32_t  maxValue,
std::string   
)

◆ getValue() [1/8]

template<typename T >
T o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Return the value contained in the DataPointCompositeObject, if possible.

Template Parameters
Tthe expected type of the value
Parameters
dpcomthe DataPointCompositeObject the value is extracted from
Returns
the value of the data point
Exceptions
ifthe DeliveryType of the data point is not compatible with T

◆ getValue() [2/8]

template<>
double o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 48 of file DataPointCompositeObject.cxx.

◆ getValue() [3/8]

template<>
float o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 54 of file DataPointCompositeObject.cxx.

◆ getValue() [4/8]

template<>
uint32_t o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 60 of file DataPointCompositeObject.cxx.

◆ getValue() [5/8]

template<>
int32_t o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 66 of file DataPointCompositeObject.cxx.

◆ getValue() [6/8]

template<>
char o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 72 of file DataPointCompositeObject.cxx.

◆ getValue() [7/8]

template<>
bool o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 78 of file DataPointCompositeObject.cxx.

◆ getValue() [8/8]

template<>
std::string o2::dcs::getValue ( const DataPointCompositeObject dpcom)

Definition at line 84 of file DataPointCompositeObject.cxx.

◆ getValueImpl()

template<typename T , o2::dcs::DeliveryType dt>
T o2::dcs::getValueImpl ( const DataPointCompositeObject dpcom)

Definition at line 22 of file DataPointCompositeObject.cxx.

◆ hash_code()

uint64_t o2::dcs::hash_code ( const std::string &  input)
noexcept

Calculates a hash code for the given string. Up to 52 first characters of the string contribute to the hash code. The hash code is case insensitive, so for example "abc" and "ABC" will have colliding hash codes.

Parameters
inputA string.
Returns
An unsigned integer.

Definition at line 225 of file StringUtils.cxx.

◆ now()

uint64_t o2::dcs::now ( )
inlinenoexcept

Returns a timestamp using steady clock. This function is suitable for measuring time intervals, but it's not meant to be used for calculating dates.

Returns
See also
ADAPRO::Library::epoch_time

Definition at line 69 of file Clock.h.

◆ print_k_v_list()

void o2::dcs::print_k_v_list ( const std::string &  list_name,
const std::list< std::pair< std::string, std::string > > &  parameters 
)
noexcept

Prints the given list of key-value pairs.

Parameters
loggerThe Logger instance used for output.
list_nameName of the list to be printed as a heading.
parametersThe list to be printed

◆ printDCSConfig()

void o2::dcs::printDCSConfig ( const DCSconfigObject_t configVector)
inline

Definition at line 69 of file DCSConfigObject.h.

◆ random_string()

string o2::dcs::random_string ( const size_t  length)
noexcept

Returns an uniformly distributed string of exactly the given length. The alphabet of the string is ASCII characters between 32 (' ') and 126 ('~'), inclusive.

Parameters
lengthLength for the random string.
Returns
The random string.

Definition at line 205 of file StringUtils.cxx.

◆ random_string2()

string o2::dcs::random_string2 ( const size_t  length)
noexcept

Returns a random string of exactly the given length. The alphabet for the string contains upper case letters, digits and the symbols '_', '/', and '?'. Their distribution is geometric and tries to roughly approximate the symbol frequencies in ALICE DCS DIM service aliases.

Parameters
lengthLength for the random string.
Returns
The random string.

Definition at line 215 of file StringUtils.cxx.

◆ read() [1/2]

template<typename T >
T o2::dcs::read ( const std::string &  input)

This function template is used for parsing strings as ADAPRO enumerated values. The exact implementation depends on the specialization.

Parameters
inputA string to be interpreted as a T value.
Returns
The T value corresponding with the input.
Exceptions
std::domain_errorThe specialized function may throw a domain error if the given string couldn't be converted into a T value.

◆ read() [2/2]

template<>
DeliveryType o2::dcs::read ( const std::string &  str)
inline

Definition at line 177 of file DeliveryType.h.

◆ show() [1/2]

template<>
std::string o2::dcs::show ( const DeliveryType  type)
inline

Definition at line 224 of file DeliveryType.h.

◆ show() [2/2]

template<typename T >
std::string o2::dcs::show ( const T  input)

This function template is used for converting ADAPRO enumerated values into strings in a fashion similar to the function show in the Show type class in Haskell. The exact implementation depends on the specialization.

Parameters
inputA T value to be converted.
Returns
A string representation of the given value.
Exceptions
std::domain_errorThe specialized function may throw a domain error if applied with an invalid input value.

◆ split()

unique_ptr< vector< string > > o2::dcs::split ( const std::string &  source,
const char  separator 
)
noexcept

Splits a string using the given separator.

Parameters
sourceThe string to be splitted.
separatorThe delimiting character.
Returns
A vector containing the substrings.

Definition at line 249 of file StringUtils.cxx.

◆ split_by_whitespace()

unique_ptr< vector< string > > o2::dcs::split_by_whitespace ( const std::string &  source)
noexcept

Splits a string using whitespace as separator. Only the non-whitespace substrings will be returned.

Parameters
sourceThe string to be splitted.
Returns
A vector containing the substrings.

Definition at line 261 of file StringUtils.cxx.

◆ time_since()

uint64_t o2::dcs::time_since ( const std::chrono::steady_clock::time_point  beginning)
inlinenoexcept

Returns a simple timestamp presenting the milliseconds of time passed since the given time point.

Parameters
beginningThe time point used as a reference for the time interval calculation.
Returns
The amount of milliseconds passed since the given time point.

Definition at line 39 of file Clock.h.

◆ timestamp() [1/2]

std::string o2::dcs::timestamp ( )
inlinenoexcept

Returns a timestamp of the current point of time in the local timezone.

Returns
A simple ISO-8601-esque timestamp (YYYY-MM-DD HH:MM:SS). Every decimal number in the date string has leading zeros and therefore fixed length.
See also
ADAPRO::Control::fs_timestamp

Definition at line 84 of file Clock.h.

◆ timestamp() [2/2]

std::string o2::dcs::timestamp ( const std::string &  format)
inlinenoexcept

Returns a timestamp of the current point of time in the local timezone. The format of the timestamp is specified with the parameter format. The format of the format string is the same as is used by std::strftime.

Returns
A simple timestamp in a format specified with the parameter format.

Definition at line 101 of file Clock.h.

◆ to_hex_big_endian()

string o2::dcs::to_hex_big_endian ( const char *const  start,
size_t  length 
)
noexcept

Returns a simple big endian hexadecimal presentation of the given segment of memory.

Parameters
startAddress of a memory segment.
lengthLength of the memory segment.
Returns
A hexadecimal string representation of the segment in bytes.

Definition at line 327 of file StringUtils.cxx.

◆ to_hex_little_endian()

string o2::dcs::to_hex_little_endian ( const char *const  start,
size_t  length 
)
noexcept

Returns a simple little endian hexadecimal presentation of the given segment of memory.

Parameters
startAddress of a memory segment.
lengthLength of the memory segment (in chars).
Returns
A hexadecimal string representation of the segment in bytes.

Definition at line 344 of file StringUtils.cxx.

◆ to_lower_case()

void o2::dcs::to_lower_case ( std::string &  str)
inlinenoexcept

Converts the given string into lower case. This function will change the state of the given string, instead of returning a copy.

Parameters
strThe string to be converted into lower case.

Definition at line 93 of file StringUtils.h.

◆ to_upper_case()

void o2::dcs::to_upper_case ( std::string &  str)
inlinenoexcept

Converts the given string into upper case. This function will change the state of the given string, instead of returning a copy.

Parameters
strThe string to be converted into upper case.

Definition at line 80 of file StringUtils.h.