src
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
,
bool
isFile
);
37
38
PyBind11ProcessDesc
(
std::string
const
&
config
,
bool
isFile
,
const
std::vector<std::string>&
args
);
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
,
bool
isFile
);
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:93
PyBind11ProcessDesc::parameterSet
std::unique_ptr< edm::ParameterSet > parameterSet() const
Definition:
PyBind11ProcessDesc.cc:89
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:77
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, bool isFile)
Definition:
PyBind11ProcessDesc.cc:66
PyBind11ProcessDesc::pset
Python11ParameterSet & pset()
Definition:
PyBind11ProcessDesc.h:44
PyBind11ProcessDesc::readString
void readString(std::string const &pyConfig)
Definition:
PyBind11ProcessDesc.cc:83
PyBind11ProcessDesc
Definition:
PyBind11ProcessDesc.h:26
Python11ParameterSet
Definition:
Python11ParameterSet.h:19
writedatasetfile.args
args
Definition:
writedatasetfile.py:18
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
PyBind11ProcessDesc::prepareToRead
void prepareToRead()
Definition:
PyBind11ProcessDesc.cc:59
edm
HLT enums.
Definition:
AlignableModifier.h:19
eostools.isFile
def isFile(path)
Definition:
eostools.py:274
PyBind11InterpreterSentry::ownsInterpreter_
bool const ownsInterpreter_
Definition:
PyBind11ProcessDesc.h:23
PyBind11ProcessDesc::newPSet
Python11ParameterSet newPSet() const
Definition:
PyBind11ProcessDesc.h:42
default_text_conditions_cfi.object
object
Definition:
default_text_conditions_cfi.py:8
PyBind11ProcessDesc::PyBind11ProcessDesc
PyBind11ProcessDesc()
Definition:
PyBind11ProcessDesc.cc:26
PyBind11ProcessDesc::processDesc
std::unique_ptr< edm::ProcessDesc > processDesc() const
Definition:
PyBind11ProcessDesc.cc:100
Generated for CMSSW Reference Manual by
1.8.14