CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ChainedJetCorrectorProducer Class Reference

#include <JetMETCorrections/Modules/plugins/ChainedJetCorrectorProducer.cc>

Inheritance diagram for ChainedJetCorrectorProducer:
edm::stream::EDProducer<>

Public Member Functions

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

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

std::vector< edm::EDGetTokenT< reco::JetCorrector > > correctorTokens_
 

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 112 of file ChainedJetCorrectorProducer.cc.

Constructor & Destructor Documentation

◆ ChainedJetCorrectorProducer()

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

Definition at line 136 of file ChainedJetCorrectorProducer.cc.

136  {
137  //register your products
138  produces<reco::JetCorrector>();
139 
140  auto const& tags = iConfig.getParameter<std::vector<edm::InputTag>>("correctors");
141  correctorTokens_.reserve(tags.size());
142 
143  for (auto const& tag : tags) {
144  correctorTokens_.emplace_back(consumes<reco::JetCorrector>(tag));
145  }
146 }

References correctorTokens_, edm::ParameterSet::getParameter(), GlobalPosition_Frontier_DevDB_cff::tag, and triggerMatcherToHLTDebug_cfi::tags.

Member Function Documentation

◆ fillDescriptions()

void ChainedJetCorrectorProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 171 of file ChainedJetCorrectorProducer.cc.

171  {
172  //The following says we do not know what parameters are allowed so do no validation
173  // Please change this to state exactly what you do use, even if it is no parameters
175  desc.add<std::vector<edm::InputTag>>("correctors");
176  descriptions.addDefault(desc);
177 }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

◆ produce()

void ChainedJetCorrectorProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 153 of file ChainedJetCorrectorProducer.cc.

153  {
154  using namespace edm;
155 
156  std::vector<reco::JetCorrector const*> correctors;
157  correctors.reserve(correctorTokens_.size());
158 
159  for (auto const& token : correctorTokens_) {
161  iEvent.getByToken(token, hCorrector);
162  correctors.emplace_back(&(*hCorrector));
163  }
164 
165  std::unique_ptr<reco::JetCorrector> pCorr(new reco::JetCorrector(
166  std::unique_ptr<reco::JetCorrectorImpl>(new ChainedJetCorrectorImpl(std::move(correctors)))));
167  iEvent.put(std::move(pCorr));
168 }

References topJetCorrectionHelper_cfi::correctors, correctorTokens_, iEvent, eostools::move(), and unpackBuffers-CaloStage2::token.

Member Data Documentation

◆ correctorTokens_

std::vector<edm::EDGetTokenT<reco::JetCorrector> > ChainedJetCorrectorProducer::correctorTokens_
private

Definition at line 122 of file ChainedJetCorrectorProducer.cc.

Referenced by ChainedJetCorrectorProducer(), and produce().

topJetCorrectionHelper_cfi.correctors
correctors
Definition: topJetCorrectionHelper_cfi.py:18
edm
HLT enums.
Definition: AlignableModifier.h:19
reco::JetCorrector
Definition: JetCorrector.h:33
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle< reco::JetCorrector >
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
ChainedJetCorrectorProducer::correctorTokens_
std::vector< edm::EDGetTokenT< reco::JetCorrector > > correctorTokens_
Definition: ChainedJetCorrectorProducer.cc:122
iEvent
int iEvent
Definition: GenABIO.cc:224
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
triggerMatcherToHLTDebug_cfi.tags
tags
Definition: triggerMatcherToHLTDebug_cfi.py:9
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316