CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::parser::ExpressionFunctionSetter Struct Reference

#include <ExpressionFunctionSetter.h>

List of all members.

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.

                                                                                       : 
        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.

                                                                            {
  Function fun = funStack_.back(); funStack_.pop_back();
  ExpressionPtr funExp;
  switch( fun ) {
  case( kAbs      ) : funExp.reset( new ExpressionUnaryOperator <abs_f  >   ( expStack_ ) ); break;
  case( kAcos     ) : funExp.reset( new ExpressionUnaryOperator <acos_f >   ( expStack_ ) ); break;
  case( kAsin     ) : funExp.reset( new ExpressionUnaryOperator <asin_f >   ( expStack_ ) ); break;
  case( kAtan     ) : funExp.reset( new ExpressionUnaryOperator <atan_f >   ( expStack_ ) ); break;
  case( kAtan2    ) : funExp.reset( new ExpressionBinaryOperator<atan2_f>   ( expStack_ ) ); break;
  case( kChi2Prob ) : funExp.reset( new ExpressionBinaryOperator<chi2prob_f>( expStack_ ) ); break;
  case( kCos      ) : funExp.reset( new ExpressionUnaryOperator <cos_f  >   ( expStack_ ) ); break;
  case( kCosh     ) : funExp.reset( new ExpressionUnaryOperator <cosh_f >   ( expStack_ ) ); break;
  case( kDeltaR   ) : funExp.reset( new ExpressionQuaterOperator<deltaR_f>  ( expStack_ ) ); break;
  case( kDeltaPhi ) : funExp.reset( new ExpressionBinaryOperator<deltaPhi_f>( expStack_ ) ); break;
  case( kExp      ) : funExp.reset( new ExpressionUnaryOperator <exp_f  >   ( expStack_ ) ); break;
  case( kHypot    ) : funExp.reset( new ExpressionBinaryOperator<hypot_f>   ( expStack_ ) ); break;
  case( kLog      ) : funExp.reset( new ExpressionUnaryOperator <log_f  >   ( expStack_ ) ); break;
  case( kLog10    ) : funExp.reset( new ExpressionUnaryOperator <log10_f>   ( expStack_ ) ); break;
  case( kMax      ) : funExp.reset( new ExpressionBinaryOperator<max_f>     ( expStack_ ) ); break;
  case( kMin      ) : funExp.reset( new ExpressionBinaryOperator<min_f>     ( expStack_ ) ); break;
  case( kPow      ) : funExp.reset( new ExpressionBinaryOperator<pow_f  >   ( expStack_ ) ); break;
  case( kSin      ) : funExp.reset( new ExpressionUnaryOperator <sin_f  >   ( expStack_ ) ); break;
  case( kSinh     ) : funExp.reset( new ExpressionUnaryOperator <sinh_f >   ( expStack_ ) ); break;
  case( kSqrt     ) : funExp.reset( new ExpressionUnaryOperator <sqrt_f >   ( expStack_ ) ); break;
  case( kTan      ) : funExp.reset( new ExpressionUnaryOperator <tan_f  >   ( expStack_ ) ); break;
  case( kTanh     ) : funExp.reset( new ExpressionUnaryOperator <tanh_f >   ( expStack_ ) ); break;
  case( kTestBit  ) : funExp.reset( new ExpressionBinaryOperator<test_bit_f>( expStack_ ) ); break;
  };
  expStack_.push_back( funExp );
}

Member Data Documentation

Definition at line 22 of file ExpressionFunctionSetter.h.

Referenced by operator()().

Definition at line 23 of file ExpressionFunctionSetter.h.

Referenced by operator()().