CommonTools
Utils
src
ExpressionUnaryOperator.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_ExpressionUnaryOperator_h
2
#define CommonTools_Utils_ExpressionUnaryOperator_h
3
/* \class reco::parser::ExpressionUnaryOperator
4
*
5
* Unary 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
ExpressionUnaryOperator
:
public
ExpressionBase
{
20
double
value
(
const
edm::ObjectWithDict
&
o
)
const override
{
return
op_
((*exp_).value(
o
)); }
21
ExpressionUnaryOperator
(
ExpressionStack
& expStack) {
22
exp_
= expStack.back();
23
expStack.pop_back();
24
}
25
26
private
:
27
Op
op_
;
28
ExpressionPtr
exp_
;
29
};
30
}
// namespace parser
31
}
// namespace reco
32
33
#endif
reco::parser::ExpressionUnaryOperator::ExpressionUnaryOperator
ExpressionUnaryOperator(ExpressionStack &expStack)
Definition:
ExpressionUnaryOperator.h:21
edm::ObjectWithDict
Definition:
ObjectWithDict.h:17
writedatasetfile.parser
parser
Definition:
writedatasetfile.py:7
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:45
ExpressionBase.h
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:36
reco::parser::ExpressionUnaryOperator::value
double value(const edm::ObjectWithDict &o) const override
Definition:
ExpressionUnaryOperator.h:20
reco::parser::ExpressionBase
Definition:
ExpressionBase.h:21
ExpressionStack.h
reco::parser::ExpressionUnaryOperator::exp_
ExpressionPtr exp_
Definition:
ExpressionUnaryOperator.h:28
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:25
reco::parser::ExpressionStack
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
Definition:
ExpressionStack.h:19
reco::parser::ExpressionUnaryOperator
Definition:
ExpressionUnaryOperator.h:19
reco::parser::ExpressionUnaryOperator::op_
Op op_
Definition:
ExpressionUnaryOperator.h:27
Generated for CMSSW Reference Manual by
1.8.16