DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | List of all members
dd4hep::rec::MapStringVariantStruct Struct Reference

#include <DetectorData.h>

Public Member Functions

template<typename T >
const T & get (const std::string &key) const
 
template<typename T >
T & get (const std::string &key)
 
template<typename T >
value_or (const std::string &key, T alternative) const
 
template<typename T >
void set (const std::string &key, T value)
 
bool contains (const std::string &key) const
 

Public Attributes

std::map< std::string, boost::variant< double, int, std::string, bool > > variantParameters {}
 

Detailed Description

Data structure that holds a map of string keys to a typesafe union of double, int, string or bool. It can be used as an extension object for detector elements to attach arbitrary information

Author
P.Gessinger, CERN
Date
May, 25 2022

Definition at line 513 of file DetectorData.h.

Member Function Documentation

◆ contains()

bool dd4hep::rec::MapStringVariantStruct::contains ( const std::string &  key) const
inline

Definition at line 548 of file DetectorData.h.

◆ get() [1/2]

template<typename T >
T& dd4hep::rec::MapStringVariantStruct::get ( const std::string &  key)
inline

Definition at line 526 of file DetectorData.h.

◆ get() [2/2]

template<typename T >
const T& dd4hep::rec::MapStringVariantStruct::get ( const std::string &  key) const
inline

Definition at line 517 of file DetectorData.h.

◆ set()

template<typename T >
void dd4hep::rec::MapStringVariantStruct::set ( const std::string &  key,
value 
)
inline

Definition at line 544 of file DetectorData.h.

◆ value_or()

template<typename T >
T dd4hep::rec::MapStringVariantStruct::value_or ( const std::string &  key,
alternative 
) const
inline

Definition at line 535 of file DetectorData.h.

Member Data Documentation

◆ variantParameters

std::map<std::string, boost::variant<double, int, std::string, bool> > dd4hep::rec::MapStringVariantStruct::variantParameters {}

Definition at line 514 of file DetectorData.h.


The documentation for this struct was generated from the following file: