1 #ifndef CommonTools_Utils_StringObjectFunction_h 2 #define CommonTools_Utils_StringObjectFunction_h 15 template <
typename T,
bool DefaultLazyness = false>
18 if (!reco::parser::expressionParser<T>(
expr,
expr_, lazy)) {
33 template <
typename Object>
39 bool operator()(
const Object *
o1,
const Object *o2) {
return (*
f_)(*o1) > (*f_)(*o2); }
std::shared_ptr< ExpressionBase > ExpressionPtr
double operator()(const T &t) const
StringObjectFunction(const reco::parser::ExpressionPtr &expr)
StringObjectFunction(const std::string &expr, bool lazy=DefaultLazyness)
bool operator()(const Object *o1, const Object *o2)
reco::parser::ExpressionPtr expr_
StringObjectFunction< Object > * f_
sortByStringFunction(StringObjectFunction< Object > *f)