22 os <<
"DDConstant name=" << cons.
name();
25 os <<
" val=" << cons.
value();
28 os <<
" constant is not yet defined, only declared.";
39 const std::vector<std::string> & vars = eval->
variables();
40 const std::vector<std::string> &
vals = eval->
values();
41 if (vars.size() != vals.size()) {
42 throw cms::Exception(
"DDException") <<
"DDConstants::createConstansFromEvaluator(): different size of variable names & values!";
44 size_t i(0),
s(vars.size());
48 ST i1 = sr.find(
"___");
50 double* dv =
new double;
51 *dv = eval->
eval(sr.c_str());
56 throw cms::Exception(
"DDException") <<
"DDConstants::createConstansFromEvaluator(): expression-evaluator is not a ClhepEvaluator-implementation!";
def_type isDefined() const
DDName is used to identify DDD entities uniquely.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
static value_type & instance()
const std::vector< std::string > & variables() const
access to the clhep-implementation of the dictionary variables
const std::vector< std::string > & values() const
double value() const
return the first stored value; does not check boundaries!
DDConstant()
an uninitialized constant; one can assign an initialized constant to make it valid ...
static void createConstantsFromEvaluator()
creates all DDConstants from the variables of the ClhepEvaluator
double eval(const std::string &ns, const std::string &expr)
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...