CMS 3D CMS Logo

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

◆ ExpressionFunctionSetter()

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

Definition at line 18 of file ExpressionFunctionSetter.h.

19  : expStack_(expStack), funStack_(funStack) {}

Member Function Documentation

◆ operator()()

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

Definition at line 86 of file ExpressionFunctionSetter.cc.

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 }

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.

Member Data Documentation

◆ expStack_

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

Definition at line 23 of file ExpressionFunctionSetter.h.

Referenced by operator()().

◆ funStack_

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

Definition at line 24 of file ExpressionFunctionSetter.h.

Referenced by operator()().

reco::parser::kLog
Definition: Function.h:29
reco::parser::kSin
Definition: Function.h:34
reco::parser::kCosh
Definition: Function.h:26
reco::parser::kTanh
Definition: Function.h:38
reco::parser::kAcos
Definition: Function.h:20
reco::parser::kHypot
Definition: Function.h:28
reco::parser::ExpressionFunctionSetter::funStack_
FunctionStack & funStack_
Definition: ExpressionFunctionSetter.h:24
reco::parser::ExpressionQuaterOperator
Definition: ExpressionQuaterOperator.h:19
reco::parser::kMax
Definition: Function.h:31
reco::parser::kCos
Definition: Function.h:25
reco::parser::kAsin
Definition: Function.h:21
reco::parser::kDeltaR
Definition: Function.h:39
reco::parser::kDeltaPhi
Definition: Function.h:40
reco::parser::kAtan
Definition: Function.h:22
reco::parser::ExpressionBinaryOperator
Definition: ExpressionBinaryOperator.h:19
reco::parser::kSqrt
Definition: Function.h:36
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition: ExpressionBase.h:25
reco::parser::kChi2Prob
Definition: Function.h:24
reco::parser::kAbs
Definition: Function.h:19
reco::parser::kTan
Definition: Function.h:37
reco::parser::kAtan2
Definition: Function.h:23
reco::parser::kMin
Definition: Function.h:32
reco::parser::ExpressionFunctionSetter::expStack_
ExpressionStack & expStack_
Definition: ExpressionFunctionSetter.h:23
reco::parser::ExpressionUnaryOperator
Definition: ExpressionUnaryOperator.h:19
reco::parser::kExp
Definition: Function.h:27
reco::parser::kTestBit
Definition: Function.h:41
reco::parser::Function
Function
Definition: Function.h:18
reco::parser::kLog10
Definition: Function.h:30
reco::parser::kPow
Definition: Function.h:33
reco::parser::kSinh
Definition: Function.h:35