CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CPUSpender.cc
Go to the documentation of this file.
6 
8 public:
10  CPUSpender(const edm::ParameterSet& pset) { timePerEvent_ = pset.getUntrackedParameter<int>("secPerEvent"); }
11 
13  ~CPUSpender() override {}
14 
15  void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override {
16  time_t s = time(nullptr);
17  while (time(nullptr) - s < timePerEvent_) {
18  continue;
19  }
20  }
21 
22  // Operations
23  void beginJob() {}
24  void endJob() {}
25 
26 protected:
27  // void printTrackRecHits(const reco::Track &, edm::ESHandle<GlobalTrackingGeometry>) const;
28 
29 private:
30  unsigned int timePerEvent_;
31 };
32 
unsigned int timePerEvent_
Definition: CPUSpender.cc:30
~CPUSpender() override
Destructor.
Definition: CPUSpender.cc:13
void endJob()
Definition: CPUSpender.cc:24
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CPUSpender.cc:15
void beginJob()
Definition: CPUSpender.cc:23
CPUSpender(const edm::ParameterSet &pset)
Constructor.
Definition: CPUSpender.cc:10
Definition: event.py:1