CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PFCandidateBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
13 
14 using namespace reco;
15 using namespace edm;
16 using namespace std;
17 
19  : BenchmarkAnalyzer(parameterSet), PFCandidateBenchmark((Benchmark::Mode)parameterSet.getParameter<int>("mode")) {
20  setRange(parameterSet.getParameter<double>("ptMin"),
21  parameterSet.getParameter<double>("ptMax"),
22  parameterSet.getParameter<double>("etaMin"),
23  parameterSet.getParameter<double>("etaMax"),
24  parameterSet.getParameter<double>("phiMin"),
25  parameterSet.getParameter<double>("phiMax"));
26 
27  myColl_ = consumes<PFCandidateCollection>(inputLabel_);
28 }
29 
31  edm::Run const &iRun,
32  edm::EventSetup const &iSetup) {
33  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
34  setup(ibooker);
35 }
36 
39  iEvent.getByToken(myColl_, collection);
40 
41  fill(*collection);
42 }
void fill(const reco::PFCandidateCollection &pfCands)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
abstract base class
Definition: Benchmark.h:19
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::InputTag inputLabel_
input collection
int iEvent
Definition: GenABIO.cc:224
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
PFCandidateBenchmarkAnalyzer(const edm::ParameterSet &parameterSet)
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void setup(DQMStore::IBooker &b)
book histograms
abtract base class for benchmark analyzers
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: Run.h:45