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 }

◆ ~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.

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 }

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

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().

input
static const std::string input
Definition: EdmProvDump.cc:48
edm::Handle
Definition: AssociativeIterator.h:50
CorrMETData
a MET correction term
Definition: CorrMETData.h:14
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
ScaleCorrMETData::token_
edm::EDGetTokenT< CorrMETData > token_
Definition: ScaleCorrMETData.cc:23
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ScaleCorrMETData::scaleFactor_
double scaleFactor_
Definition: ScaleCorrMETData.cc:24
edm::InputTag
Definition: InputTag.h:15