CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/FWCore/PythonParameterSet/interface/PythonProcessDesc.h

Go to the documentation of this file.
00001 #ifndef FWCore_PythonParameterSet_PythonProcessDesc_h
00002 #define FWCore_PythonParameterSet_PythonProcessDesc_h
00003 
00004 #include "FWCore/PythonParameterSet/interface/BoostPython.h"
00005 #include "FWCore/PythonParameterSet/interface/PythonParameterSet.h"
00006 
00007 #include "boost/shared_ptr.hpp"
00008 
00009 #include <string>
00010 #include <vector>
00011 
00012 namespace edm {
00013   class ParameterSet;
00014   class ProcessDesc;
00015 }
00016 
00017 class PythonProcessDesc {
00018 public:
00019   PythonProcessDesc();
00027   PythonProcessDesc(std::string const& config);
00028 
00029   PythonProcessDesc(std::string const& config, int argc, char * argv[]);
00030 
00031   PythonParameterSet newPSet() const {return PythonParameterSet();}
00032 
00033   std::string dump() const;
00034 
00035   // makes a new (copy) of the ParameterSet
00036   boost::shared_ptr<edm::ParameterSet> parameterSet();
00037 
00038   // makes a new (copy) of a ProcessDesc
00039   // For backward compatibility only.  Remove when no longer needed.
00040   boost::shared_ptr<edm::ProcessDesc> processDesc();
00041 
00042 private:
00043   void prepareToRead();
00044   void read(std::string const& config);
00045   void readFile(std::string const& fileName);
00046   void readString(std::string const& pyConfig);
00047 
00048   PythonParameterSet theProcessPSet;
00049   boost::python::object theMainModule;
00050   boost::python::object theMainNamespace;
00051 };
00052 
00053 #endif