![]() |
![]() |
#include <PhysicsTools/Utilities/interface/StringObjectFunction.h>
Public Member Functions | |
double | operator() (const T &t) const |
StringObjectFunction (const reco::parser::ExpressionPtr &expr) | |
StringObjectFunction (const std::string &expr) | |
Private Attributes | |
reco::parser::ExpressionPtr | expr_ |
ROOT::Reflex::Type | type_ |
Definition at line 15 of file StringObjectFunction.h.
StringObjectFunction< T >::StringObjectFunction | ( | const std::string & | expr | ) | [inline] |
Definition at line 16 of file StringObjectFunction.h.
00016 : 00017 type_(ROOT::Reflex::Type::ByTypeInfo(typeid(T))) { 00018 if(! reco::parser::expressionParser<T>(expr, expr_)) { 00019 throw edm::Exception(edm::errors::Configuration, 00020 "failed to parse \"" + expr + "\""); 00021 } 00022 }
StringObjectFunction< T >::StringObjectFunction | ( | const reco::parser::ExpressionPtr & | expr | ) | [inline] |
double StringObjectFunction< T >::operator() | ( | const T & | t | ) | const [inline] |
Definition at line 27 of file StringObjectFunction.h.
00027 { 00028 using namespace ROOT::Reflex; 00029 Object o(type_, const_cast<T *>(& t)); 00030 return expr_->value(o); 00031 }
reco::parser::ExpressionPtr StringObjectFunction< T >::expr_ [private] |
Definition at line 34 of file StringObjectFunction.h.
Referenced by StringObjectFunction< reco::Candidate >::operator()(), and StringObjectFunction< reco::Candidate >::StringObjectFunction().
ROOT::Reflex::Type StringObjectFunction< T >::type_ [private] |
Definition at line 35 of file StringObjectFunction.h.
Referenced by StringObjectFunction< reco::Candidate >::operator()().