Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
Utils
src
ExpressionBinaryOperator.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_ExpressionBinaryOperator_h
2
#define CommonTools_Utils_ExpressionBinaryOperator_h
3
/* \class reco::parser::ExpressionBinaryOperator
4
*
5
* Binary Operator expression
6
*
7
* \author original version: Chris Jones, Cornell,
8
* adapted by Luca Lista, INFN
9
*
10
* \version $Revision: 1.2 $
11
*
12
*/
13
#include "
CommonTools/Utils/src/ExpressionBase.h
"
14
#include "
CommonTools/Utils/src/ExpressionStack.h
"
15
16
namespace
reco
{
17
namespace
parser
{
18
template
<
typename
Op>
19
struct
ExpressionBinaryOperator
:
public
ExpressionBase
{
20
virtual
double
value
(
const
edm::ObjectWithDict
&
o
)
const
{
21
return
op_
((*lhs_).value(o), (*rhs_).value(o));
22
}
23
ExpressionBinaryOperator
(
ExpressionStack
& expStack) {
24
rhs_
= expStack.back(); expStack.pop_back();
25
lhs_
= expStack.back(); expStack.pop_back();
26
}
27
private
:
28
Op
op_
;
29
ExpressionPtr
lhs_
,
rhs_
;
30
};
31
}
32
}
33
34
#endif
edm::ObjectWithDict
Definition:
ObjectWithDict.h:16
geometryXMLtoCSV.parser
tuple parser
Definition:
geometryXMLtoCSV.py:78
reco::parser::ExpressionBinaryOperator
Definition:
ExpressionBinaryOperator.h:19
reco::parser::ExpressionBinaryOperator::lhs_
ExpressionPtr lhs_
Definition:
ExpressionBinaryOperator.h:29
ExpressionBase.h
reco::parser::ExpressionBinaryOperator::value
virtual double value(const edm::ObjectWithDict &o) const
Definition:
ExpressionBinaryOperator.h:20
reco::parser::ExpressionPtr
boost::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:22
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
reco::parser::ExpressionBase
Definition:
ExpressionBase.h:18
reco::parser::ExpressionStack
std::vector< boost::shared_ptr< ExpressionBase > > ExpressionStack
Definition:
ExpressionStack.h:18
python.connectstrParser.o
string o
Definition:
connectstrParser.py:70
reco::parser::ExpressionBinaryOperator::op_
Op op_
Definition:
ExpressionBinaryOperator.h:28
reco::parser::ExpressionBinaryOperator::ExpressionBinaryOperator
ExpressionBinaryOperator(ExpressionStack &expStack)
Definition:
ExpressionBinaryOperator.h:23
reco::parser::ExpressionBinaryOperator::rhs_
ExpressionPtr rhs_
Definition:
ExpressionBinaryOperator.h:29
ExpressionStack.h
Generated for CMSSW Reference Manual by
1.8.5