CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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:528
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
ScaleCorrMETData::token_
edm::EDGetTokenT< CorrMETData > token_
Definition: ScaleCorrMETData.cc:23
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
ScaleCorrMETData::scaleFactor_
double scaleFactor_
Definition: ScaleCorrMETData.cc:24
edm::InputTag
Definition: InputTag.h:15