#include "FWCore/ParameterSet/interface/PythonParseTree.h"
#include "FWCore/ParameterSet/interface/PythonParameterSet.h"
#include "FWCore/ParameterSet/interface/PythonProcessDesc.h"
#include "DataFormats/Provenance/interface/EventID.h"
#include <boost/python.hpp>
#include <boost/cstdint.hpp>
Go to the source code of this file.
Functions | |
BOOST_PYTHON_MODULE (libFWCoreParameterSet) |
BOOST_PYTHON_MODULE | ( | libFWCoreParameterSet | ) |
Definition at line 12 of file PythonModule.h.
References PythonParameterSet::addNewFileInPath(), PythonParameterSet::addPSet(), PythonProcessDesc::addService(), PythonParameterSet::addVPSet(), PythonParseTree::children(), PythonParseTree::dump(), PythonParameterSet::dump(), PythonProcessDesc::dump(), PythonParseTree::dumpTree(), edm::EventID::event(), PythonParseTree::exceptionTranslator(), edm::FileInPath::fullPath(), PythonParameterSet::getPSet(), PythonParameterSet::getVPSet(), edm::InputTag::instance(), edm::FileInPath::isLocal(), edm::InputTag::label(), edm::LuminosityBlockID::luminosityBlock(), PythonParseTree::modules(), PythonParseTree::modulesOfType(), PythonParameterSet::newEventID(), PythonParameterSet::newInputTag(), PythonParameterSet::newLuminosityBlockID(), PythonProcessDesc::newPSet(), PythonParameterSet::newPSet(), PythonParseTree::process(), edm::InputTag::process(), edm::FileInPath::relativePath(), PythonParseTree::replaceValue(), PythonParseTree::replaceValues(), edm::LuminosityBlockID::run(), edm::EventID::run(), PythonParseTree::typeOf(), PythonParseTree::value(), and PythonParseTree::values().
00013 { 00014 class_<edm::InputTag>("InputTag", init<std::string>()) 00015 .def(init<std::string, std::string, std::string>()) 00016 .def(init<std::string, std::string>()) 00017 .def("label", &edm::InputTag::label, return_value_policy<copy_const_reference>()) 00018 .def("instance", &edm::InputTag::instance, return_value_policy<copy_const_reference>()) 00019 .def("process", &edm::InputTag::process, return_value_policy<copy_const_reference>()) 00020 ; 00021 00022 class_<edm::EventID>("EventID", init<unsigned int, unsigned int>()) 00023 .def("run", &edm::EventID::run) 00024 .def("event", &edm::EventID::event) 00025 ; 00026 00027 class_<edm::LuminosityBlockID>("LuminosityBlockID", init<unsigned int, unsigned int>()) 00028 .def("run", &edm::LuminosityBlockID::run) 00029 .def("luminosityBlock", &edm::LuminosityBlockID::luminosityBlock) 00030 ; 00031 00032 class_<edm::FileInPath>("FileInPath", init<std::string>()) 00033 .def("fullPath", &edm::FileInPath::fullPath) 00034 .def("relativePath", &edm::FileInPath::relativePath) 00035 .def("isLocal", &edm::FileInPath::isLocal) 00036 ; 00037 00038 00039 class_<PythonParseTree>("PythonParseTree", init<std::string>()) 00040 .def("modules", &PythonParseTree::modules) 00041 .def("modulesOfType", &PythonParseTree::modulesOfType) 00042 .def("process", &PythonParseTree::process) 00043 .def("replaceValue", &PythonParseTree::replaceValue) 00044 .def("replaceValues", &PythonParseTree::replaceValues) 00045 .def("dump", &PythonParseTree::dump) 00046 .def("typeOf", &PythonParseTree::typeOf) 00047 .def("value", &PythonParseTree::value) 00048 .def("values", &PythonParseTree::values) 00049 .def("children", &PythonParseTree::children) 00050 .def("dumpTree", &PythonParseTree::dumpTree) 00051 ; 00052 00053 class_<PythonParameterSet>("ParameterSet") 00054 .def("addInt32", &PythonParameterSet::addParameter<int>) 00055 .def("getInt32", &PythonParameterSet::getParameter<int>) 00056 .def("addVInt32", &PythonParameterSet::addParameters<int>) 00057 .def("getVInt32", &PythonParameterSet::getParameters<int>) 00058 .def("addUInt32", &PythonParameterSet::addParameter<unsigned int>) 00059 .def("getUInt32", &PythonParameterSet::getParameter<unsigned int>) 00060 .def("addVUInt32", &PythonParameterSet::addParameters<unsigned int>) 00061 .def("getVUInt32", &PythonParameterSet::getParameters<unsigned int>) 00062 .def("addInt64", &PythonParameterSet::addParameter<boost::int64_t>) 00063 .def("getInt64", &PythonParameterSet::getParameter<boost::int64_t>) 00064 .def("addUInt64", &PythonParameterSet::addParameter<boost::uint64_t>) 00065 .def("getUInt64", &PythonParameterSet::getParameter<boost::uint64_t>) 00066 .def("addVInt64", &PythonParameterSet::addParameters<boost::int64_t>) 00067 .def("getVInt64", &PythonParameterSet::getParameters<boost::int64_t>) 00068 .def("addVUInt64", &PythonParameterSet::addParameters<boost::uint64_t>) 00069 .def("getVUInt64", &PythonParameterSet::getParameters<boost::uint64_t>) 00070 .def("addDouble", &PythonParameterSet::addParameter<double>) 00071 .def("getDouble", &PythonParameterSet::getParameter<double>) 00072 .def("addVDouble", &PythonParameterSet::addParameters<double>) 00073 .def("getVDouble", &PythonParameterSet::getParameters<double>) 00074 .def("addBool", &PythonParameterSet::addParameter<bool>) 00075 .def("getBool", &PythonParameterSet::getParameter<bool>) 00076 .def("addString", &PythonParameterSet::addParameter<std::string>) 00077 .def("getString", &PythonParameterSet::getParameter<std::string>) 00078 .def("addVString", &PythonParameterSet::addParameters<std::string>) 00079 .def("getVString", &PythonParameterSet::getParameters<std::string>) 00080 .def("addInputTag", &PythonParameterSet::addParameter<edm::InputTag>) 00081 .def("getInputTag", &PythonParameterSet::getParameter<edm::InputTag>) 00082 .def("addVInputTag", &PythonParameterSet::addParameters<edm::InputTag>) 00083 .def("getVInputTag", &PythonParameterSet::getParameters<edm::InputTag>) 00084 .def("addEventID", &PythonParameterSet::addParameter<edm::EventID>) 00085 .def("getEventID", &PythonParameterSet::getParameter<edm::EventID>) 00086 .def("addVEventID", &PythonParameterSet::addParameters<edm::EventID>) 00087 .def("getVEventID", &PythonParameterSet::getParameters<edm::EventID>) 00088 .def("addLuminosityBlockID", &PythonParameterSet::addParameter<edm::LuminosityBlockID>) 00089 .def("getLuminosityBlockID", &PythonParameterSet::getParameter<edm::LuminosityBlockID>) 00090 .def("addVLuminosityBlockID", &PythonParameterSet::addParameters<edm::LuminosityBlockID>) 00091 .def("getVLuminosityBlockID", &PythonParameterSet::getParameters<edm::LuminosityBlockID>) 00092 .def("addPSet", &PythonParameterSet::addPSet) 00093 .def("getPSet", &PythonParameterSet::getPSet) 00094 .def("addVPSet", &PythonParameterSet::addVPSet) 00095 .def("getVPSet", &PythonParameterSet::getVPSet) 00096 .def("addFileInPath", &PythonParameterSet::addParameter<edm::FileInPath>) 00097 .def("getFileInPath", &PythonParameterSet::getParameter<edm::FileInPath>) 00098 .def("newInputTag", &PythonParameterSet::newInputTag) 00099 .def("newEventID", &PythonParameterSet::newEventID) 00100 .def("newLuminosityBlockID", &PythonParameterSet::newLuminosityBlockID) 00101 .def("addNewFileInPath", &PythonParameterSet::addNewFileInPath) 00102 .def("newPSet", &PythonParameterSet::newPSet) 00103 .def("dump", &PythonParameterSet::dump) 00104 ; 00105 00106 00107 class_<PythonProcessDesc>("ProcessDesc", init<>()) 00108 .def(init<std::string>()) 00109 .def("addService", &PythonProcessDesc::addService) 00110 .def("newPSet", &PythonProcessDesc::newPSet) 00111 .def("dump", &PythonProcessDesc::dump) 00112 ; 00113 00114 register_exception_translator<edm::Exception>(PythonParseTree::exceptionTranslator); 00115 }