CMS 3D CMS Logo

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

List of all members.

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 ()

Private Attributes

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

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(), label, JetCorrectionESSource< Corrector >::mAlgo, JetCorrectionESSource< Corrector >::mDebug, JetCorrectionESSource< Corrector >::mEra, JetCorrectionESSource< Corrector >::mLevel, JetCorrectionESSource< Corrector >::mSection, and edm::ESProducer::setWhatProduced().

                                                        : mParameterSet(fConfig) 
  {
    std::string label = fConfig.getParameter<std::string>("@module_label");
    mLevel            = fConfig.getParameter<std::string>("level");
    mEra              = fConfig.getParameter<std::string>("era");
    mAlgo             = fConfig.getParameter<std::string>("algorithm");
    mSection          = fConfig.getParameter<std::string>("section");
    mDebug            = fConfig.getUntrackedParameter<bool>("debug",false);

    setWhatProduced(this, label);
    findingRecord<JetCorrectionsRecord>();
  }
template<class Corrector >
JetCorrectionESSource< Corrector >::~JetCorrectionESSource ( ) [inline]

Definition at line 62 of file JetCorrectionESSource.h.

{}

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.

  {
    std::string fileName("CondFormats/JetMETObjects/data/");
    if (!mEra.empty())
      fileName += mEra;
    if (!mLevel.empty())
      fileName += "_"+mLevel;
    if (!mAlgo.empty())
      fileName += "_"+mAlgo;
    fileName += ".txt";
    if (mDebug)
      std::cout << "Parameter File: " << fileName << std::endl;
    edm::FileInPath fip(fileName);
    JetCorrectorParameters *tmpJetCorPar = new JetCorrectorParameters(fip.fullPath(), mSection);
    boost::shared_ptr<JetCorrector> mCorrector(new Corrector(*tmpJetCorPar, mParameterSet));
    return mCorrector;
  }
template<class Corrector >
void JetCorrectionESSource< Corrector >::setIntervalFor ( edm::eventsetup::EventSetupRecordKey const &  ,
edm::IOVSyncValue const &  ,
edm::ValidityInterval fIOV 
) [inline, virtual]

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]