CMS 3D CMS Logo

TCMETProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: METProducers
4 // Class: TCMETProducer
5 //
6 //
7 
8 //____________________________________________________________________________||
10 
13 
15 
16 #include <cstring>
17 
18 //____________________________________________________________________________||
19 namespace cms
20 {
21 
22 //____________________________________________________________________________||
24  {
25  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
26 
27  produces<reco::METCollection>().setBranchAlias(alias);
28 
30  }
31 
32 //____________________________________________________________________________||
34  {
35  auto tcmetcoll = std::make_unique<reco::METCollection>();
36  tcmetcoll->push_back(tcMetAlgo_.CalculateTCMET(event, setup));
37  event.put(std::move(tcmetcoll));
38  }
39 
40 //____________________________________________________________________________||
42 }
43 
44 //____________________________________________________________________________||
T getParameter(std::string const &) const
reco::MET CalculateTCMET(edm::Event &event, const edm::EventSetup &setup)
Definition: TCMETAlgo.cc:179
TCMETAlgo tcMetAlgo_
Definition: TCMETProducer.h:44
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool exists(std::string const &parameterName) const
checks if a parameter exists
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
TCMETProducer(const edm::ParameterSet &)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void produce(edm::Event &, const edm::EventSetup &) override
void configure(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumesCollector)
Definition: TCMETAlgo.cc:65
def move(src, dest)
Definition: eostools.py:510
Definition: event.py:1