RecoMET
METProducers
src
TCMETProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: METProducers
4
// Class: TCMETProducer
5
//
6
//
7
8
//____________________________________________________________________________||
9
#include "
RecoMET/METProducers/interface/TCMETProducer.h
"
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
13
14
#include "
DataFormats/METReco/interface/METFwd.h
"
15
16
#include <cstring>
17
18
//____________________________________________________________________________||
19
namespace
cms
{
20
21
//____________________________________________________________________________||
22
TCMETProducer::TCMETProducer
(
const
edm::ParameterSet
& iConfig) {
23
std::string
alias
= iConfig.
exists
(
"alias"
) ? iConfig.
getParameter
<
std::string
>(
"alias"
) :
""
;
24
25
produces<reco::METCollection>().setBranchAlias(
alias
);
26
27
tcMetAlgo_
.
configure
(iConfig, consumesCollector());
28
}
29
30
//____________________________________________________________________________||
31
void
TCMETProducer::produce
(
edm::Event
&
event
,
const
edm::EventSetup
&
setup
) {
32
auto
tcmetcoll = std::make_unique<reco::METCollection>();
33
tcmetcoll->push_back(
tcMetAlgo_
.
CalculateTCMET
(
event
,
setup
));
34
event
.put(
std::move
(tcmetcoll));
35
}
36
37
//____________________________________________________________________________||
38
DEFINE_FWK_MODULE
(
TCMETProducer
);
39
}
// namespace cms
40
41
//____________________________________________________________________________||
TCMETProducer.h
cms::TCMETProducer::tcMetAlgo_
TCMETAlgo tcMetAlgo_
Definition:
TCMETProducer.h:41
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
cms::TCMETProducer::TCMETProducer
TCMETProducer(const edm::ParameterSet &)
Definition:
TCMETProducer.cc:22
cms::TCMETProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
TCMETProducer.cc:31
edm::ParameterSet::exists
bool exists(std::string const ¶meterName) const
checks if a parameter exists
Definition:
ParameterSet.cc:681
TCMETAlgo::CalculateTCMET
reco::MET CalculateTCMET(edm::Event &event, const edm::EventSetup &setup)
Definition:
TCMETAlgo.cc:170
edm::ParameterSet
Definition:
ParameterSet.h:47
TCMETAlgo::configure
void configure(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumesCollector)
Definition:
TCMETAlgo.cc:64
cms::TCMETProducer
Definition:
TCMETProducer.h:34
edm::EventSetup
Definition:
EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
eostools.move
def move(src, dest)
Definition:
eostools.py:511
SiStripOfflineCRack_cfg.alias
alias
Definition:
SiStripOfflineCRack_cfg.py:128
METFwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ConsumesCollector.h
ParameterSet.h
event
Definition:
event.py:1
edm::Event
Definition:
Event.h:73
cms
Namespace of DDCMS conversion namespace.
Definition:
ProducerAnalyzer.cc:21
Generated for CMSSW Reference Manual by
1.8.16