/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/Utils/src/CutBinaryOperatorSetter.h
37 строк
909 B
William Tanenbaum
Remove direct usage of Reflex
03 авг 2012, 22:20
03 авг 2012, 22:20
78e3686
Код
Авторство
О чём код?
#ifndef CommonTools_Utils_CutBinaryOperatorSetter_h #define CommonTools_Utils_CutBinaryOperatorSetter_h /* \class reco::parser::CutBinaryOperator * * Binary operator expression setter * * \author original version: Chris Jones, Cornell, * adapted by Luca Lista, INFN * * \version $Revision: 1.2 $ * */ #include "CommonTools/Utils/src/CutBinaryOperator.h" #include "CommonTools/Utils/src/CutStack.h" #include <cmath> namespace reco { namespace parser { template<typename T> struct power_of { T operator()(T lhs, T rhs) const { return pow(lhs, rhs); } }; template<typename Op> struct CutBinaryOperatorSetter { CutBinaryOperatorSetter(CutStack & stack) : stack_(stack) { } void operator()(const char*, const char*) const { stack_.push_back(CutPtr(new CutBinaryOperator<Op>(stack_))); } private: CutStack & stack_; }; } } #endif