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, boost::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 37 of file JetCorrectionESSource.h.

Constructor & Destructor Documentation

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

Definition at line 49 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, and edm::ESProducer::setWhatProduced().

49  : mParameterSet(fConfig)
50  {
51  std::string label = fConfig.getParameter<std::string>("@module_label");
52  mLevel = fConfig.getParameter<std::string>("level");
53  mEra = fConfig.getParameter<std::string>("era");
54  mAlgo = fConfig.getParameter<std::string>("algorithm");
55  mSection = fConfig.getParameter<std::string>("section");
56  mDebug = fConfig.getUntrackedParameter<bool>("debug",false);
57 
58  setWhatProduced(this, label);
59  findingRecord<JetCorrectionsRecord>();
60  }
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 62 of file JetCorrectionESSource.h.

62 {}

Member Function Documentation

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

Definition at line 64 of file JetCorrectionESSource.h.

References gather_cfg::cout, convertXMLtoSQLite_cfg::fileName, edm::FileInPath::fullPath(), JetCorrectionESSource< Corrector >::mAlgo, JetCorrectionESSource< Corrector >::mDebug, JetCorrectionESSource< Corrector >::mEra, JetCorrectionESSource< Corrector >::mLevel, JetCorrectionESSource< Corrector >::mParameterSet, and JetCorrectionESSource< Corrector >::mSection.

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

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 82 of file JetCorrectionESSource.h.

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

83  {
85  }
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 41 of file JetCorrectionESSource.h.

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

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