CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
PythonEventProcessor Class Reference

#include "PythonEventProcessor.h"

Public Member Functions

 PythonEventProcessor (PyBind11ProcessDesc const &)
 
void run ()
 
int totalEvents () const
 
int totalEventsFailed () const
 
int totalEventsPassed () const
 
 ~PythonEventProcessor ()
 

Private Member Functions

const PythonEventProcessoroperator= (const PythonEventProcessor &)=delete
 
 PythonEventProcessor (const PythonEventProcessor &)=delete
 

Private Attributes

int forcePluginSetupFirst_
 
edm::EventProcessor processor_
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 30 of file PythonEventProcessor.h.

Constructor & Destructor Documentation

PythonEventProcessor::PythonEventProcessor ( PyBind11ProcessDesc const &  iDesc)

Definition at line 61 of file PythonEventProcessor.cc.

Referenced by totalEventsFailed().

62  : forcePluginSetupFirst_(setupPluginSystem()),
63  processor_(addDefaultServicesToProcessDesc(iDesc.processDesc()),
64  createJobReport(),
edm::EventProcessor processor_
PythonEventProcessor::~PythonEventProcessor ( )

Definition at line 67 of file PythonEventProcessor.cc.

References edm::EventProcessor::endJob(), and processor_.

67  {
68  auto gil = PyEval_SaveThread();
69  try {
71  } catch (...) {
72  }
73  PyEval_RestoreThread(gil);
74 }
edm::EventProcessor processor_
PythonEventProcessor::PythonEventProcessor ( const PythonEventProcessor )
privatedelete

Member Function Documentation

const PythonEventProcessor& PythonEventProcessor::operator= ( const PythonEventProcessor )
privatedelete

Referenced by totalEventsFailed().

void PythonEventProcessor::run ( )

Definition at line 76 of file PythonEventProcessor.cc.

References processor_, and edm::EventProcessor::runToCompletion().

Referenced by PYBIND11_MODULE(), and totalEventsFailed().

76  {
77  auto gil = PyEval_SaveThread();
78  try {
80  } catch (...) {
81  }
82  PyEval_RestoreThread(gil);
83 }
edm::EventProcessor processor_
StatusCode runToCompletion()
int PythonEventProcessor::totalEvents ( ) const
inline

Return the number of events this EventProcessor has tried to process (inclues both successes and failures, including failures due to exceptions during processing).

Definition at line 38 of file PythonEventProcessor.h.

References processor_, and edm::EventProcessor::totalEvents().

Referenced by PYBIND11_MODULE().

38 { return processor_.totalEvents(); }
edm::EventProcessor processor_
int totalEvents() const
int PythonEventProcessor::totalEventsFailed ( ) const
inline

Return the number of events that have not passed any trigger. (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()

Definition at line 46 of file PythonEventProcessor.h.

References operator=(), processor_, PythonEventProcessor(), run(), and edm::EventProcessor::totalEventsFailed().

Referenced by PYBIND11_MODULE().

46 { return processor_.totalEventsFailed(); }
edm::EventProcessor processor_
int totalEventsFailed() const
int PythonEventProcessor::totalEventsPassed ( ) const
inline

Return the number of events processed by this EventProcessor which have been passed by one or more trigger paths.

Definition at line 42 of file PythonEventProcessor.h.

References processor_, and edm::EventProcessor::totalEventsPassed().

Referenced by PYBIND11_MODULE().

42 { return processor_.totalEventsPassed(); }
edm::EventProcessor processor_
int totalEventsPassed() const

Member Data Documentation

int PythonEventProcessor::forcePluginSetupFirst_
private

Definition at line 59 of file PythonEventProcessor.h.

edm::EventProcessor PythonEventProcessor::processor_
private