Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:04

0001 #ifndef FWCore_PythonFramework_PythonEventProcessor_h
0002 #define FWCore_PythonFramework_PythonEventProcessor_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/PythonFramework
0006 // Class  :     PythonEventProcessor
0007 //
0008 /**\class PythonEventProcessor PythonEventProcessor.h "PythonEventProcessor.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris D Jones
0018 //         Created:  Fri, 20 Jan 2017 16:36:33 GMT
0019 //
0020 
0021 // system include files
0022 #include "FWCore/Framework/interface/EventProcessor.h"
0023 #include "FWCore/PythonParameterSet/interface/PyBind11ProcessDesc.h"
0024 
0025 // user include files
0026 
0027 // forward declarations
0028 class PythonProcessDesc;
0029 
0030 class PythonEventProcessor {
0031 public:
0032   PythonEventProcessor(PyBind11ProcessDesc const&);
0033   PythonEventProcessor(const PythonEventProcessor&) = delete;                   // stop default
0034   const PythonEventProcessor& operator=(const PythonEventProcessor&) = delete;  // stop default
0035   ~PythonEventProcessor();
0036   // ---------- const member functions ---------------------
0037   /// Return the number of events this EventProcessor has tried to process
0038   /// (inclues both successes and failures, including failures due
0039   /// to exceptions during processing).
0040   int totalEvents() const { return processor_.totalEvents(); }
0041 
0042   /// Return the number of events processed by this EventProcessor
0043   /// which have been passed by one or more trigger paths.
0044   int totalEventsPassed() const { return processor_.totalEventsPassed(); }
0045 
0046   /// Return the number of events that have not passed any trigger.
0047   /// (N.B. totalEventsFailed() + totalEventsPassed() == totalEvents()
0048   int totalEventsFailed() const { return processor_.totalEventsFailed(); }
0049 
0050   // ---------- static member functions --------------------
0051 
0052   // ---------- member functions ---------------------------
0053   void run();
0054 
0055 private:
0056   // ---------- member data --------------------------------
0057   int forcePluginSetupFirst_;
0058   edm::EventProcessor processor_;
0059 };
0060 
0061 #endif