Go to the documentation of this file.
17 os <<
"DDConstant name=" << cons.
name();
20 os <<
" val=" << cons.
value();
22 os <<
" constant is not yet defined, only declared.";
29 const auto& vals = eval.
values();
30 if (
vars.size() != vals.size()) {
32 <<
"DDConstants::createConstansFromEvaluator(): different size of variable names & values!";
34 for (
const auto& it :
vars) {
35 auto found = it.find(
"___");
DDName is used to identify DDD entities uniquely.
def_type isDefined() const
DDConstant()
an uninitialized constant; one can assign an initialized constant to make it valid
const std::vector< std::string > & variables() const
access to the clhep-implementation of the dictionary variables
std::ostream & operator<<(std::ostream &os, const DDConstant &cons)
output operator for printing ...
const DDName & name() const
double value() const
return the first stored value; does not check boundaries!
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector>
void create(const DDName &name, std::unique_ptr< double > vals)
double eval(const std::string &ns, const std::string &expr)
static void createConstantsFromEvaluator(ClhepEvaluator &)
creates all DDConstants from the variables of the ClhepEvaluator
const std::vector< std::string > & values() const