CMS 3D CMS Logo

Namespaces | Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/FWCore/PythonParameterSet/src/MakeParameterSets.cc File Reference

#include "FWCore/PythonParameterSet/interface/MakeParameterSets.h"
#include "FWCore/PythonParameterSet/interface/PythonProcessDesc.h"
#include "FWCore/ParameterSet/interface/ProcessDesc.h"
#include "FWCore/PythonParameterSet/interface/PythonParameterSet.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, boost::shared_ptr< std::vector< ParameterSet > > &serviceparams)
 essentially the same as the previous method
static void makePSetsFromFile (const std::string &fileName, boost::python::object &mainNamespace)
static void makePSetsFromString (const std::string &module, boost::python::object &mainNamespace)
boost::shared_ptr
< edm::ProcessDesc
edm::readConfig (const std::string &config, int argc, char *argv[])
 same, but with arguments
boost::shared_ptr
< edm::ProcessDesc
edm::readConfig (const std::string &config)
boost::shared_ptr< ParameterSetedm::readPSetsFrom (const std::string &fileOrString)

Function Documentation

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

Definition at line 13 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 ( const std::string &  module,
boost::python::object &  mainNamespace 
) [static]

Definition at line 33 of file MakeParameterSets.cc.

References edmPickEvents::command, and 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()));
}