CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MatchMETBenchmarkAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
11 using namespace reco;
12 using namespace edm;
13 using namespace std;
14 
16  : BenchmarkAnalyzer(parameterSet), MatchMETBenchmark((Benchmark::Mode)parameterSet.getParameter<int>("mode")) {
17  matchedInputLabel_ = parameterSet.getParameter<edm::InputTag>("MatchCollection");
18 
19  myColl_ = consumes<View<MET>>(inputLabel_);
20  myMatchColl_ = consumes<View<MET>>(matchedInputLabel_);
21 }
22 
24  edm::Run const &iRun,
25  edm::EventSetup const &iSetup) {
26  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
27  setup(ibooker);
28 }
29 
32  iEvent.getByToken(myColl_, collection);
33 
34  Handle<View<MET>> matchedCollection;
35  iEvent.getByToken(myMatchColl_, matchedCollection);
36 
37  fillOne((*collection)[0], (*matchedCollection)[0]);
38 }
edm::EDGetTokenT< edm::View< reco::MET > > myColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void setup(DQMStore::IBooker &b)
book histograms
abstract base class
Definition: Benchmark.h:19
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void fillOne(const reco::MET &candidate, const reco::MET &matchedCandidate)
fill histograms with a given particle
edm::InputTag inputLabel_
input collection
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int iEvent
Definition: GenABIO.cc:224
MatchMETBenchmarkAnalyzer(const edm::ParameterSet &parameterSet)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
abtract base class for benchmark analyzers
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: Run.h:45