1 #ifndef ClhepEvaluator_h
2 #define ClhepEvaluator_h
8 #include "CLHEP/Evaluator/Evaluator.h"
18 void set(
const std::string & ns,
const std::string &
name,
const std::string & exprValue);
20 double eval(
const std::string & ns,
const std::string & expr);
23 const std::string & name
32 double eval(
const char * expression);
35 void set(
const std::string & name,
const std::string &
value);
40 void prepare(
const std::string & ns,
41 const std::string & name,
42 const std::string & exprValue,
43 std::string & nameResult,
44 std::string & valResult)
const;
46 void throwex(
const std::string & ns,
47 const std::string & name,
48 const std::string & expr,
49 const std::string &
reason,
52 void checkname(
const std::string & name)
const;
bool isDefined(const std::string &ns, const std::string &name)
check whether a variable is already defined or not
std::vector< std::string > variables_
std::vector< std::string > values_
Interface of an Expression Evaluator.
const std::vector< std::string > & variables() const
access to the clhep-implementation of the dictionary variables
HepTool::Evaluator evaluator_
const std::vector< std::string > & values() const
void clear()
access to the dictionary (namespace,name)->value
void checkname(const std::string &name) const
void throwex(const std::string &ns, const std::string &name, const std::string &expr, const std::string &reason, int idx=0) const
void set(const std::string &ns, const std::string &name, const std::string &exprValue)
put a new variable named 'namespace:name' into the dictionary of the evaluator
double eval(const std::string &ns, const std::string &expr)
evaluate an expression expr inside the local namespace
void prepare(const std::string &ns, const std::string &name, const std::string &exprValue, std::string &nameResult, std::string &valResult) const