#include <ClhepEvaluator.h>
Public Member Functions | |
void | clear () |
access to the dictionary (namespace,name)->value More... | |
ClhepEvaluator () | |
double | eval (const std::string &ns, const std::string &expr) |
evaluate an expression expr inside the local namespace More... | |
double | eval (const char *expression) |
evaluations using directly the CLHEP-evaluator More... | |
bool | isDefined (const std::string &ns, const std::string &name) |
check whether a variable is already defined or not More... | |
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 More... | |
void | set (const std::string &name, const std::string &value) |
filling the clhep-implementation of the dictionary More... | |
const std::vector< std::string > & | values () const |
const std::vector< std::string > & | variables () const |
access to the clhep-implementation of the dictionary variables More... | |
~ClhepEvaluator () | |
Public Member Functions inherited from ExprEvalInterface | |
virtual | ~ExprEvalInterface () |
Private Member Functions | |
void | checkname (const std::string &name) const |
void | prepare (const std::string &ns, const std::string &name, const std::string &exprValue, std::string &nameResult, std::string &valResult) const |
void | throwex (const std::string &ns, const std::string &name, const std::string &expr, const std::string &reason, int idx=0) const |
Private Attributes | |
HepTool::Evaluator | evaluator_ |
std::vector< std::string > | values_ |
std::vector< std::string > | variables_ |
Definition at line 11 of file ClhepEvaluator.h.
ClhepEvaluator::ClhepEvaluator | ( | ) |
ClhepEvaluator::~ClhepEvaluator | ( | ) |
Definition at line 21 of file ClhepEvaluator.cc.
References clear().
|
private |
Definition at line 269 of file ClhepEvaluator.cc.
References alignCSCRings::e, edm::hlt::Exception, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by set().
|
virtual |
access to the dictionary (namespace,name)->value
if not implemented in a sub-class it returns 0 and does nothing to result clear the dictionary of the evaluator
Implements ExprEvalInterface.
Definition at line 140 of file ClhepEvaluator.cc.
References evaluator_, values_, and variables_.
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(), Vispa.Views.TreeView.TreeView::updateContent(), Vispa.Views.TableView.TableView::updateContent(), Vispa.Views.BoxDecayView.BoxDecayView::updateContent(), Vispa.Views.PropertyView.PropertyView::updateContent(), and ~ClhepEvaluator().
|
virtual |
evaluate an expression expr inside the local namespace
Implements ExprEvalInterface.
Definition at line 92 of file ClhepEvaluator.cc.
References gather_cfg::cout, evaluator_, i, prepare(), query::result, AlCaHLTBitMon_QueryRunRegistry::string, and throwex().
Referenced by DDConstant::createConstantsFromEvaluator().
double ClhepEvaluator::eval | ( | const char * | expression | ) |
evaluations using directly the CLHEP-evaluator
expression must be an expression compatible with the CLHEP-Evaluator syntax
Definition at line 115 of file ClhepEvaluator.cc.
References gather_cfg::cout, evaluator_, i, query::result, AlCaHLTBitMon_QueryRunRegistry::string, and throwex().
|
virtual |
check whether a variable is already defined or not
Implements ExprEvalInterface.
Definition at line 129 of file ClhepEvaluator.cc.
References evaluator_, prepare(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
private |
Definition at line 151 of file ClhepEvaluator.cc.
References customizeTrackingMonitorSeedNumber::idx, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, and throwex().
Referenced by eval(), isDefined(), and set().
|
virtual |
put a new variable named 'namespace:name' into the dictionary of the evaluator
Implements ExprEvalInterface.
Definition at line 42 of file ClhepEvaluator.cc.
References checkname(), gather_cfg::cout, DCOUT_V, dd_exchange_value(), evaluator_, prepare(), AlCaHLTBitMon_QueryRunRegistry::string, throwex(), values_, and variables_.
Referenced by betterConfigParser.BetterConfigParser::getGeneral(), and DDStreamer::vars_read().
void ClhepEvaluator::set | ( | const std::string & | name, |
const std::string & | value | ||
) |
filling the clhep-implementation of the dictionary
Definition at line 71 of file ClhepEvaluator.cc.
References gather_cfg::cout, dd_exchange_value(), evaluator_, throwex(), values_, and variables_.
Referenced by betterConfigParser.BetterConfigParser::getGeneral().
|
private |
Definition at line 255 of file ClhepEvaluator.cc.
References edm::hlt::Exception, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by eval(), prepare(), and set().
|
inline |
Definition at line 28 of file ClhepEvaluator.h.
References values_.
Referenced by DDConstant::createConstantsFromEvaluator(), and DDStreamer::vars_write().
|
inline |
access to the clhep-implementation of the dictionary variables
Definition at line 27 of file ClhepEvaluator.h.
References variables_.
Referenced by DDConstant::createConstantsFromEvaluator(), and DDStreamer::vars_write().
|
private |
Definition at line 54 of file ClhepEvaluator.h.
Referenced by clear(), ClhepEvaluator(), eval(), isDefined(), and set().
|
private |
Definition at line 56 of file ClhepEvaluator.h.
|
private |
Definition at line 55 of file ClhepEvaluator.h.
Referenced by clear(), set(), and variables().