FWCore
PythonParameterSet
interface
PyBind11ProcessDesc.h
Go to the documentation of this file.
1
#ifndef FWCore_PyBind11ParameterSet_PyBind11ProcessDesc_h
2
#define FWCore_PyBind11ParameterSet_PyBind11ProcessDesc_h
3
4
#include "
FWCore/PythonParameterSet/interface/Python11ParameterSet.h
"
5
6
#include <memory>
7
#include <string>
8
#include <vector>
9
10
namespace
edm
{
11
class
ParameterSet
;
12
class
ProcessDesc;
13
}
// namespace edm
14
15
class
PyBind11InterpreterSentry
{
16
public
:
17
PyBind11InterpreterSentry
(
bool
ownsInterpreter);
18
~PyBind11InterpreterSentry
();
19
20
pybind11::object
mainModule
;
21
22
private
:
23
bool
const
ownsInterpreter_
;
24
};
25
26
class
PyBind11ProcessDesc
{
27
public
:
28
PyBind11ProcessDesc
();
36
PyBind11ProcessDesc
(
std::string
const
&
config
);
37
38
PyBind11ProcessDesc
(
std::string
const
&
config
,
int
argc
,
char
*
argv
[]);
39
40
~PyBind11ProcessDesc
();
41
42
Python11ParameterSet
newPSet
()
const
{
return
Python11ParameterSet
(); }
43
44
Python11ParameterSet
&
pset
() {
return
theProcessPSet
; }
45
46
std::string
dump
()
const
;
47
48
// makes a new (copy) of the ParameterSet
49
std::unique_ptr<edm::ParameterSet>
parameterSet
()
const
;
50
51
// makes a new (copy) of a ProcessDesc
52
// For backward compatibility only. Remove when no longer needed.
53
std::unique_ptr<edm::ProcessDesc>
processDesc
()
const
;
54
55
private
:
56
void
prepareToRead
();
57
void
read
(
std::string
const
&
config
);
58
void
readFile
(
std::string
const
&
fileName
);
59
void
readString
(
std::string
const
& pyConfig);
60
61
Python11ParameterSet
theProcessPSet
;
62
PyBind11InterpreterSentry
theInterpreter
;
63
};
64
65
#endif
PyBind11InterpreterSentry
Definition:
PyBind11ProcessDesc.h:15
PyBind11InterpreterSentry::mainModule
pybind11::object mainModule
Definition:
PyBind11ProcessDesc.h:20
PyBind11ProcessDesc::~PyBind11ProcessDesc
~PyBind11ProcessDesc()
ParameterSet
Definition:
Functions.h:16
PyBind11ProcessDesc::theProcessPSet
Python11ParameterSet theProcessPSet
Definition:
PyBind11ProcessDesc.h:61
PyBind11ProcessDesc::dump
std::string dump() const
Definition:
PyBind11ProcessDesc.cc:101
PyBind11ProcessDesc::parameterSet
std::unique_ptr< edm::ParameterSet > parameterSet() const
Definition:
PyBind11ProcessDesc.cc:97
config
Definition:
config.py:1
PyBind11ProcessDesc::theInterpreter
PyBind11InterpreterSentry theInterpreter
Definition:
PyBind11ProcessDesc.h:62
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
PyBind11ProcessDesc::readFile
void readFile(std::string const &fileName)
Definition:
PyBind11ProcessDesc.cc:85
PyBind11InterpreterSentry::PyBind11InterpreterSentry
PyBind11InterpreterSentry(bool ownsInterpreter)
Definition:
PyBind11ProcessDesc.cc:12
PyBind11InterpreterSentry::~PyBind11InterpreterSentry
~PyBind11InterpreterSentry()
Definition:
PyBind11ProcessDesc.cc:19
Python11ParameterSet.h
PyBind11ProcessDesc::read
void read(std::string const &config)
Definition:
PyBind11ProcessDesc.cc:72
GCPpyPlots.argv
argv
Definition:
GCPpyPlots.py:3
PyBind11ProcessDesc::pset
Python11ParameterSet & pset()
Definition:
PyBind11ProcessDesc.h:44
PyBind11ProcessDesc::readString
void readString(std::string const &pyConfig)
Definition:
PyBind11ProcessDesc.cc:91
PyBind11ProcessDesc
Definition:
PyBind11ProcessDesc.h:26
Python11ParameterSet
Definition:
Python11ParameterSet.h:19
dir2webdir.argc
argc
Definition:
dir2webdir.py:39
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
PyBind11ProcessDesc::prepareToRead
void prepareToRead()
Definition:
PyBind11ProcessDesc.cc:65
edm
HLT enums.
Definition:
AlignableModifier.h:19
PyBind11InterpreterSentry::ownsInterpreter_
bool const ownsInterpreter_
Definition:
PyBind11ProcessDesc.h:23
PyBind11ProcessDesc::newPSet
Python11ParameterSet newPSet() const
Definition:
PyBind11ProcessDesc.h:42
resolutioncreator_cfi.object
object
Definition:
resolutioncreator_cfi.py:4
PyBind11ProcessDesc::PyBind11ProcessDesc
PyBind11ProcessDesc()
Definition:
PyBind11ProcessDesc.cc:26
PyBind11ProcessDesc::processDesc
std::unique_ptr< edm::ProcessDesc > processDesc() const
Definition:
PyBind11ProcessDesc.cc:108
Generated for CMSSW Reference Manual by
1.8.14