CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
reco::parser::ExpressionFunctionSetter Struct Reference

#include <ExpressionFunctionSetter.h>

Public Member Functions

 ExpressionFunctionSetter (ExpressionStack &expStack, FunctionStack &funStack)
 
void operator() (const char *, const char *) const
 

Private Attributes

ExpressionStackexpStack_
 
FunctionStackfunStack_
 

Detailed Description

Definition at line 17 of file ExpressionFunctionSetter.h.

Constructor & Destructor Documentation

reco::parser::ExpressionFunctionSetter::ExpressionFunctionSetter ( ExpressionStack expStack,
FunctionStack funStack 
)
inline

Definition at line 18 of file ExpressionFunctionSetter.h.

Member Function Documentation

void ExpressionFunctionSetter::operator() ( const char *  ,
const char *   
) const

Definition at line 86 of file ExpressionFunctionSetter.cc.

References expStack_, funStack_, reco::parser::kAbs, reco::parser::kAcos, reco::parser::kAsin, reco::parser::kAtan, reco::parser::kAtan2, reco::parser::kChi2Prob, reco::parser::kCos, reco::parser::kCosh, reco::parser::kDeltaPhi, reco::parser::kDeltaR, reco::parser::kExp, reco::parser::kHypot, reco::parser::kLog, reco::parser::kLog10, reco::parser::kMax, reco::parser::kMin, reco::parser::kPow, reco::parser::kSin, reco::parser::kSinh, reco::parser::kSqrt, reco::parser::kTan, reco::parser::kTanh, and reco::parser::kTestBit.

86  {
87  Function fun = funStack_.back();
88  funStack_.pop_back();
89  ExpressionPtr funExp;
90  switch (fun) {
91  case (kAbs):
92  funExp.reset(new ExpressionUnaryOperator<abs_f>(expStack_));
93  break;
94  case (kAcos):
95  funExp.reset(new ExpressionUnaryOperator<acos_f>(expStack_));
96  break;
97  case (kAsin):
98  funExp.reset(new ExpressionUnaryOperator<asin_f>(expStack_));
99  break;
100  case (kAtan):
101  funExp.reset(new ExpressionUnaryOperator<atan_f>(expStack_));
102  break;
103  case (kAtan2):
104  funExp.reset(new ExpressionBinaryOperator<atan2_f>(expStack_));
105  break;
106  case (kChi2Prob):
108  break;
109  case (kCos):
110  funExp.reset(new ExpressionUnaryOperator<cos_f>(expStack_));
111  break;
112  case (kCosh):
113  funExp.reset(new ExpressionUnaryOperator<cosh_f>(expStack_));
114  break;
115  case (kDeltaR):
117  break;
118  case (kDeltaPhi):
120  break;
121  case (kExp):
122  funExp.reset(new ExpressionUnaryOperator<exp_f>(expStack_));
123  break;
124  case (kHypot):
125  funExp.reset(new ExpressionBinaryOperator<hypot_f>(expStack_));
126  break;
127  case (kLog):
128  funExp.reset(new ExpressionUnaryOperator<log_f>(expStack_));
129  break;
130  case (kLog10):
131  funExp.reset(new ExpressionUnaryOperator<log10_f>(expStack_));
132  break;
133  case (kMax):
134  funExp.reset(new ExpressionBinaryOperator<max_f>(expStack_));
135  break;
136  case (kMin):
137  funExp.reset(new ExpressionBinaryOperator<min_f>(expStack_));
138  break;
139  case (kPow):
140  funExp.reset(new ExpressionBinaryOperator<pow_f>(expStack_));
141  break;
142  case (kSin):
143  funExp.reset(new ExpressionUnaryOperator<sin_f>(expStack_));
144  break;
145  case (kSinh):
146  funExp.reset(new ExpressionUnaryOperator<sinh_f>(expStack_));
147  break;
148  case (kSqrt):
149  funExp.reset(new ExpressionUnaryOperator<sqrt_f>(expStack_));
150  break;
151  case (kTan):
152  funExp.reset(new ExpressionUnaryOperator<tan_f>(expStack_));
153  break;
154  case (kTanh):
155  funExp.reset(new ExpressionUnaryOperator<tanh_f>(expStack_));
156  break;
157  case (kTestBit):
159  break;
160  };
161  expStack_.push_back(funExp);
162 }
std::shared_ptr< ExpressionBase > ExpressionPtr

Member Data Documentation

ExpressionStack& reco::parser::ExpressionFunctionSetter::expStack_
private

Definition at line 23 of file ExpressionFunctionSetter.h.

Referenced by operator()().

FunctionStack& reco::parser::ExpressionFunctionSetter::funStack_
private

Definition at line 24 of file ExpressionFunctionSetter.h.

Referenced by operator()().