CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Namespaces | Functions
PyModule.cc File Reference
#include <boost/python/module.hpp>
#include <boost/python/class.hpp>
#include <boost/python/exception_translator.hpp>
#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

 PyROOT
 

Functions

PyObject * PyROOT::BindRootObject (void *object, TClass *klass, Bool_t isRef=kFALSE)
 
 BOOST_PYTHON_MODULE (libFWCorePython)
 
static void exceptionTranslation (cms::Exception const &iException)
 

Function Documentation

BOOST_PYTHON_MODULE ( libFWCorePython  )

Definition at line 49 of file PyModule.cc.

References def, and exceptionTranslation().

50 {
51  register_exception_translator< cms::Exception >(exceptionTranslation);
52 
53  class_<edm::python::ConstEventWrapper>("ConstEvent",no_init)
54  .def("getByLabel",getByLabel1)
55  .def("getByLabel",getByLabel2);
56 
57  class_<edm::GenericHandle>("Handle",init<std::string>())
58  .def("get",getFromHandle);
59 }
static void exceptionTranslation(cms::Exception const &iException)
Definition: PyModule.cc:43
JetCorrectorParameters::Definitions def
Definition: classes.h:10
static void exceptionTranslation ( cms::Exception const &  iException)
static

Definition at line 43 of file PyModule.cc.

References cms::Exception::what().

Referenced by BOOST_PYTHON_MODULE().

43  {
44  PyErr_SetString(PyExc_RuntimeError, iException.what());
45 }