CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions
MakeParameterSets.cc File Reference
#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/PythonParameterSet/interface/PythonParameterSet.h"
#include "FWCore/PythonParameterSet/interface/PythonProcessDesc.h"
#include "FWCore/PythonParameterSet/src/initializeModule.h"

Go to the source code of this file.

Namespaces

 edm
 A PluginFactory for concrete instances of class KalmanAlignmentMetricsUpdator.
 

Functions

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

Function Documentation

static void makePSetsFromFile ( std::string const &  fileName,
boost::python::object &  mainNamespace 
)
static

Definition at line 12 of file MakeParameterSets.cc.

References edmPickEvents::command.

Referenced by edm::readPSetsFrom().

12  {
13  std::string initCommand("from FWCore.ParameterSet.Types import makeCppPSet\n"
14  "execfile('");
15  initCommand += fileName + "')";
16 
17  handle<>(PyRun_String(initCommand.c_str(),
18  Py_file_input,
19  mainNamespace.ptr(),
20  mainNamespace.ptr()));
21  std::string command("makeCppPSet(locals(), topPSet)");
22  handle<>(PyRun_String(command.c_str(),
23  Py_eval_input,
24  mainNamespace.ptr(),
25  mainNamespace.ptr()));
26 }
static void makePSetsFromString ( std::string const &  module,
boost::python::object &  mainNamespace 
)
static

Definition at line 30 of file MakeParameterSets.cc.

References edmPickEvents::command, and python.rootplot.argparse::module.

Referenced by edm::readPSetsFrom().

30  {
31  std::string command = module;
32  command += "\nfrom FWCore.ParameterSet.Types import makeCppPSet\nmakeCppPSet(locals(), topPSet)";
33  handle<>(PyRun_String(command.c_str(),
34  Py_file_input,
35  mainNamespace.ptr(),
36  mainNamespace.ptr()));
37 }