CMS 3D CMS Logo

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 
EDAnalyzer.h
CPUSpender::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CPUSpender.cc:15
protons_cff.time
time
Definition: protons_cff.py:39
CPUSpender::CPUSpender
CPUSpender(const edm::ParameterSet &pset)
Constructor.
Definition: CPUSpender.cc:10
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
CPUSpender::beginJob
void beginJob()
Definition: CPUSpender.cc:23
CPUSpender
Definition: CPUSpender.cc:7
edm::ParameterSet
Definition: ParameterSet.h:47
edm::stream::EDAnalyzer
Definition: EDAnalyzer.h:33
Event.h
CPUSpender::timePerEvent_
unsigned int timePerEvent_
Definition: CPUSpender.cc:30
edm::EventSetup
Definition: EventSetup.h:58
CPUSpender::endJob
void endJob()
Definition: CPUSpender.cc:24
CPUSpender::~CPUSpender
~CPUSpender() override
Destructor.
Definition: CPUSpender.cc:13
EventSetup.h
ParameterSet.h
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27