Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
);
CPUSpender::timePerEvent_
unsigned int timePerEvent_
Definition:
CPUSpender.cc:30
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CPUSpender::~CPUSpender
~CPUSpender() override
Destructor.
Definition:
CPUSpender.cc:13
CPUSpender::endJob
void endJob()
Definition:
CPUSpender.cc:24
edmPickEvents.event
tuple event
Definition:
edmPickEvents.py:273
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
Event.h
MakerMacros.h
EventSetup.h
TrackValidation_cff.pset
tuple pset
Definition:
TrackValidation_cff.py:591
EDAnalyzer.h
ParameterSet.h
edm::EventSetup
Definition:
EventSetup.h:59
edm::stream::EDAnalyzer
Definition:
EDAnalyzer.h:31
CPUSpender
Definition:
CPUSpender.cc:7
alignCSCRings.s
list s
Definition:
alignCSCRings.py:92
CPUSpender::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition:
CPUSpender.cc:15
CPUSpender::beginJob
void beginJob()
Definition:
CPUSpender.cc:23
edm::ParameterSet
Definition:
ParameterSet.h:47
CPUSpender::CPUSpender
CPUSpender(const edm::ParameterSet &pset)
Constructor.
Definition:
CPUSpender.cc:10
edm::Event
Definition:
Event.h:73
Generated for CMSSW Reference Manual by
1.8.5