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
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 33 of file ScaleCorrMETData.cc.

34  : token_(consumes<CorrMETData>(iConfig.getParameter<edm::InputTag>("src")))
35  , scaleFactor_(iConfig.getParameter<double>("scaleFactor"))
36 
37 {
38  produces<CorrMETData>("");
39 }
T getParameter(std::string const &) const
edm::EDGetTokenT< CorrMETData > token_
ScaleCorrMETData::~ScaleCorrMETData ( )
inlineoverride

Definition at line 21 of file ScaleCorrMETData.cc.

21 { }

Member Function Documentation

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

Definition at line 42 of file ScaleCorrMETData.cc.

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

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 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
edm::EDGetTokenT< CorrMETData > token_
static std::string const input
Definition: EdmProvDump.cc:44
a MET correction term
Definition: CorrMETData.h:14
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

double ScaleCorrMETData::scaleFactor_
private

Definition at line 26 of file ScaleCorrMETData.cc.

Referenced by produce().

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

Definition at line 25 of file ScaleCorrMETData.cc.

Referenced by produce().