1 #ifndef SelectorUtils_Expressions_h
2 #define SelectorUtils_Expressions_h
33 template<
class AnExpr>
39 Expr(
const AnExpr& expr = AnExpr() ):
mExpr(expr) {};
49 template<
class Value,
class ActON >
68 template <
class RETType >
81 template<
class Value,
class ActON >
195 template<
class A,
class Operation,
class B >
215 template<
class A,
class B >
258 template<
class A,
class B >
261 template<
class A,
class B >
270 template<
class A ,
class ArgType>
273 template<
class ArgType>
278 template<
class ArgType>
287 template<
template<
class T>
class Op,
class A,
class B >
290 template<
template<
class T>
class Op,
class A,
class B>
299 template<
template<
class T>
class Op,
class A,
class B >
303 typedef typename ToExprTrait<A, ArgType>::ToExprType
ToExprType;
311 template<
template<
class T>
class Op,
class A,
class B >
315 typedef typename ToExprTrait<B, ArgType>::ToExprType
ToExprType;
330 template<
class A,
class B >
338 template<
class A,
class B >
344 return ReturnType( ReturnBaseType(LToExpr(A), B) );
347 template<
class A,
class B >
351 typedef typename operator_trait< Expr<A>, Add, B >::ReturnBaseType ReturnBaseType;
353 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
358 template<
class A,
class B >
359 typename operator_trait< Expr<A>, Mul, Expr<B> >
::ReturnType
366 template<
class A,
class B >
372 return ReturnType( ReturnBaseType(LToExpr(A), B) );
375 template<
class A,
class B >
379 typedef typename operator_trait< Expr<A>, Mul, B >::ReturnBaseType ReturnBaseType;
381 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
386 template<
class A,
class B >
394 template<
class A,
class B >
400 return ReturnType( ReturnBaseType(LToExpr(A), B) );
403 template<
class A,
class B >
407 typedef typename operator_trait< Expr<A>,
Div, B >::ReturnBaseType ReturnBaseType;
409 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
414 template<
class A,
class B >
415 typename operator_trait< Expr<A>, And, Expr<B> >
::ReturnType
424 template<
class A,
class B >
430 return ReturnType( ReturnBaseType(LToExpr(A), B) );
433 template<
class A,
class B >
437 typedef typename operator_trait< Expr<A>, And, B >::ReturnBaseType ReturnBaseType;
439 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
444 template<
class A,
class B >
445 typename operator_trait< Expr<A>, Or, Expr<B> >
::ReturnType
452 template<
class A,
class B >
458 return ReturnType( ReturnBaseType(LToExpr(A), B) );
461 template<
class A,
class B >
465 typedef typename operator_trait< Expr<A>, Or, B >::ReturnBaseType ReturnBaseType;
467 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
472 template<
class A,
class B >
473 typename operator_trait< Expr<A>, Less, Expr<B> >
::ReturnType
480 template<
class A,
class B >
481 typename operator_trait< A , Less, TExpr<B> >
::ReturnType
482 operator<( const A& A, const Expr<B>&
B ){
489 template<
class A,
class B >
491 operator<( const Expr<A>&
A,
const B&
B ){
493 typedef typename operator_trait< TLt, TExpr<A>,
B >::ReturnBaseType ReturnBaseType;
500 template<
class A,
class B >
501 typename operator_trait< Expr<A>, LessEqual, Expr<B> >
::ReturnType
508 template<
class A,
class B >
509 typename operator_trait< A, LessEqual, Expr<B> >
::ReturnType
510 operator<=( const A& A, const Expr<B>&
B ) {
518 template<
class A,
class B >
520 operator<=( const Expr<A>&
A,
const B&
B ) {
522 typedef typename operator_trait< Expr<A>, LessEqual,
B >::ReturnBaseType ReturnBaseType;
529 template<
class A,
class B >
530 typename operator_trait< Expr<A>, More, Expr<B> >
::ReturnType
537 template<
class A,
class B >
543 return ReturnType( ReturnBaseType(LToExpr(A), B) );
546 template<
class A,
class B >
550 typedef typename operator_trait< Expr<A>, More, B >::ReturnBaseType ReturnBaseType;
552 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
557 template<
class A,
class B >
558 typename operator_trait< Expr<A>, MoreEqual, TExpr<B> >
::ReturnType
565 template<
class A,
class B >
566 typename operator_trait< A , MoreEqual, TExpr<B> >
::ReturnType
571 return ReturnType( ReturnBaseType(LToExpr(A), B) );
574 template<
class A,
class B >
578 typedef typename operator_trait< Expr<A>, MoreEqual, B >::ReturnBaseType ReturnBaseType;
580 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
586 template<
class A,
class B >
587 typename operator_trait< Expr<A>, Equal, Expr<B> >
::ReturnType
594 template<
class A,
class B >
595 typename operator_trait< A , Equal, Expr<B> >
::ReturnType
600 return ReturnType( ReturnBaseType(LToExpr(A), B) );
603 template<
class A,
class B >
607 typedef typename operator_trait< Expr<A>, Equal, B >::ReturnBaseType ReturnBaseType;
609 return ReturnType( ReturnBaseType(A, RToExpr(B)) );
RetType operator()(const ArgType &) const
static RetType apply(const RetType &a, const RetType &b)
ConvTraits< Expr< A >, Expr< B > >::ResultType ResultType
RetType operator()(const ArgType &x) const
virtual ExprBase * clone()
static RetType apply(const RetType &a, const RetType &b)
BasicConvTrait< LReturn, RReturn >::ResultType ResultType
ToExprTrait< A, ArgType >::ToExprType ToExprType
virtual bool operator()(const T &x) const
Expr< A >::ArgType ArgType
static RetType apply(const T &a, const T &b)
void operator()(Type *aClass)
RetType operator()(const ArgType &x) const
static RetType apply(const T &a, const T &b)
BinOp(const A &A, const B &B)
bool operator==(const reco::Conversion &c1, const reco::Conversion &c2)
Expr< ReturnBaseType > ReturnType
RetType operator()(const ArgType &x) const
ConvTraits Expr< B >::ResultType ResultType
Expr< B >::ArgType ArgType
operator_trait< Expr< A >, Div, Expr< B > >::ReturnType operator/(const Expr< A > &A, const Expr< B > &B)
operator_trait< Expr< A >, Mul, Expr< B > >::ReturnType operator*(const Expr< A > &A, const Expr< B > &B)
Expr< ExprLiteral< int, ArgType > > ToExprType
std::map< DetId, double > ReturnType
Expr(const AnExpr &expr=AnExpr())
reco::JetExtendedAssociation::JetExtendedData Value
operator_trait< Expr< A >, Add, Expr< B > >::ReturnType operator+(const TExpr< A > &A, const TExpr< B > &B)
Operation::RetType RetType
ToExprTrait< B, ArgType >::ToExprType ToExprType
operator_trait< Expr< A >, Or, Expr< B > >::ReturnType operator||(const Expr< A > &A, const Expr< B > &B)
ExprUserFun(Value(ActON::*aFun)() const )
BinOp< Expr< A >, Op< ResultType >, Expr< B > > ReturnBaseType
RetType operator()(const ArgType &x) const
Expr< ExprLiteral< double, ArgType > > ToExprType
static RetType apply(const RetType &a, const RetType &b)
operator_trait< Expr< A >, MoreEqual, TExpr< B > >::ReturnType operator>=(const Expr< A > &A, const Expr< B > &B)
static RetType apply(const RetType &a, const RetType &b)
static RetType apply(const T &a, const T &b)
BinOp< ToExprType, Op< ResultType >, Expr< B > > ReturnBaseType
Expr< ReturnBaseType > ReturnType
operator_trait< Expr< A >, And, Expr< B > >::ReturnType operator&&(const Expr< A > &A, const Expr< B > &B)
Expr< B >::RetType RReturn
static RetType apply(const T &a, const T &b)
static RetType apply(bool a, bool b)
Expr< A >::RetType LReturn
RetType(ActON::* mFun)() const
operator_trait< Expr< A >, More, Expr< B > >::ReturnType operator>(const Expr< A > &A, const Expr< B > &B)
ExprLiteral(const RetType &val)
BinOp< Expr< A >, Op< ResultType >, ToExprType > ReturnBaseType
Expr< ReturnBaseType > ReturnType
ConvTraits< Expr< A >, ToExprType >::ResultType ResultType
static RetType apply(const T &a, const T &b)
static RetType apply(bool a, bool b)
::boost::mpl::if_< D1, D1, typename::boost::mpl::if_< D2, D2, D0 >::type >::type Div