CMS 3D CMS Logo

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

#include <JetCorrectionESChain.h>

Inheritance diagram for JetCorrectionESChain:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 JetCorrectionESChain (edm::ParameterSet const &fParameters)
 
std::shared_ptr< JetCorrectorproduce (JetCorrectionsRecord const &)
 
 ~JetCorrectionESChain ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()(false)
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer () noexcept(false)
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

std::shared_ptr< JetCorrectormChainCorrector
 
std::vector< std::string > mCorrectors
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

Definition at line 23 of file JetCorrectionESChain.h.

Constructor & Destructor Documentation

JetCorrectionESChain::JetCorrectionESChain ( edm::ParameterSet const &  fParameters)

Definition at line 16 of file JetCorrectionESChain.cc.

References Exception, spr::find(), edm::ParameterSet::getParameter(), diffTwoXMLs::label, mCorrectors, edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

17  : mCorrectors (fParameters.getParameter < std::vector<std::string> > ("correctors")),
19 {
20  std::string label(fParameters.getParameter<std::string>("@module_label"));
21  if (std::find(mCorrectors.begin(), mCorrectors.end(), label) != mCorrectors.end()) {
22  throw cms::Exception("Recursion is not allowed")
23  << "JetCorrectionESChain: corrector " << label << " is chained to itself";
24  }
25  setWhatProduced(this, label);
26 }
std::shared_ptr< JetCorrector > mChainCorrector
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
std::vector< std::string > mCorrectors
JetCorrectionESChain::~JetCorrectionESChain ( )

Definition at line 28 of file JetCorrectionESChain.cc.

28 {}

Member Function Documentation

std::shared_ptr< JetCorrector > JetCorrectionESChain::produce ( JetCorrectionsRecord const &  fRecord)

Definition at line 30 of file JetCorrectionESChain.cc.

References ChainedJetCorrector::clear(), mitigatedMETSequence_cff::corrector, edm::eventsetup::EventSetupRecord::get(), cmsBatch::handle, mps_fire::i, mChainCorrector, mCorrectors, and ChainedJetCorrector::push_back().

30  {
32  corrector->clear ();
33  for (size_t i = 0; i < mCorrectors.size(); ++i) {
35  fRecord.get(mCorrectors[i], handle);
36  corrector->push_back(&*handle);
37  }
38  return mChainCorrector;
39 }
std::shared_ptr< JetCorrector > mChainCorrector
void push_back(const JetCorrector *fCorrector)
std::vector< std::string > mCorrectors

Member Data Documentation

std::shared_ptr<JetCorrector> JetCorrectionESChain::mChainCorrector
private

Definition at line 32 of file JetCorrectionESChain.h.

Referenced by produce().

std::vector<std::string> JetCorrectionESChain::mCorrectors
private

Definition at line 31 of file JetCorrectionESChain.h.

Referenced by JetCorrectionESChain(), and produce().