CMS 3D CMS Logo

CutBinaryOperatorSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_CutBinaryOperatorSetter_h
2 #define CommonTools_Utils_CutBinaryOperatorSetter_h
3 /* \class reco::parser::CutBinaryOperator
4  *
5  * Binary operator expression setter
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted by Luca Lista, INFN
9  *
10  * \version $Revision: 1.2 $
11  *
12  */
14 #include "CommonTools/Utils/src/CutStack.h"
15 #include <cmath>
16 
17 namespace reco {
18  namespace parser {
19 
20  template<typename T>
21  struct power_of {
22  T operator()(T lhs, T rhs) const { return pow(lhs, rhs); }
23  };
24 
25  template<typename Op>
28  void operator()(const char*, const char*) const {
29  stack_.push_back(CutPtr(new CutBinaryOperator<Op>(stack_)));
30  }
31  private:
32  CutStack & stack_;
33  };
34  }
35 }
36 
37 #endif
void operator()(const char *, const char *) const
constexpr int pow(int x)
Definition: conifer.h:24
stack
Definition: svgfig.py:559
T operator()(T lhs, T rhs) const
fixed size matrix
long double T