CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Numerical.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_Numerical_h
2 #define PhysicsTools_Utilities_Numerical_h
3 #include <cassert>
4 namespace funct {
5 
6  template <int n>
7  struct Numerical {
8  Numerical() {}
9  Numerical(int m) { assert(m == n); }
10  static const int value = n;
11  double operator()() const { return n; }
12  operator double() const { return n; }
13  double operator()(double) const { return n; }
14  double operator()(double, double) const { return n; }
15  };
16 
17  template <int n>
18  const Numerical<n>& num() {
19  static Numerical<n> c;
20  return c;
21  }
22 
23 } // namespace funct
24 
25 #endif
double operator()(double, double) const
Definition: Numerical.h:14
const Numerical< n > & num()
Definition: Numerical.h:18
const edm::EventSetup & c
Numerical(int m)
Definition: Numerical.h:9
assert(be >=bs)
static const int value
Definition: Numerical.h:10
double operator()() const
Definition: Numerical.h:11
double operator()(double) const
Definition: Numerical.h:13