Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CommonTools
Utils
src
FunctionSetter.h
Go to the documentation of this file.
1
#ifndef CommonTools_Utils_FunctionSetter_h
2
#define CommonTools_Utils_FunctionSetter_h
3
/* \class reco::parser::FunctionSetter
4
*
5
* Function setter
6
*
7
* \author Luca Lista, INFN
8
*
9
* \version $Revision: 1.2 $
10
*
11
*/
12
#include "
CommonTools/Utils/src/Function.h
"
13
#include "
CommonTools/Utils/src/FunctionStack.h
"
14
15
namespace
reco
{
16
namespace
parser
{
17
struct
FunctionSetter
{
18
FunctionSetter
(
Function
fun,
FunctionStack
&
stack
):
19
fun_
(fun),
stack_
(stack) {}
20
21
void
operator()
(
const
char
*,
const
char
*)
const
{
22
#ifdef BOOST_SPIRIT_DEBUG
23
BOOST_SPIRIT_DEBUG_OUT <<
"pushing math function: "
<< functionNames[
fun_
] << std::endl;
24
#endif
25
stack_
.push_back(
fun_
);
26
}
27
private
:
28
Function
fun_
;
29
FunctionStack
&
stack_
;
30
};
31
32
struct
FunctionSetterCommit
{
33
FunctionSetterCommit
(
FunctionStack
& stackFrom,
FunctionStack
& stackTo):
34
from_
(stackFrom),
to_
(stackTo) {}
35
void
operator()
(
const
char
&)
const
{
36
to_
.push_back(
from_
.back());
37
from_
.clear();
38
}
39
private
:
40
FunctionStack
&
from_
;
41
FunctionStack
&
to_
;
42
};
43
}
44
}
45
46
#endif
geometryXMLtoCSV.parser
tuple parser
Definition:
geometryXMLtoCSV.py:78
reco::parser::Function
Function
Definition:
Function.h:18
Function.h
FunctionStack.h
reco::parser::FunctionSetterCommit::to_
FunctionStack & to_
Definition:
FunctionSetter.h:41
reco::parser::FunctionSetterCommit::from_
FunctionStack & from_
Definition:
FunctionSetter.h:40
reco::parser::FunctionSetter::FunctionSetter
FunctionSetter(Function fun, FunctionStack &stack)
Definition:
FunctionSetter.h:18
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:105
reco::parser::FunctionSetter::stack_
FunctionStack & stack_
Definition:
FunctionSetter.h:29
svgfig.stack
stack
Definition:
svgfig.py:558
reco::parser::FunctionSetterCommit
Definition:
FunctionSetter.h:32
reco::parser::FunctionSetterCommit::FunctionSetterCommit
FunctionSetterCommit(FunctionStack &stackFrom, FunctionStack &stackTo)
Definition:
FunctionSetter.h:33
reco::parser::FunctionSetter::operator()
void operator()(const char *, const char *) const
Definition:
FunctionSetter.h:21
reco::parser::FunctionSetter::fun_
Function fun_
Definition:
FunctionSetter.h:28
reco::parser::FunctionSetterCommit::operator()
void operator()(const char &) const
Definition:
FunctionSetter.h:35
reco::parser::FunctionSetter
Definition:
FunctionSetter.h:17
reco::parser::FunctionStack
std::vector< Function > FunctionStack
Definition:
FunctionStack.h:17
Generated for CMSSW Reference Manual by
1.8.5