CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
boost::shared_ptr< JetCorrectorproduce (JetCorrectionsRecord const &iRecord)
 
void setIntervalFor (edm::eventsetup::EventSetupRecordKey const &, edm::IOVSyncValue const &, edm::ValidityInterval &fIOV)
 
 ~JetCorrectionESSource ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

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
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- 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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

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(), diffTwoXMLs::label, JetCorrectionESSource< Corrector >::mAlgo, JetCorrectionESSource< Corrector >::mDebug, JetCorrectionESSource< Corrector >::mEra, JetCorrectionESSource< Corrector >::mLevel, JetCorrectionESSource< Corrector >::mSection, edm::ESProducer::setWhatProduced(), 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  }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
edm::ParameterSet mParameterSet
template<class Corrector >
JetCorrectionESSource< Corrector >::~JetCorrectionESSource ( )
inline

Definition at line 61 of file JetCorrectionESSource.h.

61 {}

Member Function Documentation

template<class Corrector >
boost::shared_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(), JetCorrectionESSource< Corrector >::mAlgo, JetCorrectionESSource< Corrector >::mDebug, JetCorrectionESSource< Corrector >::mEra, JetCorrectionESSource< Corrector >::mLevel, JetCorrectionESSource< Corrector >::mParameterSet, JetCorrectionESSource< Corrector >::mSection, 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  boost::shared_ptr<JetCorrector> mCorrector(new Corrector(*tmpJetCorPar, mParameterSet));
78  return mCorrector;
79  }
edm::ParameterSet mParameterSet
tuple cout
Definition: gather_cfg.py:145
template<class Corrector >
void JetCorrectionESSource< Corrector >::setIntervalFor ( edm::eventsetup::EventSetupRecordKey const &  ,
edm::IOVSyncValue const &  ,
edm::ValidityInterval fIOV 
)
inlinevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 81 of file JetCorrectionESSource.h.

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

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

Member Data Documentation

template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mAlgo
private
template<class Corrector >
bool JetCorrectionESSource< Corrector >::mDebug
private
template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mEra
private
template<class Corrector >
std::string JetCorrectionESSource< Corrector >::mLevel
private
template<class Corrector >
edm::ParameterSet JetCorrectionESSource< Corrector >::mParameterSet
private

Definition at line 40 of file JetCorrectionESSource.h.

Referenced by JetCorrectionESSource< Corrector >::produce().

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