CMS 3D CMS Logo

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