CommonTools
Utils
src
ExpressionQuaterOperator.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_ExpressionQuaterOperator_h
2
#define CommonTools_Utils_ExpressionQuaterOperator_h
3
/* \class reco::parser::ExpressionQuaterOperator
4
*
5
* Quater 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
ExpressionQuaterOperator
:
public
ExpressionBase
{
20
double
value
(
const
edm::ObjectWithDict
&
o
)
const override
{
21
return
op_
(
args_
[0]->
value
(
o
),
args_
[1]->
value
(
o
),
args_
[2]->
value
(
o
),
args_
[3]->
value
(
o
));
22
}
23
ExpressionQuaterOperator
(
ExpressionStack
& expStack) {
24
args_
[3] = expStack.back();
25
expStack.pop_back();
26
args_
[2] = expStack.back();
27
expStack.pop_back();
28
args_
[1] = expStack.back();
29
expStack.pop_back();
30
args_
[0] = expStack.back();
31
expStack.pop_back();
32
}
33
34
private
:
35
Op
op_
;
36
ExpressionPtr
args_
[4];
37
};
38
}
// namespace parser
39
}
// namespace reco
40
41
#endif
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:42
reco::parser::ExpressionQuaterOperator
Definition:
ExpressionQuaterOperator.h:19
reco::parser::ExpressionBase
Definition:
ExpressionBase.h:21
ExpressionStack.h
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:25
reco::parser::ExpressionQuaterOperator::value
double value(const edm::ObjectWithDict &o) const override
Definition:
ExpressionQuaterOperator.h:20
reco::parser::ExpressionStack
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
Definition:
ExpressionStack.h:19
reco::parser::ExpressionQuaterOperator::ExpressionQuaterOperator
ExpressionQuaterOperator(ExpressionStack &expStack)
Definition:
ExpressionQuaterOperator.h:23
reco::parser::ExpressionQuaterOperator::args_
ExpressionPtr args_[4]
Definition:
ExpressionQuaterOperator.h:36
reco::parser::ExpressionQuaterOperator::op_
Op op_
Definition:
ExpressionQuaterOperator.h:35
Generated for CMSSW Reference Manual by
1.8.16