CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ScaleCorrMETData Class Reference
Inheritance diagram for ScaleCorrMETData:
edm::stream::EDProducer<>

Public Member Functions

 ScaleCorrMETData (const edm::ParameterSet &)
 
 ~ScaleCorrMETData () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

double scaleFactor_
 
edm::EDGetTokenT< CorrMETDatatoken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 17 of file ScaleCorrMETData.cc.

Constructor & Destructor Documentation

◆ ScaleCorrMETData()

ScaleCorrMETData::ScaleCorrMETData ( const edm::ParameterSet iConfig)
explicit

Definition at line 30 of file ScaleCorrMETData.cc.

31  : token_(consumes<CorrMETData>(iConfig.getParameter<edm::InputTag>("src"))),
32  scaleFactor_(iConfig.getParameter<double>("scaleFactor"))
33 
34 {
35  produces<CorrMETData>("");
36 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< CorrMETData > token_

◆ ~ScaleCorrMETData()

ScaleCorrMETData::~ScaleCorrMETData ( )
inlineoverride

Definition at line 20 of file ScaleCorrMETData.cc.

20 {}

Member Function Documentation

◆ produce()

void ScaleCorrMETData::produce ( edm::Event evt,
const edm::EventSetup es 
)
overrideprivate

Definition at line 39 of file ScaleCorrMETData.cc.

References edm::Event::getByToken(), input, eostools::move(), edm::Event::put(), scaleFactor_, and token_.

39  {
40  CorrMETData product;
42  evt.getByToken(token_, input);
43  product += scaleFactor_ * (*input);
44 
45  std::unique_ptr<CorrMETData> pprod(new CorrMETData(product));
46  evt.put(std::move(pprod), "");
47 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:526
edm::EDGetTokenT< CorrMETData > token_
static std::string const input
Definition: EdmProvDump.cc:50
a MET correction term
Definition: CorrMETData.h:14
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ scaleFactor_

double ScaleCorrMETData::scaleFactor_
private

Definition at line 24 of file ScaleCorrMETData.cc.

Referenced by produce().

◆ token_

edm::EDGetTokenT<CorrMETData> ScaleCorrMETData::token_
private

Definition at line 23 of file ScaleCorrMETData.cc.

Referenced by produce().