CMS 3D CMS Logo

Classes | Namespaces | Macros | Functions
Variables.h File Reference
#include "PhysicsTools/Utilities/interface/ParametricTrait.h"
#include <iostream>

Go to the source code of this file.

Classes

struct  funct::DefaultVariable
 
struct  funct::Parametric< DefaultVariable >
 
struct  funct::Parametric< X >
 
struct  funct::Parametric< Y >
 
struct  funct::Parametric< Z >
 
struct  funct::X
 
struct  funct::Y
 
struct  funct::Z
 

Namespaces

 funct
 

Macros

#define DEFINE_INT_VARIABLE(X, NAME)   DEFINE_VARIABLE_T(int, X, NAME)
 
#define DEFINE_VARIABLE(X, NAME)   DEFINE_VARIABLE_T(double, X, NAME)
 
#define DEFINE_VARIABLE_T(T, X, NAME)
 
#define IMPLEMENT_INT_VARIABLE(X)   IMPLEMENT_VARIABLE_T(int, X)
 
#define IMPLEMENT_VARIABLE(X)   IMPLEMENT_VARIABLE_T(double, X)
 
#define IMPLEMENT_VARIABLE_T(T, X)
 

Functions

std::ostream & funct::operator<< (std::ostream &cout, const funct::DefaultVariable &)
 
std::ostream & funct::operator<< (std::ostream &cout, const funct::X &)
 
std::ostream & funct::operator<< (std::ostream &cout, const funct::Y &)
 
std::ostream & funct::operator<< (std::ostream &cout, const funct::Z &)
 

Macro Definition Documentation

◆ DEFINE_INT_VARIABLE

#define DEFINE_INT_VARIABLE (   X,
  NAME 
)    DEFINE_VARIABLE_T(int, X, NAME)

Definition at line 46 of file Variables.h.

◆ DEFINE_VARIABLE

#define DEFINE_VARIABLE (   X,
  NAME 
)    DEFINE_VARIABLE_T(double, X, NAME)

Definition at line 42 of file Variables.h.

◆ DEFINE_VARIABLE_T

#define DEFINE_VARIABLE_T (   T,
  X,
  NAME 
)
Value:
namespace funct { \
struct X { \
typedef T type; \
X() {} \
X(const T& x) { set(x); } \
inline operator T() const { return value; } \
inline T operator()() const { return value; } \
inline static const char* name() { \
static const char* name = NAME; \
return name; \
} \
inline X operator=(const T& x) { \
set(x); \
return *this; \
} \
inline static void set(const T& x) { value = x; } \
\
private: \
static T value; \
}; \
\
inline std::ostream& operator<<(std::ostream& cout, const funct::X&) { return cout << funct::X::name(); } \
} \
\
struct __useless_ignoreme

Definition at line 6 of file Variables.h.

◆ IMPLEMENT_INT_VARIABLE

#define IMPLEMENT_INT_VARIABLE (   X)    IMPLEMENT_VARIABLE_T(int, X)

Definition at line 48 of file Variables.h.

◆ IMPLEMENT_VARIABLE

#define IMPLEMENT_VARIABLE (   X)    IMPLEMENT_VARIABLE_T(double, X)

Definition at line 44 of file Variables.h.

◆ IMPLEMENT_VARIABLE_T

#define IMPLEMENT_VARIABLE_T (   T,
  X 
)
Value:
namespace funct { \
T X::value; \
} \
\
struct __useless_ignoreme

Definition at line 35 of file Variables.h.

X
#define X(str)
Definition: MuonsGrabber.cc:38
gather_cfg.cout
cout
Definition: gather_cfg.py:144
funct::operator<<
std::ostream & operator<<(std::ostream &cout, const Expression &e)
Definition: Expression.h:44
funct::X::name
static const char * name()
Definition: Variables.h:51
funct::X
Definition: Variables.h:51
vertices_cff.x
x
Definition: vertices_cff.py:29
NON_PARAMETRIC
#define NON_PARAMETRIC(FUN)
Definition: ParametricTrait.h:25
funct::type
arg type
Definition: Factorize.h:37
value
Definition: value.py:1
funct::value
static const bool value
Definition: Factorize.h:100
funct::X::value
static double value
Definition: Variables.h:51
T
long double T
Definition: Basic3DVectorLD.h:48
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
funct
Definition: Abs.h:5