CMS 3D CMS Logo

Macros | Functions
PythonModule.cc File Reference
#include "FWCore/PythonParameterSet/interface/PyBind11ProcessDesc.h"
#include "FWCore/PythonFramework/interface/PythonEventProcessor.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <pybind11/pybind11.h>

Go to the source code of this file.

Macros

#define FWCore_PythonFramework_PythonModule_h
 

Functions

 PYBIND11_MODULE (libFWCorePythonFramework, m)
 

Macro Definition Documentation

◆ FWCore_PythonFramework_PythonModule_h

#define FWCore_PythonFramework_PythonModule_h

Definition at line 2 of file PythonModule.cc.

Function Documentation

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( libFWCorePythonFramework  ,
 
)

Definition at line 21 of file PythonModule.cc.

21  {
22  pybind11::register_exception_translator([](std::exception_ptr p) {
23  try {
24  if (p)
25  std::rethrow_exception(p);
26  } catch (const cms::Exception &e) {
27  PyErr_SetString(PyExc_RuntimeError, e.what());
28  }
29  });
30 
31  pybind11::class_<PythonEventProcessor>(m, "PythonEventProcessor")
32  .def(pybind11::init<PyBind11ProcessDesc const &>())
33  .def("run", &PythonEventProcessor::run)
34  .def("totalEvents", &PythonEventProcessor::totalEvents)
35  .def("totalEventsPassed", &PythonEventProcessor::totalEventsPassed)
36  .def("totalEventsFailed", &PythonEventProcessor::totalEventsFailed);
37 }

References MillePedeFileConverter_cfg::e, visualization-live-secondInstance_cfg::m, AlCaHLTBitMon_ParallelJobs::p, PythonEventProcessor::run(), PythonEventProcessor::totalEvents(), PythonEventProcessor::totalEventsFailed(), and PythonEventProcessor::totalEventsPassed().

AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PythonEventProcessor::totalEventsFailed
int totalEventsFailed() const
Definition: PythonEventProcessor.h:46
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
PythonEventProcessor::run
void run()
Definition: PythonEventProcessor.cc:76
PythonEventProcessor::totalEvents
int totalEvents() const
Definition: PythonEventProcessor.h:38
PythonEventProcessor::totalEventsPassed
int totalEventsPassed() const
Definition: PythonEventProcessor.h:42
cms::Exception
Definition: Exception.h:70
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37