CMS 3D CMS Logo

ScaleCorrMETData.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 //____________________________________________________________________________||
9 
11 
13 
14 #include <iostream>
15 
16 //____________________________________________________________________________||
18 {
19 public:
20  explicit ScaleCorrMETData(const edm::ParameterSet&);
21  ~ScaleCorrMETData() override { }
22 
23 private:
24 
26  double scaleFactor_;
27 
28  void produce(edm::Event&, const edm::EventSetup&) override;
29 
30 };
31 
32 //____________________________________________________________________________||
34  : token_(consumes<CorrMETData>(iConfig.getParameter<edm::InputTag>("src")))
35  , scaleFactor_(iConfig.getParameter<double>("scaleFactor"))
36 
37 {
38  produces<CorrMETData>("");
39 }
40 
41 //____________________________________________________________________________||
43 {
44  CorrMETData product;
46  evt.getByToken(token_, input);
47  product += scaleFactor_*(*input);
48 
49  std::unique_ptr<CorrMETData> pprod(new CorrMETData(product));
50  evt.put(std::move(pprod), "");
51 }
52 
53 //____________________________________________________________________________||
54 
56 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
~ScaleCorrMETData() override
edm::EDGetTokenT< CorrMETData > token_
static std::string const input
Definition: EdmProvDump.cc:48
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::Event &, const edm::EventSetup &) override
a MET correction term
Definition: CorrMETData.h:14
HLT enums.
ScaleCorrMETData(const edm::ParameterSet &)
def move(src, dest)
Definition: eostools.py:511