1 #ifndef FWCore_PythonParameterSet_PythonModule_h
2 #define FWCore_PythonParameterSet_PythonModule_h
29 PyErr_SetString(PyExc_RuntimeError, ex.
message().c_str());
35 boost::python::register_exception_translator<cms::Exception>(translator);
37 boost::python::class_<edm::InputTag>(
"InputTag", boost::python::init<std::string>())
38 .def(boost::python::init<std::string, std::string, std::string>())
39 .def(boost::python::init<std::string, std::string>())
40 .def(
"label", &
edm::InputTag::label, boost::python::return_value_policy<boost::python::copy_const_reference>())
41 .def(
"instance", &
edm::InputTag::instance, boost::python::return_value_policy<boost::python::copy_const_reference>())
42 .def(
"process", &
edm::InputTag::process, boost::python::return_value_policy<boost::python::copy_const_reference>())
45 boost::python::class_<edm::ESInputTag>(
"ESInputTag", boost::python::init<std::string>())
46 .def(boost::python::init<std::string, std::string>())
47 .def(
"module", &
edm::ESInputTag::module, boost::python::return_value_policy<boost::python::copy_const_reference>())
48 .def(
"data", &
edm::ESInputTag::data, boost::python::return_value_policy<boost::python::copy_const_reference>())
51 boost::python::class_<edm::EventID>(
"EventID", boost::python::init<unsigned int, unsigned int, unsigned int>())
57 boost::python::class_<edm::LuminosityBlockID>(
"LuminosityBlockID", boost::python::init<unsigned int, unsigned int>())
62 boost::python::class_<edm::FileInPath>(
"FileInPath", boost::python::init<std::string>())
68 boost::python::class_<edm::LuminosityBlockRange>(
"LuminosityBlockRange", boost::python::init<unsigned int, unsigned int, unsigned int, unsigned int>())
75 boost::python::class_<edm::EventRange>(
"EventRange", boost::python::init<unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int>())
84 boost::python::class_<PythonParameterSet>(
"ParameterSet")
85 .
def(
"addInt32", &PythonParameterSet::addParameter<int>)
86 .def(
"getInt32", &PythonParameterSet::getParameter<int>)
87 .def(
"addVInt32", &PythonParameterSet::addParameters<int>)
88 .def(
"getVInt32", &PythonParameterSet::getParameters<int>)
89 .def(
"addUInt32", &PythonParameterSet::addParameter<unsigned int>)
90 .def(
"getUInt32", &PythonParameterSet::getParameter<unsigned int>)
91 .def(
"addVUInt32", &PythonParameterSet::addParameters<unsigned int>)
92 .def(
"getVUInt32", &PythonParameterSet::getParameters<unsigned int>)
93 .def(
"addInt64", &PythonParameterSet::addParameter<long long>)
94 .def(
"getInt64", &PythonParameterSet::getParameter<long long>)
95 .def(
"addUInt64", &PythonParameterSet::addParameter<unsigned long long>)
96 .def(
"getUInt64", &PythonParameterSet::getParameter<unsigned long long>)
97 .def(
"addVInt64", &PythonParameterSet::addParameters<long long>)
98 .def(
"getVInt64", &PythonParameterSet::getParameters<long long>)
99 .def(
"addVUInt64", &PythonParameterSet::addParameters<unsigned long long>)
100 .def(
"getVUInt64", &PythonParameterSet::getParameters<unsigned long long>)
101 .def(
"addDouble", &PythonParameterSet::addParameter<double>)
102 .def(
"getDouble", &PythonParameterSet::getParameter<double>)
103 .def(
"addVDouble", &PythonParameterSet::addParameters<double>)
104 .def(
"getVDouble", &PythonParameterSet::getParameters<double>)
105 .def(
"addBool", &PythonParameterSet::addParameter<bool>)
106 .def(
"getBool", &PythonParameterSet::getParameter<bool>)
107 .def(
"addString", &PythonParameterSet::addParameter<std::string>)
108 .def(
"getString", &PythonParameterSet::getParameter<std::string>)
109 .def(
"addVString", &PythonParameterSet::addParameters<std::string>)
110 .def(
"getVString", &PythonParameterSet::getParameters<std::string>)
111 .def(
"addInputTag", &PythonParameterSet::addParameter<edm::InputTag>)
112 .def(
"getInputTag", &PythonParameterSet::getParameter<edm::InputTag>)
113 .def(
"addVInputTag", &PythonParameterSet::addParameters<edm::InputTag>)
114 .def(
"getVInputTag", &PythonParameterSet::getParameters<edm::InputTag>)
115 .def(
"addESInputTag", &PythonParameterSet::addParameter<edm::ESInputTag>)
116 .def(
"getESInputTag", &PythonParameterSet::getParameter<edm::ESInputTag>)
117 .def(
"addVESInputTag", &PythonParameterSet::addParameters<edm::ESInputTag>)
118 .def(
"getVESInputTag", &PythonParameterSet::getParameters<edm::ESInputTag>)
119 .def(
"addEventID", &PythonParameterSet::addParameter<edm::EventID>)
120 .def(
"getEventID", &PythonParameterSet::getParameter<edm::EventID>)
121 .def(
"addVEventID", &PythonParameterSet::addParameters<edm::EventID>)
122 .def(
"getVEventID", &PythonParameterSet::getParameters<edm::EventID>)
123 .def(
"addLuminosityBlockID", &PythonParameterSet::addParameter<edm::LuminosityBlockID>)
124 .def(
"getLuminosityBlockID", &PythonParameterSet::getParameter<edm::LuminosityBlockID>)
125 .def(
"addVLuminosityBlockID", &PythonParameterSet::addParameters<edm::LuminosityBlockID>)
126 .def(
"getVLuminosityBlockID", &PythonParameterSet::getParameters<edm::LuminosityBlockID>)
127 .def(
"addLuminosityBlockRange", &PythonParameterSet::addParameter<edm::LuminosityBlockRange>)
128 .def(
"getLuminosityBlockRange", &PythonParameterSet::getParameter<edm::LuminosityBlockRange>)
129 .def(
"addVLuminosityBlockRange", &PythonParameterSet::addParameters<edm::LuminosityBlockRange>)
130 .def(
"getVLuminosityBlockRange", &PythonParameterSet::getParameters<edm::LuminosityBlockRange>)
131 .def(
"addEventRange", &PythonParameterSet::addParameter<edm::EventRange>)
132 .def(
"getEventRange", &PythonParameterSet::getParameter<edm::EventRange>)
133 .def(
"addVEventRange", &PythonParameterSet::addParameters<edm::EventRange>)
134 .def(
"getVEventRange", &PythonParameterSet::getParameters<edm::EventRange>)
139 .def(
"addFileInPath", &PythonParameterSet::addParameter<edm::FileInPath>)
140 .def(
"getFileInPath", &PythonParameterSet::getParameter<edm::FileInPath>)
152 boost::python::class_<PythonProcessDesc>(
"ProcessDesc", boost::python::init<>())
153 .def(boost::python::init<std::string>())
EventNumber_t event() const
int def(FILE *, FILE *, int)
edm::EventID newEventID(unsigned int run, unsigned int lumi, unsigned int event)
bool isLocal() const
Was the file found under the "local" area?
PythonParameterSet getPSet(bool tracked, std::string const &name) const
LumiNumber_t startLumi() const
PythonParameterSet newPSet() const
std::string message() const
RunNumber_t startRun() const
std::string relativePath() const
LuminosityBlockNumber_t luminosityBlock() const
LuminosityBlockNumber_t startLumi() const
RunNumber_t endRun() const
EventNumber_t endEvent() const
boost::python::list getVPSet(bool tracked, std::string const &name)
edm::LuminosityBlockID newLuminosityBlockID(unsigned int run, unsigned int lumi)
edm::ESInputTag newESInputTag(std::string const &module, std::string const &data)
edm::EventRange newEventRange(unsigned int start, unsigned int startLumi, unsigned int startSub, unsigned int end, unsigned int endLumi, unsigned int endSub)
void addPSet(bool tracked, std::string const &name, PythonParameterSet const &ppset)
LumiNumber_t endLumi() const
edm::LuminosityBlockRange newLuminosityBlockRange(unsigned int start, unsigned int startSub, unsigned int end, unsigned int endSub)
RunNumber_t startRun() const
edm::InputTag newInputTag(std::string const &label, std::string const &instance, std::string const &process)
EventNumber_t startEvent() const
LuminosityBlockNumber_t luminosityBlock() const
void addNewFileInPath(bool tracked, std::string const &name, std::string const &value)
void addVPSet(bool tracked, std::string const &name, boost::python::list value)
BOOST_PYTHON_MODULE(pluginEcalPyUtils)
RunNumber_t endRun() const
LuminosityBlockNumber_t endLumi() const
std::string fullPath() const
PythonParameterSet newPSet() const