CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( 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 }
edm::EDGetTokenT< CorrMETData > token_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ScaleCorrMETData::~ScaleCorrMETData ( )
inlineoverride

Definition at line 20 of file ScaleCorrMETData.cc.

20 {}

Member Function Documentation

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:539
edm::EDGetTokenT< CorrMETData > token_
static std::string const input
Definition: EdmProvDump.cc:47
def move
Definition: eostools.py:511
a MET correction term
Definition: CorrMETData.h:14

Member Data Documentation

double ScaleCorrMETData::scaleFactor_
private

Definition at line 24 of file ScaleCorrMETData.cc.

Referenced by produce().

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

Definition at line 23 of file ScaleCorrMETData.cc.

Referenced by produce().