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
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
33
DEFINE_FWK_MODULE
(
CPUSpender
);
EDAnalyzer.h
CPUSpender::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition:
CPUSpender.cc:15
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:57
CPUSpender::endJob
void endJob()
Definition:
CPUSpender.cc:24
CPUSpender::~CPUSpender
~CPUSpender() override
Destructor.
Definition:
CPUSpender.cc:13
EventSetup.h
ParameterSet.h
ntuplemaker.time
time
Definition:
ntuplemaker.py:310
event
Definition:
event.py:1
edm::Event
Definition:
Event.h:73
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16