test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
Utils
src
formulaEvaluatorBase.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_formulaEvaluatorBase_h
2
#define CommonTools_Utils_formulaEvaluatorBase_h
3
// -*- C++ -*-
4
//
5
// Package: CommonTools/Utils
6
// Class : reco::formula::EvaluatorBase
7
//
18
//
19
// Original Author: Christopher Jones
20
// Created: Wed, 23 Sep 2015 16:26:00 GMT
21
//
22
23
// system include files
24
25
// user include files
26
27
// forward declarations
28
29
namespace
reco
{
30
namespace
formula
{
31
class
EvaluatorBase
32
{
33
34
public
:
35
enum class
Precedence
{
36
kIdentity
= 1,
37
kComparison
=2,
38
kPlusMinus
= 3,
39
kMultDiv
= 4,
40
kPower
= 5,
41
kFunction
= 6,
//default
42
kParenthesis
= 7,
43
kUnaryMinusOperator
= 8
44
};
45
46
EvaluatorBase
();
47
EvaluatorBase
(
Precedence
);
48
virtual
~EvaluatorBase
();
49
50
// ---------- const member functions ---------------------
51
//inputs are considered to be 'arrays' which have already been validated to
52
// be of the appropriate length
53
virtual
double
evaluate
(
double
const
* iVariables,
double
const
* iParameters)
const
= 0;
54
55
unsigned
int
precedence
()
const
{
return
m_precedence
; }
56
void
setPrecedenceToParenthesis
() {
m_precedence
=
static_cast<
unsigned
int
>
(
Precedence::kParenthesis
); }
57
58
private
:
59
EvaluatorBase
(
const
EvaluatorBase
&) =
delete
;
60
61
const
EvaluatorBase
&
operator=
(
const
EvaluatorBase
&) =
delete
;
62
63
// ---------- member data --------------------------------
64
unsigned
int
m_precedence
;
65
};
66
}
67
}
68
69
70
#endif
reco::formula::EvaluatorBase::evaluate
virtual double evaluate(double const *iVariables, double const *iParameters) const =0
reco::formula::EvaluatorBase::Precedence::kParenthesis
reco::formula::EvaluatorBase::Precedence::kIdentity
reco::formula::EvaluatorBase::m_precedence
unsigned int m_precedence
Definition:
formulaEvaluatorBase.h:64
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
reco::formula::EvaluatorBase::operator=
const EvaluatorBase & operator=(const EvaluatorBase &)=delete
EcalElecEmulTccOnlyExample_cfg.formula
tuple formula
Definition:
EcalElecEmulTccOnlyExample_cfg.py:26
reco::formula::EvaluatorBase::Precedence::kUnaryMinusOperator
reco::formula::EvaluatorBase::Precedence::kFunction
reco::formula::EvaluatorBase::setPrecedenceToParenthesis
void setPrecedenceToParenthesis()
Definition:
formulaEvaluatorBase.h:56
reco::formula::EvaluatorBase::EvaluatorBase
EvaluatorBase()
Definition:
formulaEvaluatorBase.cc:30
reco::formula::EvaluatorBase::Precedence
Precedence
Definition:
formulaEvaluatorBase.h:35
reco::formula::EvaluatorBase::~EvaluatorBase
virtual ~EvaluatorBase()
Definition:
formulaEvaluatorBase.cc:40
reco::formula::EvaluatorBase::precedence
unsigned int precedence() const
Definition:
formulaEvaluatorBase.h:55
reco::formula::EvaluatorBase::Precedence::kPower
reco::formula::EvaluatorBase::Precedence::kPlusMinus
reco::formula::EvaluatorBase::Precedence::kMultDiv
reco::formula::EvaluatorBase::Precedence::kComparison
reco::formula::EvaluatorBase
Definition:
formulaEvaluatorBase.h:31
Generated for CMSSW Reference Manual by
1.8.5