7 #include <pybind11/embed.h>
11 "from FWCore.ParameterSet.Types import makeCppPSet\n"
13 initCommand +=
fileName +
"').read())";
14 pybind11::exec(initCommand);
15 pybind11::exec(
"makeCppPSet(locals(), topPSet)");
20 command +=
"\nfrom FWCore.ParameterSet.Types import makeCppPSet\nmakeCppPSet(locals(), topPSet)";
25 namespace cmspybind11 {
42 pybind11::scoped_interpreter guard{};
44 std::unique_ptr<ParameterSet> retVal;
48 mainModule.attr(
"topPSet") = pybind11::cast(&theProcessPSet);
57 }
catch (pybind11::error_already_set
const&
e) {
60 retVal = std::make_unique<edm::ParameterSet>(
ParameterSet(theProcessPSet.
pset()));