CMS 3D CMS Logo

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
 HLT enums.
 

Functions

void edm::makeParameterSets (std::string const &configtext, std::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)
 
std::shared_ptr< ParameterSetedm::readConfig (std::string const &config)
 
std::shared_ptr< ParameterSetedm::readConfig (std::string const &config, int argc, char *argv[])
 same, but with arguments More...
 
std::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 mps_check::command, and AlCaHLTBitMon_QueryRunRegistry::string.

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 }
list command
Definition: mps_check.py:23
static void makePSetsFromString ( std::string const &  module,
boost::python::object &  mainNamespace 
)
static

Definition at line 30 of file MakeParameterSets.cc.

References mps_check::command, python.rootplot.argparse::module, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by edm::readPSetsFrom().

30  {
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 }
list command
Definition: mps_check.py:23