CMS 3D CMS Logo

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_
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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)
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
fixed size matrix
HLT enums.
abtract base class for benchmark analyzers
void analyze(const edm::Event &, const edm::EventSetup &) override
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
Definition: Run.h:45