CMS 3D CMS Logo

Namespaces | Functions

/data/refman/pasoursint/CMSSW_5_3_3/src/FWCore/PythonParameterSet/src/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

namespace  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
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, int argc, char *argv[])
 same, but with arguments
boost::shared_ptr< ParameterSetedm::readConfig (std::string const &config)
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().

                                                                               {
  std::string initCommand("from FWCore.ParameterSet.Types import makeCppPSet\n"
                          "execfile('");
  initCommand += fileName + "')";

  handle<>(PyRun_String(initCommand.c_str(),
                        Py_file_input,
                        mainNamespace.ptr(),
                        mainNamespace.ptr()));
  std::string command("makeCppPSet(locals(), topPSet)");
  handle<>(PyRun_String(command.c_str(),
                        Py_eval_input,
                        mainNamespace.ptr(),
                        mainNamespace.ptr()));
}
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().

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