test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFCandidateBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
13 
14 // #include "DQMServices/Core/interface/MonitorElement.h"
15 // #include <TH1F.h>
16 
17 using namespace reco;
18 using namespace edm;
19 using namespace std;
20 
21 
22 
24  BenchmarkAnalyzer(parameterSet),
25  PFCandidateBenchmark( (Benchmark::Mode) parameterSet.getParameter<int>("mode") )
26 {
27  setRange( parameterSet.getParameter<double>("ptMin"),
28  parameterSet.getParameter<double>("ptMax"),
29  parameterSet.getParameter<double>("etaMin"),
30  parameterSet.getParameter<double>("etaMax"),
31  parameterSet.getParameter<double>("phiMin"),
32  parameterSet.getParameter<double>("phiMax") );
33 
34  myColl_ = consumes< PFCandidateCollection >(inputLabel_);
35 }
36 
37 
38 void
40 {
42  setup();
43 }
44 
45 
46 void
48  const edm::EventSetup& iSetup) {
49 
50 
52  iEvent.getByToken(myColl_, collection);
53 
54  fill( *collection );
55 }
56 
57 
59 }
T getParameter(std::string const &) const
void fill(const reco::PFCandidateCollection &pfCands)
virtual void beginJob()=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
abstract base class
Definition: Benchmark.h:21
edm::InputTag inputLabel_
input collection
int iEvent
Definition: GenABIO.cc:230
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:52
void analyze(const edm::Event &, const edm::EventSetup &)
abtract base class for benchmark analyzers
void setup()
book histograms
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11