CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetCorrectionESSource< Corrector > Class Template Reference

#include <JetCorrectionESSource.h>

Inheritance diagram for JetCorrectionESSource< Corrector >:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 JetCorrectionESSource (edm::ParameterSet const &fConfig)
 
std::unique_ptr< JetCorrectorproduce (JetCorrectionsRecord const &iRecord)
 
void setIntervalFor (edm::eventsetup::EventSetupRecordKey const &, edm::IOVSyncValue const &, edm::ValidityInterval &fIOV) override
 
 ~JetCorrectionESSource () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Private Attributes

std::string mAlgo
 
bool mDebug
 
std::string mEra
 
std::string mLevel
 
edm::ParameterSet mParameterSet
 
std::string mSection
 

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
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- 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())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 
virtual void setIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &, ValidityInterval &)=0
 

Detailed Description

template<class Corrector>
class JetCorrectionESSource< Corrector >

Definition at line 36 of file JetCorrectionESSource.h.

Constructor & Destructor Documentation

template<class Corrector >
JetCorrectionESSource< Corrector >::JetCorrectionESSource ( edm::ParameterSet const &  fConfig)
inline

Definition at line 48 of file JetCorrectionESSource.h.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), label, and AlCaHLTBitMon_QueryRunRegistry::string.

48  : mParameterSet(fConfig)
49  {
50  std::string label = fConfig.getParameter<std::string>("@module_label");
51  mLevel = fConfig.getParameter<std::string>("level");
52  mEra = fConfig.getParameter<std::string>("era");
53  mAlgo = fConfig.getParameter<std::string>("algorithm");
54  mSection = fConfig.getParameter<std::string>("section");
55  mDebug = fConfig.getUntrackedParameter<bool>("debug",false);
56 
57  setWhatProduced(this, label);
58  findingRecord<JetCorrectionsRecord>();
59  }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
char const * label
edm::ParameterSet mParameterSet
template<class Corrector >
JetCorrectionESSource< Corrector >::~JetCorrectionESSource ( )
inlineoverride

Definition at line 61 of file JetCorrectionESSource.h.

61 {}

Member Function Documentation

template<class Corrector >
std::unique_ptr<JetCorrector> JetCorrectionESSource< Corrector >::produce ( JetCorrectionsRecord const &  iRecord)
inline

Definition at line 63 of file JetCorrectionESSource.h.

References gather_cfg::cout, MillePedeFileConverter_cfg::fileName, edm::FileInPath::fullPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

64  {
65  std::string fileName("CondFormats/JetMETObjects/data/");
66  if (!mEra.empty())
67  fileName += mEra;
68  if (!mLevel.empty())
69  fileName += "_"+mLevel;
70  if (!mAlgo.empty())
71  fileName += "_"+mAlgo;
72  fileName += ".txt";
73  if (mDebug)
74  std::cout << "Parameter File: " << fileName << std::endl;
76  JetCorrectorParameters *tmpJetCorPar = new JetCorrectorParameters(fip.fullPath(), mSection);
77  return std::make_unique<Corrector>(*tmpJetCorPar, mParameterSet);
78  }
edm::ParameterSet mParameterSet
template<class Corrector >
void JetCorrectionESSource< Corrector >::setIntervalFor ( edm::eventsetup::EventSetupRecordKey const &  ,
edm::IOVSyncValue const &  ,
edm::ValidityInterval fIOV 
)
inlineoverride

Definition at line 80 of file JetCorrectionESSource.h.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().

81  {
83  }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88

Member Data Documentation

template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mAlgo
private

Definition at line 43 of file JetCorrectionESSource.h.

template<class Corrector >
bool JetCorrectionESSource< Corrector >::mDebug
private

Definition at line 45 of file JetCorrectionESSource.h.

template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mEra
private

Definition at line 42 of file JetCorrectionESSource.h.

template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mLevel
private

Definition at line 41 of file JetCorrectionESSource.h.

template<class Corrector >
edm::ParameterSet JetCorrectionESSource< Corrector >::mParameterSet
private

Definition at line 40 of file JetCorrectionESSource.h.

template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mSection
private

Definition at line 44 of file JetCorrectionESSource.h.