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 (PythonProcessDesc 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 29 of file PythonEventProcessor.h.

Constructor & Destructor Documentation

PythonEventProcessor::PythonEventProcessor ( PythonProcessDesc const &  iDesc)

Definition at line 61 of file PythonEventProcessor.cc.

Referenced by totalEventsFailed().

62 : forcePluginSetupFirst_(setupPluginSystem())
63  ,processor_(addDefaultServicesToProcessDesc(iDesc.processDesc()),createJobReport(),edm::serviceregistry::kOverlapIsError)
64 {
65 }
edm::EventProcessor processor_
PythonEventProcessor::~PythonEventProcessor ( )

Definition at line 67 of file PythonEventProcessor.cc.

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

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

Member Function Documentation

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

Referenced by totalEventsFailed().

void PythonEventProcessor::run ( void  )

Definition at line 79 of file PythonEventProcessor.cc.

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

Referenced by BOOST_PYTHON_MODULE(), and totalEventsFailed().

80 {
81  auto gil = PyEval_SaveThread();
82  try {
83  (void) processor_.runToCompletion();
84  }catch(...) {
85 
86  }
87  PyEval_RestoreThread(gil);
88 }
edm::EventProcessor processor_
virtual StatusCode runToCompletion() override
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 39 of file PythonEventProcessor.h.

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

Referenced by BOOST_PYTHON_MODULE().

39  {
40  return processor_.totalEvents();
41  }
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 51 of file PythonEventProcessor.h.

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

Referenced by BOOST_PYTHON_MODULE().

51  {
53  }
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 45 of file PythonEventProcessor.h.

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

Referenced by BOOST_PYTHON_MODULE().

45  {
47  }
edm::EventProcessor processor_
int totalEventsPassed() const

Member Data Documentation

int PythonEventProcessor::forcePluginSetupFirst_
private

Definition at line 66 of file PythonEventProcessor.h.

edm::EventProcessor PythonEventProcessor::processor_
private