src
PhysicsTools
Utilities
interface
ParametricTrait.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_ParametricTrait_h
2
#define PhysicsTools_Utilities_ParametricTrait_h
3
4
#include "
PhysicsTools/Utilities/interface/Functions.h
"
5
#include "
PhysicsTools/Utilities/interface/Fraction.h
"
6
#include "
PhysicsTools/Utilities/interface/Operations.h
"
7
8
namespace
funct
{
9
10
template
<
typename
F>
11
struct
Parametric
{
12
static
const
int
value
= 1;
13
};
14
15
template
<
int
n>
16
struct
Parametric
<
Numerical
<
n
> > {
17
static
const
int
value
= 0;
18
};
19
20
template
<
int
n,
int
m>
21
struct
Parametric
<
FractionStruct
<
n
,
m
> > {
22
static
const
int
value
= 0;
23
};
24
25
#define NON_PARAMETRIC(FUN) \
26
template <> \
27
struct Parametric<FUN> { \
28
static const int value = 0; \
29
}
30
31
#define NON_PARAMETRIC_UNARY(FUN) \
32
template <typename A> \
33
struct Parametric<FUN<A> > { \
34
static const int value = Parametric<A>::value; \
35
}
36
37
NON_PARAMETRIC_UNARY
(
AbsStruct
);
38
NON_PARAMETRIC_UNARY
(
SgnStruct
);
39
NON_PARAMETRIC_UNARY
(
ExpStruct
);
40
NON_PARAMETRIC_UNARY
(
LogStruct
);
41
NON_PARAMETRIC_UNARY
(
SinStruct
);
42
NON_PARAMETRIC_UNARY
(
CosStruct
);
43
NON_PARAMETRIC_UNARY
(
TanStruct
);
44
NON_PARAMETRIC_UNARY
(
MinusStruct
);
45
46
#define NON_PARAMETRIC_BINARY(FUN) \
47
template <typename A, typename B> \
48
struct Parametric<FUN<A, B> > { \
49
static const int value = Parametric<A>::value || Parametric<A>::value; \
50
}
51
52
NON_PARAMETRIC_BINARY
(
SumStruct
);
53
NON_PARAMETRIC_BINARY
(
ProductStruct
);
54
NON_PARAMETRIC_BINARY
(
RatioStruct
);
55
NON_PARAMETRIC_BINARY
(
PowerStruct
);
56
57
#undef NON_PARAMETRIC_UNARY
58
#undef NON_PARAMETRIC_BINARY
59
60
}
// namespace funct
61
62
#endif
funct::ExpStruct
Definition:
Exp.h:9
Fraction.h
funct
Definition:
Abs.h:5
Operations.h
NON_PARAMETRIC_BINARY
#define NON_PARAMETRIC_BINARY(FUN)
Definition:
ParametricTrait.h:46
funct::SinStruct
Definition:
Sin.h:9
Functions.h
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
funct::PowerStruct
Definition:
Power.h:7
funct::Parametric
Definition:
ParametricTrait.h:11
funct::Numerical
Definition:
Numerical.h:7
funct::CosStruct
Definition:
Cos.h:9
funct::FractionStruct
Definition:
Fraction.h:11
value
Definition:
value.py:1
funct::TanStruct
Definition:
Tan.h:8
funct::ProductStruct
Definition:
Product.h:6
funct::SumStruct
Definition:
Sum.h:7
funct::MinusStruct
Definition:
Minus.h:7
funct::m
m
Definition:
Factorize.h:45
NON_PARAMETRIC_UNARY
#define NON_PARAMETRIC_UNARY(FUN)
Definition:
ParametricTrait.h:31
funct::RatioStruct
Definition:
Ratio.h:6
funct::AbsStruct
Definition:
Abs.h:8
funct::SgnStruct
Definition:
Sgn.h:7
funct::LogStruct
Definition:
Log.h:9
Generated for CMSSW Reference Manual by
1.8.14