test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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.

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

Member Function Documentation

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

Definition at line 40 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.

40  {
41  Function fun = funStack_.back(); funStack_.pop_back();
42  ExpressionPtr funExp;
43  switch( fun ) {
44  case( kAbs ) : funExp.reset( new ExpressionUnaryOperator <abs_f > ( expStack_ ) ); break;
45  case( kAcos ) : funExp.reset( new ExpressionUnaryOperator <acos_f > ( expStack_ ) ); break;
46  case( kAsin ) : funExp.reset( new ExpressionUnaryOperator <asin_f > ( expStack_ ) ); break;
47  case( kAtan ) : funExp.reset( new ExpressionUnaryOperator <atan_f > ( expStack_ ) ); break;
48  case( kAtan2 ) : funExp.reset( new ExpressionBinaryOperator<atan2_f> ( expStack_ ) ); break;
49  case( kChi2Prob ) : funExp.reset( new ExpressionBinaryOperator<chi2prob_f>( expStack_ ) ); break;
50  case( kCos ) : funExp.reset( new ExpressionUnaryOperator <cos_f > ( expStack_ ) ); break;
51  case( kCosh ) : funExp.reset( new ExpressionUnaryOperator <cosh_f > ( expStack_ ) ); break;
52  case( kDeltaR ) : funExp.reset( new ExpressionQuaterOperator<deltaR_f> ( expStack_ ) ); break;
53  case( kDeltaPhi ) : funExp.reset( new ExpressionBinaryOperator<deltaPhi_f>( expStack_ ) ); break;
54  case( kExp ) : funExp.reset( new ExpressionUnaryOperator <exp_f > ( expStack_ ) ); break;
55  case( kHypot ) : funExp.reset( new ExpressionBinaryOperator<hypot_f> ( expStack_ ) ); break;
56  case( kLog ) : funExp.reset( new ExpressionUnaryOperator <log_f > ( expStack_ ) ); break;
57  case( kLog10 ) : funExp.reset( new ExpressionUnaryOperator <log10_f> ( expStack_ ) ); break;
58  case( kMax ) : funExp.reset( new ExpressionBinaryOperator<max_f> ( expStack_ ) ); break;
59  case( kMin ) : funExp.reset( new ExpressionBinaryOperator<min_f> ( expStack_ ) ); break;
60  case( kPow ) : funExp.reset( new ExpressionBinaryOperator<pow_f > ( expStack_ ) ); break;
61  case( kSin ) : funExp.reset( new ExpressionUnaryOperator <sin_f > ( expStack_ ) ); break;
62  case( kSinh ) : funExp.reset( new ExpressionUnaryOperator <sinh_f > ( expStack_ ) ); break;
63  case( kSqrt ) : funExp.reset( new ExpressionUnaryOperator <sqrt_f > ( expStack_ ) ); break;
64  case( kTan ) : funExp.reset( new ExpressionUnaryOperator <tan_f > ( expStack_ ) ); break;
65  case( kTanh ) : funExp.reset( new ExpressionUnaryOperator <tanh_f > ( expStack_ ) ); break;
66  case( kTestBit ) : funExp.reset( new ExpressionBinaryOperator<test_bit_f>( expStack_ ) ); break;
67  };
68  expStack_.push_back( funExp );
69 }
boost::shared_ptr< ExpressionBase > ExpressionPtr

Member Data Documentation

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

Definition at line 22 of file ExpressionFunctionSetter.h.

Referenced by operator()().

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

Definition at line 23 of file ExpressionFunctionSetter.h.

Referenced by operator()().