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;
57 }
catch (pybind11::error_already_set
const&
e) {
60 retVal = std::make_unique<edm::ParameterSet>(
ParameterSet(theProcessPSet.
pset()));
void initializePyBind11Module()
void pythonToCppException(const std::string &iType, const std::string &error)
static void makePSetsFromString(std::string const &module)
std::enable_if< std::is_same< data_T, ap_uint< 1 > >::value &&std::is_same< typename CONFIG_T::weight_t, ap_uint< 1 > >::value, ap_int< nnet::ceillog2(CONFIG_T::n_in)+2 > >::type cast(typename CONFIG_T::accum_t x)
edm::ParameterSet & pset()
std::unique_ptr< edm::ParameterSet > parameterSet() const
static void makePSetsFromFile(std::string const &fileName)
std::unique_ptr< ParameterSet > readPSetsFrom(std::string const &fileOrString)
cond::Hash import(Session &source, const cond::Hash &sourcePayloadId, const std::string &inputTypeName, const void *inputPtr, Session &destination)
std::unique_ptr< ParameterSet > readConfig(std::string const &config)
void makeParameterSets(std::string const &configtext, std::unique_ptr< ParameterSet > &main)
essentially the same as the previous method