Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CommonTools
Utils
src
ExpressionBinaryOperatorSetter.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_ExpressionBinaryOperatorSetter_h
2
#define CommonTools_Utils_ExpressionBinaryOperatorSetter_h
3
/* \class reco::parser::ExpressionBinaryOperator
4
*
5
* Binary operator expression setter
6
*
7
* \author original version: Chris Jones, Cornell,
8
* adapted by Luca Lista, INFN
9
*
10
* \version $Revision: 1.3 $
11
*
12
*/
13
#include "
CommonTools/Utils/src/ExpressionBinaryOperator.h
"
14
#include "
CommonTools/Utils/src/ExpressionStack.h
"
15
#include <cmath>
16
17
namespace
reco
{
18
namespace
parser
{
19
20
template
<
typename
T>
21
struct
power_of {
22
T
operator()
(
T
lhs,
T
rhs)
const
{
return
pow
(lhs, rhs); }
23
};
24
25
template
<
typename
Op>
26
struct
ExpressionBinaryOperatorSetter
{
27
ExpressionBinaryOperatorSetter
(
ExpressionStack
&
stack
) :
stack_
(stack) { }
28
void
operator()
(
const
char
*,
const
char
*)
const
{
29
stack_
.push_back(
ExpressionPtr
(
new
ExpressionBinaryOperator<Op>
(
stack_
)));
30
}
31
private
:
32
ExpressionStack
&
stack_
;
33
};
34
}
35
}
36
37
#endif
geometryXMLtoCSV.parser
tuple parser
Definition:
geometryXMLtoCSV.py:78
reco::parser::ExpressionBinaryOperator
Definition:
ExpressionBinaryOperator.h:19
reco::parser::ExpressionBinaryOperatorSetter::stack_
ExpressionStack & stack_
Definition:
ExpressionBinaryOperatorSetter.h:32
ExpressionBinaryOperator.h
reco::parser::power_of::operator()
T operator()(T lhs, T rhs) const
Definition:
ExpressionBinaryOperatorSetter.h:22
reco::parser::ExpressionPtr
boost::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:24
reco::parser::ExpressionBinaryOperatorSetter
Definition:
ExpressionBinaryOperatorSetter.h:26
reco::parser::ExpressionStack
std::vector< boost::shared_ptr< ExpressionBase > > ExpressionStack
Definition:
ExpressionStack.h:18
L1Trigger_dataformats.reco
dictionary reco
Definition:
L1Trigger_dataformats.py:9
svgfig.stack
stack
Definition:
svgfig.py:558
reco::parser::ExpressionBinaryOperatorSetter::ExpressionBinaryOperatorSetter
ExpressionBinaryOperatorSetter(ExpressionStack &stack)
Definition:
ExpressionBinaryOperatorSetter.h:27
reco::parser::ExpressionBinaryOperatorSetter::operator()
void operator()(const char *, const char *) const
Definition:
ExpressionBinaryOperatorSetter.h:28
T
long double T
Definition:
Basic3DVectorLD.h:59
ExpressionStack.h
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:40
Generated for CMSSW Reference Manual by
1.8.5