Main Page
Namespaces
Classes
Package Documentation
CommonTools
Utils
plugins
CPUSpender.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/MakerMacros.h
"
2
#include "
FWCore/Framework/interface/stream/EDAnalyzer.h
"
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
#include "
FWCore/Framework/interface/Event.h
"
5
#include "
FWCore/Framework/interface/EventSetup.h
"
6
7
class
CPUSpender
:
public
edm::stream::EDAnalyzer
<> {
8
9
public
:
11
CPUSpender
(
const
edm::ParameterSet
&
pset
) {
timePerEvent_
= pset.
getUntrackedParameter
<
int
>(
"secPerEvent"
);}
12
14
~CPUSpender
()
override
{}
15
16
void
analyze
(
const
edm::Event
&
event
,
const
edm::EventSetup
& eventSetup)
override
{
17
time_t
s
=
time
(
nullptr
);
18
while
(
time
(
nullptr
)-s <
timePerEvent_
) {
continue
;}
19
}
20
21
// Operations
22
void
beginJob
() {}
23
void
endJob
() {}
24
25
protected
:
26
// void printTrackRecHits(const reco::Track &, edm::ESHandle<GlobalTrackingGeometry>) const;
27
28
private
:
29
unsigned
int
timePerEvent_
;
30
};
31
32
33
DEFINE_FWK_MODULE
(
CPUSpender
);
34
CPUSpender::timePerEvent_
unsigned int timePerEvent_
Definition:
CPUSpender.cc:29
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CPUSpender::~CPUSpender
~CPUSpender() override
Destructor.
Definition:
CPUSpender.cc:14
CPUSpender::endJob
void endJob()
Definition:
CPUSpender.cc:23
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
alignCSCRings.s
s
Definition:
alignCSCRings.py:91
MakerMacros.h
EventSetup.h
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
EDAnalyzer.h
ParameterSet.h
edm::EventSetup
Definition:
EventSetup.h:47
ntuplemaker.time
time
Definition:
ntuplemaker.py:308
edm::stream::EDAnalyzer
Definition:
EDAnalyzer.h:33
CPUSpender
Definition:
CPUSpender.cc:7
CPUSpender::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition:
CPUSpender.cc:16
CPUSpender::beginJob
void beginJob()
Definition:
CPUSpender.cc:22
edm::ParameterSet
Definition:
ParameterSet.h:36
CPUSpender::CPUSpender
CPUSpender(const edm::ParameterSet &pset)
Constructor.
Definition:
CPUSpender.cc:11
edm::Event
Definition:
Event.h:69
event
Definition:
event.py:1
Generated for CMSSW Reference Manual by
1.8.11