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
virtual
~CPUSpender
() {}
15
16
void
analyze
(
const
edm::Event
&
event
,
const
edm::EventSetup
& eventSetup) {
17
time_t
s
=
time
(0);
18
while
(
time
(0)-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::endJob
void endJob()
Definition:
CPUSpender.cc:23
CPUSpender::~CPUSpender
virtual ~CPUSpender()
Destructor.
Definition:
CPUSpender.cc:14
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:44
ntuplemaker.time
time
Definition:
ntuplemaker.py:308
edm::stream::EDAnalyzer
Definition:
EDAnalyzer.h:33
CPUSpender
Definition:
CPUSpender.cc:7
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:66
CPUSpender::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition:
CPUSpender.cc:16
event
Definition:
event.py:1
Generated for CMSSW Reference Manual by
1.8.11