CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Functions
MakePyBind11ParameterSets.cc File Reference
#include "FWCore/PythonParameterSet/interface/MakePyBind11ParameterSets.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/PythonParameterSet/interface/Python11ParameterSet.h"
#include "FWCore/PythonParameterSet/interface/PyBind11ProcessDesc.h"
#include "initializePyBind11Module.h"
#include <pybind11/embed.h>

Go to the source code of this file.

Namespaces

 edm
 HLT enums.
 
 edm::cmspybind11
 

Functions

void edm::cmspybind11::makeParameterSets (std::string const &configtext, std::unique_ptr< ParameterSet > &main)
 essentially the same as the previous method More...
 
static void makePSetsFromFile (std::string const &fileName)
 
static void makePSetsFromString (std::string const &module)
 
std::unique_ptr< ParameterSetedm::cmspybind11::readConfig (std::string const &config)
 
std::unique_ptr< ParameterSetedm::cmspybind11::readConfig (std::string const &config, int argc, char *argv[])
 same, but with arguments More...
 
std::unique_ptr< ParameterSetedm::cmspybind11::readPSetsFrom (std::string const &fileOrString)
 

Function Documentation

static void makePSetsFromFile ( std::string const &  fileName)
static

Definition at line 9 of file MakePyBind11ParameterSets.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::cmspybind11::readPSetsFrom().

9  {
10  std::string initCommand(
11  "from FWCore.ParameterSet.Types import makeCppPSet\n"
12  "exec(open('");
13  initCommand += fileName + "').read())";
14  pybind11::exec(initCommand);
15  pybind11::exec("makeCppPSet(locals(), topPSet)");
16 }
static void makePSetsFromString ( std::string const &  module)
static

Definition at line 18 of file MakePyBind11ParameterSets.cc.

References mps_check::command, callgraph::module, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::cmspybind11::readPSetsFrom().

18  {
20  command += "\nfrom FWCore.ParameterSet.Types import makeCppPSet\nmakeCppPSet(locals(), topPSet)";
21  pybind11::exec(command);
22 }
list command
Definition: mps_check.py:25
tuple module
Definition: callgraph.py:69