#include <JetCorrectionService.h>
Public Member Functions | |
JetCorrectionService (const edm::ParameterSet &fConfig) | |
boost::shared_ptr< JetCorrector > | produce (const JetCorrectionsRecord &iRecord) |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &fIOV) |
~JetCorrectionService () | |
Private Attributes | |
std::string | mAlgo |
bool | mDebug |
std::string | mEra |
std::string | mLevel |
edm::ParameterSet | mParameterSet |
std::string | mPayloadName |
std::string | mSection |
bool | mUseCondDB |
Definition at line 36 of file JetCorrectionService.h.
JetCorrectionService< Corrector >::JetCorrectionService | ( | const edm::ParameterSet & | fConfig | ) | [inline] |
Definition at line 52 of file JetCorrectionService.h.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), label, JetCorrectionService< Corrector >::mAlgo, JetCorrectionService< Corrector >::mDebug, JetCorrectionService< Corrector >::mEra, JetCorrectionService< Corrector >::mLevel, JetCorrectionService< Corrector >::mPayloadName, JetCorrectionService< Corrector >::mSection, JetCorrectionService< Corrector >::mUseCondDB, 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"); mUseCondDB = fConfig.getUntrackedParameter<bool>("useCondDB",false); mDebug = fConfig.getUntrackedParameter<bool>("debug",false); mPayloadName = mAlgo; setWhatProduced(this, label); findingRecord <JetCorrectionsRecord> (); }
JetCorrectionService< Corrector >::~JetCorrectionService | ( | ) | [inline] |
Definition at line 68 of file JetCorrectionService.h.
{}
boost::shared_ptr<JetCorrector> JetCorrectionService< Corrector >::produce | ( | const JetCorrectionsRecord & | iRecord | ) | [inline] |
Definition at line 70 of file JetCorrectionService.h.
References gather_cfg::cout, convertXMLtoSQLite_cfg::fileName, edm::FileInPath::fullPath(), edm::eventsetup::EventSetupRecord::get(), JetCorrectionService< Corrector >::mAlgo, JetCorrectionService< Corrector >::mDebug, JetCorrectionService< Corrector >::mEra, JetCorrectionService< Corrector >::mLevel, JetCorrectionService< Corrector >::mParameterSet, JetCorrectionService< Corrector >::mPayloadName, JetCorrectionService< Corrector >::mSection, and JetCorrectionService< Corrector >::mUseCondDB.
{ if (mUseCondDB) { edm::ESHandle<JetCorrectorParametersCollection> JetCorParColl; iRecord.get(mPayloadName,JetCorParColl); JetCorrectorParameters const & JetCorPar = (*JetCorParColl)[ mLevel ]; boost::shared_ptr<JetCorrector> mCorrector(new Corrector(JetCorPar,mParameterSet)); return mCorrector; } else { 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; } }
void JetCorrectionService< Corrector >::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | fIOV | ||
) | [inline, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 98 of file JetCorrectionService.h.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ fIOV = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); // anytime }
std::string JetCorrectionService< Corrector >::mAlgo [private] |
Definition at line 44 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
bool JetCorrectionService< Corrector >::mDebug [private] |
Definition at line 48 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
std::string JetCorrectionService< Corrector >::mEra [private] |
Definition at line 43 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
std::string JetCorrectionService< Corrector >::mLevel [private] |
Definition at line 42 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
edm::ParameterSet JetCorrectionService< Corrector >::mParameterSet [private] |
Definition at line 41 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::produce().
std::string JetCorrectionService< Corrector >::mPayloadName [private] |
Definition at line 46 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
std::string JetCorrectionService< Corrector >::mSection [private] |
Definition at line 45 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().
bool JetCorrectionService< Corrector >::mUseCondDB [private] |
Definition at line 47 of file JetCorrectionService.h.
Referenced by JetCorrectionService< Corrector >::JetCorrectionService(), and JetCorrectionService< Corrector >::produce().