#include <DDValue.h>
Classes | |
struct | AtomicUInt |
struct | StringHolder |
Only used internally. More... | |
Public Member Functions | |
DDValue (void) | |
create a unnamed emtpy value. One can assing a named DDValue to it. More... | |
DDValue (const std::string &) | |
create a named empty value More... | |
DDValue (const char *) | |
create a named empty value More... | |
DDValue (const std::string &, const std::vector< DDValuePair > &) | |
creates a named DDValue initialized with a std::vector of values More... | |
DDValue (const std::string &, double) | |
creates a single double valued named DDValue. The corresponding std::string-value is an empty std::string More... | |
DDValue (const std::string &, const std::string &, double) | |
DDValue (const std::string &name, const std::string &val) | |
DDValue (unsigned int) | |
const std::vector< double > & | doubles () const |
a reference to the double-valued values stored in the given instance of DDValue More... | |
unsigned int | id (void) const |
returns the ID of the DDValue More... | |
bool | isEvaluated (void) const |
true, if values are numerical evaluated; else false. More... | |
const std::string & | name (void) const |
the name of the DDValue More... | |
operator unsigned int (void) const | |
converts a DDValue object into its ID More... | |
bool | operator< (const DDValue &) const |
A DDValue a is smaller than a DDValue b if (a.id()<b.id()) OR (a.id()==b.id() and value(a)<value(b)) More... | |
bool | operator== (const DDValue &v) const |
Two DDValues are equal only if their id() is equal AND their values are equal. More... | |
DDValuePair | operator[] (unsigned int i) const |
void | setEvalState (bool newState) |
set to true, if the double-values (method DDValue::doubles()) make sense More... | |
unsigned int | size () const |
the size of the stored value-pairs (std::string,double) More... | |
const std::vector< std::string > & | strings () const |
a reference to the std::string-valued values stored in the given instance of DDValue More... | |
Private Types | |
using | Names = tbb::concurrent_vector< StringHolder, tbb::zero_allocator< StringHolder >> |
using | NamesToIndicies = tbb::concurrent_unordered_map< std::string, AtomicUInt > |
using | vecpair_type = std::pair< bool, std::pair< std::vector< std::string >, std::vector< double >>> |
Private Member Functions | |
void | init (const std::string &) |
Static Private Member Functions | |
static NamesToIndicies & | indexer () |
static Names | initializeNames () |
static Names & | names () |
Private Attributes | |
unsigned int | id_ |
std::shared_ptr< vecpair_type > | vecPair_ |
A DDValue std::maps a std::vector of DDValuePair (std::string,double) to a name. Names of DDValues are stored transiently. Furthermore, an ID is assigned std::mapping to the name. Use DDValue::setEvalState(true) to indicate whether the double numbers stored in the DDValuePair make sense, otherwise an exception will be thrown when trying to get access to these values via DDValue::doubles() or DDValue::operator[].
|
private |
|
private |
|
private |
|
inline |
create a unnamed emtpy value. One can assing a named DDValue to it.
Definition at line 25 of file DDValue.h.
References name(), AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.
|
explicit |
|
explicit |
|
explicit |
creates a named DDValue initialized with a std::vector of values
Definition at line 58 of file DDValue.cc.
References init(), and vecPair_.
|
explicit |
creates a single double valued named DDValue. The corresponding std::string-value is an empty std::string
Definition at line 74 of file DDValue.cc.
References init(), setEvalState(), and vecPair_.
|
explicit |
creates a single std::string & numerical-valued named DDValue.
Definition at line 86 of file DDValue.cc.
References init(), setEvalState(), and vecPair_.
|
explicit |
creates a single std::string-valued named DDValue
Definition at line 97 of file DDValue.cc.
References init(), setEvalState(), and vecPair_.
|
explicit |
const std::vector< double > & DDValue::doubles | ( | void | ) | const |
a reference to the double-valued values stored in the given instance of DDValue
Definition at line 140 of file DDValue.cc.
References Exception, name(), AlCaHLTBitMon_QueryRunRegistry::string, and vecPair_.
Referenced by DDMapper< KeyType, ValueType >::all(), ME0GeometryParsFromDD::buildEtaPartition(), GEMGeometryParsFromDD::buildEtaPartition(), ME0GeometryBuilderFromDDD::buildEtaPartition(), GEMGeometryBuilderFromDDD::buildEtaPartition(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), FastTimeParametersFromDD::getDDDArray(), HGCalParametersFromDD::getDDDArray(), HFShowerFibreBundle::getDDDArray(), HFShowerPMT::getDDDArray(), HFFibre::getDDDArray(), MtdSD::getDDDArray(), MaterialBudgetHcalHistos::getDDDArray(), FastTimerSD::getDDDArray(), HFShower::getDDDArray(), HFShowerParam::getDDDArray(), ECalSD::getDDDArray(), HFShowerLibrary::getDDDArray(), HGCalGeomParameters::getDDDArray(), HCalSD::getDDDArray(), HGCalParametersFromDD::getDDDValue(), MuonDDDNumbering::getInt(), DDG4Builder::getInt(), CaloTrkProcessing::getNumbers(), strings(), and DDMapper< KeyType, ValueType >::toDouble().
|
inline |
returns the ID of the DDValue
Definition at line 48 of file DDValue.h.
References id_.
Referenced by DDI::LogicalPart::hasDDValue(), operator<(), and operator==().
|
staticprivate |
Definition at line 117 of file DDValue.cc.
Referenced by init().
|
private |
Definition at line 15 of file DDValue.cc.
References id_, indexer(), lastIndex, name(), names(), mps_merge::newName, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by DDValue().
|
staticprivate |
Definition at line 123 of file DDValue.cc.
References names(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by names().
bool DDValue::isEvaluated | ( | void | ) | const |
true, if values are numerical evaluated; else false.
in case of a 'true' return value, the method DDValue::doubles() and the operator DDValue::operator[] can be used
Definition at line 204 of file DDValue.cc.
References vecPair_.
Referenced by operator<<(), size(), DDCoreToDDXMLOutput::specpar(), and DDI::Specific::stream().
|
inline |
the name of the DDValue
Definition at line 54 of file DDValue.h.
References mps_fire::i, id_, names(), and operator[]().
Referenced by config.CFG::__str__(), DDValue(), validation.Sample::digest(), doubles(), init(), VIDSelectorBase.VIDSelectorBase::initialize(), operator<<(), operator[](), DDCoreToDDXMLOutput::specpar(), DDI::Specific::stream(), and Vispa.Views.PropertyView.Property::valueChanged().
|
staticprivate |
Definition at line 133 of file DDValue.cc.
References initializeNames().
Referenced by init(), initializeNames(), and name().
|
inline |
bool DDValue::operator< | ( | const DDValue & | v | ) | const |
bool DDValue::operator== | ( | const DDValue & | v | ) | const |
Two DDValues are equal only if their id() is equal AND their values are equal.
If the DDValue::isEvalued() == true, the numerical representation is taken for comparison, else the std::string representation
Definition at line 210 of file DDValue.cc.
References id(), mps_fire::result, and vecPair_.
Referenced by size().
DDValuePair DDValue::operator[] | ( | unsigned int | i | ) | const |
access to the values stored in DDValue by an index. Note, that the index is not checked for bounds excess!
Definition at line 183 of file DDValue.cc.
References Exception, name(), AlCaHLTBitMon_QueryRunRegistry::string, and vecPair_.
Referenced by name().
void DDValue::setEvalState | ( | bool | newState | ) |
set to true, if the double-values (method DDValue::doubles()) make sense
Definition at line 198 of file DDValue.cc.
References vecPair_.
Referenced by DDValue(), DDLSpecPar::processElement(), and size().
|
inline |
the size of the stored value-pairs (std::string,double)
Definition at line 68 of file DDValue.h.
References isEvaluated(), operator<(), operator==(), setEvalState(), findQualityFiles::v, and vecPair_.
Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), DDMapper< KeyType, ValueType >::noSpecifics(), operator<<(), DDCoreToDDXMLOutput::specpar(), DDI::Specific::stream(), DDMapper< KeyType, ValueType >::toDouble(), and DDMapper< KeyType, ValueType >::toString().
|
inline |
a reference to the std::string-valued values stored in the given instance of DDValue
Definition at line 61 of file DDValue.h.
References doubles(), and vecPair_.
Referenced by DDMapper< KeyType, ValueType >::all(), DTGeometryParsFromDD::buildGeometry(), DTGeometryBuilderFromDDD::buildGeometry(), dddGetStringRaw(), DDG4Builder::getDouble(), CaloTrkProcessing::getNames(), DDG4SensitiveConverter::getString(), ECalSD::getStringArray(), operator<<(), DDCoreToDDXMLOutput::specpar(), DDI::Specific::stream(), and DDMapper< KeyType, ValueType >::toString().
|
private |
|
private |
Definition at line 124 of file DDValue.h.
Referenced by DDValue(), doubles(), isEvaluated(), operator<(), operator==(), operator[](), setEvalState(), size(), and strings().