test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
Utils
interface
ExpressionEvaluator.h
Go to the documentation of this file.
1
#ifndef CommonToolsUtilsExpressionEvaluator_H
2
#define CommonToolsUtilsExpressionEvaluator_H
3
4
5
#include<string>
6
7
namespace
reco
{
8
9
class
ExpressionEvaluator
{
10
public
:
11
ExpressionEvaluator
(
const
char
* pkg,
const
char
* iname,
const
std::string
& iexpr);
12
~ExpressionEvaluator
();
13
14
template
<
typename
EXPR,
typename
... CArgs>
15
EXPR *
expr
()
const
{
16
typedef
EXPR * factoryP();
17
return
reinterpret_cast<
factoryP*
>
(
m_expr
)();
18
}
19
20
private
:
21
22
std::string
m_name
;
23
void
*
m_expr
;
24
};
25
26
27
template
<
typename
EXPR>
28
EXPR *
expressionEvaluator
(
const
char
* pkg,
const
char
* iname,
const
std::string
& iexpr) {
29
ExpressionEvaluator
ee(pkg, iname,iexpr);
30
return
ee.
expr
<EXPR>();
31
}
32
33
}
34
35
#define SINGLE_ARG(...) __VA_ARGS__
36
#define RECO_XSTR(...) RECO_STR(__VA_ARGS__)
37
#define RECO_STR(...) #__VA_ARGS__
38
#define reco_expressionEvaluator(pkg, EXPR, iexpr) reco::expressionEvaluator<EXPR>(pkg,RECO_XSTR(EXPR),iexpr)
39
40
#endif // CommonToolsUtilsExpressionEvaluator_H
41
reco::ExpressionEvaluator::m_expr
void * m_expr
Definition:
ExpressionEvaluator.h:23
reco::ExpressionEvaluator::expr
EXPR * expr() const
Definition:
ExpressionEvaluator.h:15
reco::expressionEvaluator
EXPR * expressionEvaluator(const char *pkg, const char *iname, const std::string &iexpr)
Definition:
ExpressionEvaluator.h:28
reco::ExpressionEvaluator::ExpressionEvaluator
ExpressionEvaluator(const char *pkg, const char *iname, const std::string &iexpr)
Definition:
ExpressionEvaluator.cc:54
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
reco::ExpressionEvaluator::m_name
std::string m_name
Definition:
ExpressionEvaluator.h:22
reco::ExpressionEvaluator::~ExpressionEvaluator
~ExpressionEvaluator()
Definition:
ExpressionEvaluator.cc:155
reco::ExpressionEvaluator
Definition:
ExpressionEvaluator.h:9
Generated for CMSSW Reference Manual by
1.8.5