CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CandidateBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
11 
12 using namespace reco;
13 using namespace edm;
14 using namespace std;
15 
16 
17 
19  BenchmarkAnalyzer(parameterSet),
20  CandidateBenchmark( (Benchmark::Mode) parameterSet.getParameter<int>("mode") )
21 {
22 
23  setRange( parameterSet.getParameter<double>("ptMin"),
24  parameterSet.getParameter<double>("ptMax"),
25  parameterSet.getParameter<double>("etaMin"),
26  parameterSet.getParameter<double>("etaMax"),
27  parameterSet.getParameter<double>("phiMin"),
28  parameterSet.getParameter<double>("phiMax") );
29 
30  myColl_ = consumes< View<Candidate> >(inputLabel_);
31 }
32 
33 
34 void
36 {
37 
39  setup();
40 }
41 
42 void
44  const edm::EventSetup& iSetup) {
45 
46 
48  iEvent.getByToken(myColl_, collection);
49 
50  fill( *collection );
51 }
52 
53 
55 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
virtual void beginJob()=0
To plot Candidate quantities.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void setup()
book histograms
abstract base class
Definition: Benchmark.h:21
void fill(const C &candidates)
edm::InputTag inputLabel_
input collection
int iEvent
Definition: GenABIO.cc:230
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
CandidateBenchmarkAnalyzer(const edm::ParameterSet &parameterSet)
abtract base class for benchmark analyzers
void analyze(const edm::Event &, const edm::EventSetup &)
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11