#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
#include <boost/python/args.hpp>
#include <boost/python/tuple.hpp>
#include <boost/python/class.hpp>
#include <boost/python/overloads.hpp>
#include <boost/python/raw_function.hpp>
#include <boost/python/return_internal_reference.hpp>
#include <boost/python/exception_translator.hpp>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/GenericHandle.h"
#include "FWCore/Python/src/EventWrapper.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "Rtypes.h"
#include "TClass.h"
Go to the source code of this file.
Namespaces | |
namespace | PyROOT |
Functions | |
PyObject * | PyROOT::BindRootObject (void *object, TClass *klass, Bool_t isRef=kFALSE) |
BOOST_PYTHON_MODULE (libFWCorePython) | |
static void | exceptionTranslation (cms::Exception const &iException) |
PyObject * | getFromHandle (const edm::GenericHandle &iHandle) |
Variables | |
void(edm::python::ConstEventWrapper::* | getByLabel1 )(std::string const &, edm::GenericHandle &) const = &edm::python::ConstEventWrapper::getByLabel |
void(edm::python::ConstEventWrapper::* | getByLabel2 )(std::string const &, std::string const &, edm::GenericHandle &) const = &edm::python::ConstEventWrapper::getByLabel |
BOOST_PYTHON_MODULE | ( | libFWCorePython | ) |
Definition at line 57 of file PyModule.cc.
References exceptionTranslation(), getByLabel1, getByLabel2, and getFromHandle().
00058 { 00059 register_exception_translator< cms::Exception >(exceptionTranslation); 00060 00061 class_<edm::python::ConstEventWrapper>("ConstEvent",no_init) 00062 .def("getByLabel",getByLabel1) 00063 .def("getByLabel",getByLabel2); 00064 00065 class_<edm::GenericHandle>("Handle",init<std::string>()) 00066 .def("get",getFromHandle); 00067 }
static void exceptionTranslation | ( | cms::Exception const & | iException | ) | [static] |
Definition at line 51 of file PyModule.cc.
References cms::Exception::what().
Referenced by BOOST_PYTHON_MODULE().
PyObject* @7647::getFromHandle | ( | const edm::GenericHandle & | iHandle | ) | [static] |
Definition at line 38 of file PyModule.cc.
References PyROOT::BindRootObject(), dbtoconf::object, edm::Handle< GenericObject >::product(), and edm::Handle< GenericObject >::type().
Referenced by BOOST_PYTHON_MODULE().
00039 { 00040 if(0 == iHandle.product() ) { 00041 boost::python::object null; 00042 return null.ptr(); 00043 } 00044 return PyROOT::BindRootObject( iHandle.product()->Address(), TClass::GetClass(iHandle.type().TypeInfo())); 00045 }
void(edm::python::ConstEventWrapper::* getByLabel1)(std::string const &, edm::GenericHandle &) const = &edm::python::ConstEventWrapper::getByLabel [static] |
Referenced by BOOST_PYTHON_MODULE().
void(edm::python::ConstEventWrapper::* getByLabel2)(std::string const &, std::string const &, edm::GenericHandle &) const = &edm::python::ConstEventWrapper::getByLabel [static] |
Referenced by BOOST_PYTHON_MODULE().