#include <DDValue.h>
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... | |
void | init (const std::string &) |
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... | |
~DDValue (void) | |
Static Public Member Functions | |
static void | clear (void) |
Public Attributes | |
vecpair_type * | vecPair_ |
Private Types | |
typedef std::pair< bool, std::pair< std::vector < std::string >, std::vector < double > > > | vecpair_type |
Static Private Member Functions | |
static std::map< std::string, unsigned int > & | indexer () |
static std::vector < boost::shared_ptr < vecpair_type > > & | mem (vecpair_type *) |
static std::vector< std::string > & | names () |
Private Attributes | |
unsigned int | id_ |
Friends | |
class | DDLSpecPar |
class | DDSpecifics |
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. If a particular DDValue is not used anymore, use DDValue::clear() to free the internally allocated memory. 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 |
|
inline |
DDValue::DDValue | ( | const std::string & | name | ) |
DDValue::DDValue | ( | const char * | name | ) |
|
explicit |
creates a named DDValue initialized with a std::vector of values
Definition at line 38 of file DDValue.cc.
References init(), mem(), and vecPair_.
|
explicit |
creates a single double valued named DDValue. The corresponding std::string-value is an empty std::string
Definition at line 56 of file DDValue.cc.
References init(), mem(), setEvalState(), and vecPair_.
|
explicit |
creates a single std::string & numerical-valued named DDValue.
Definition at line 69 of file DDValue.cc.
References init(), mem(), setEvalState(), and vecPair_.
|
explicit |
creates a single std::string-valued named DDValue
Definition at line 81 of file DDValue.cc.
References init(), mem(), setEvalState(), and vecPair_.
|
explicit |
Definition at line 93 of file DDValue.cc.
References i, id_, names(), and size().
DDValue::~DDValue | ( | void | ) |
Definition at line 101 of file DDValue.cc.
|
static |
Definition at line 105 of file DDValue.cc.
References mem(), and findQualityFiles::v.
Referenced by Vispa.Views.WidgetView.WidgetView::closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView::closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm::findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView::setDataObjects(), Vispa.Views.WidgetView.WidgetView::setDataObjects(), BeautifulSoup.Tag::setString(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), and Vispa.Views.PropertyView.PropertyView::updateContent().
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 134 of file DDValue.cc.
References edm::hlt::Exception, id_, python.rootplot.argparse::message, names(), AlCaHLTBitMon_QueryRunRegistry::string, and vecPair_.
Referenced by DDMapper< KeyType, ValueType >::all(), GEMGeometryParsFromDD::buildGeometry(), GEMGeometryBuilderFromDDD::buildGeometry(), RPCGeometryBuilderFromDDD::buildGeometry(), RPCGeometryParsFromDD::buildGeometry(), HFShowerPMT::getDDDArray(), HFShowerFibreBundle::getDDDArray(), HFFibre::getDDDArray(), MaterialBudgetHcalHistos::getDDDArray(), ECalSD::getDDDArray(), HFShower::getDDDArray(), HFShowerParam::getDDDArray(), HCalSD::getDDDArray(), HcalNumberingFromDDD::getDDDArray(), HFShowerLibrary::getDDDArray(), MuonDDDNumbering::getInt(), DDG4Builder::getInt(), CaloTrkProcessing::getNumbers(), CocoaAnalyzer::myFetchDbl(), and DDMapper< KeyType, ValueType >::toDouble().
|
inline |
returns the ID of the DDValue
Definition at line 58 of file DDValue.h.
References id_.
Referenced by DDI::LogicalPart::hasDDValue(), operator<(), and operator==().
|
staticprivate |
Definition at line 112 of file DDValue.cc.
Referenced by init().
void DDValue::init | ( | const std::string & | name | ) |
Definition at line 7 of file DDValue.cc.
References id_, indexer(), names(), query::result, and groupFilesInBlocks::temp.
Referenced by DDValue().
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 198 of file DDValue.cc.
References vecPair_.
Referenced by operator<<(), DDCoreToDDXMLOutput::specpar(), DDStreamer::specs_write(), and DDI::Specific::stream().
|
staticprivate |
Definition at line 126 of file DDValue.cc.
|
inline |
the name of the DDValue
Definition at line 64 of file DDValue.h.
Referenced by cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), DDI::LogicalPart::addSpecifics(), operator<<(), DDCoreToDDXMLOutput::specpar(), DDStreamer::specs_write(), DDI::Specific::stream(), and Vispa.Views.PropertyView.Property::valueChanged().
|
staticprivate |
Definition at line 119 of file DDValue.cc.
Referenced by DDValue(), doubles(), init(), name(), and operator[]().
|
inline |
bool DDValue::operator< | ( | const DDValue & | v | ) | 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))
Definition at line 222 of file DDValue.cc.
References id(), query::result, and vecPair_.
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 204 of file DDValue.cc.
References id(), query::result, and vecPair_.
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 177 of file DDValue.cc.
References edm::hlt::Exception, id_, python.rootplot.argparse::message, names(), AlCaHLTBitMon_QueryRunRegistry::string, and vecPair_.
void DDValue::setEvalState | ( | bool | newState | ) |
set to true, if the double-values (method DDValue::doubles()) make sense
Definition at line 192 of file DDValue.cc.
References vecPair_.
Referenced by DDValue(), DDLSpecPar::processElement(), and DDStreamer::specs_read().
|
inline |
the size of the stored value-pairs (std::string,double)
Definition at line 78 of file DDValue.h.
References vecPair_.
Referenced by DDValue(), DDMapper< KeyType, ValueType >::noSpecifics(), operator<<(), DDCoreToDDXMLOutput::specpar(), DDStreamer::specs_write(), 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 71 of file DDValue.h.
References vecPair_.
Referenced by DDI::LogicalPart::addSpecifics(), DDMapper< KeyType, ValueType >::all(), DTGeometryBuilderFromDDD::buildGeometry(), DTGeometryParsFromDD::buildGeometry(), dddGetStringRaw(), DDG4Builder::getDouble(), CaloTrkProcessing::getNames(), ExtractStringFromDDD::getString(), DDG4SensitiveConverter::getString(), ECalSD::getStringArray(), CocoaAnalyzer::myFetchString(), operator<<(), DDCoreToDDXMLOutput::specpar(), DDStreamer::specs_write(), DDI::Specific::stream(), and DDMapper< KeyType, ValueType >::toString().
|
friend |
|
friend |
|
private |
Definition at line 106 of file DDValue.h.
Referenced by DDValue(), doubles(), id(), init(), name(), operator unsigned int(), and operator[]().
vecpair_type* DDValue::vecPair_ |
Definition at line 109 of file DDValue.h.
Referenced by DDValue(), doubles(), isEvaluated(), operator<(), operator==(), operator[](), setEvalState(), size(), and strings().