Public Member Functions | |
JetCorrectorDBReader (const edm::ParameterSet &) | |
~JetCorrectorDBReader () | |
Private Member Functions | |
virtual void | analyze (const edm::Event &, const edm::EventSetup &) |
virtual void | beginJob () |
virtual void | endJob () |
Private Attributes | |
bool | mCreateTextFile |
std::string | mGlobalTag |
std::string | mPayloadName |
bool | mPrintScreen |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 39 of file JetCorrectorDBReader.cc.
JetCorrectorDBReader::JetCorrectorDBReader | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 55 of file JetCorrectorDBReader.cc.
References edm::ParameterSet::getUntrackedParameter(), mCreateTextFile, mGlobalTag, mPayloadName, and mPrintScreen.
{ mPayloadName = iConfig.getUntrackedParameter<std::string>("payloadName"); mGlobalTag = iConfig.getUntrackedParameter<std::string>("globalTag"); mPrintScreen = iConfig.getUntrackedParameter<bool>("printScreen"); mCreateTextFile = iConfig.getUntrackedParameter<bool>("createTextFile"); }
JetCorrectorDBReader::~JetCorrectorDBReader | ( | ) |
Definition at line 64 of file JetCorrectorDBReader.cc.
{ }
void JetCorrectorDBReader::analyze | ( | const edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 69 of file JetCorrectorDBReader.cc.
References gather_cfg::cout, edm::EventSetup::get(), relativeConstraints::keys, mCreateTextFile, mGlobalTag, mPayloadName, mPrintScreen, JetCorrectorParameters::printFile(), and JetCorrectorParameters::printScreen().
{ edm::ESHandle<JetCorrectorParametersCollection> JetCorParamsColl; std::cout <<"Inspecting JEC payload with label: "<< mPayloadName <<std::endl; iSetup.get<JetCorrectionsRecord>().get(mPayloadName,JetCorParamsColl); std::vector<JetCorrectorParametersCollection::key_type> keys; JetCorParamsColl->validKeys( keys ); for ( std::vector<JetCorrectorParametersCollection::key_type>::const_iterator ibegin = keys.begin(), iend = keys.end(), ikey = ibegin; ikey != iend; ++ikey ) { std::cout<<"-------------------------------------------------" << std::endl; std::cout<<"Processing key = " << *ikey << std::endl; std::cout<<"object label: "<<JetCorParamsColl->findLabel(*ikey)<<std::endl; JetCorrectorParameters const & JetCorParams = (*JetCorParamsColl)[*ikey]; if (mCreateTextFile) { std::cout<<"Creating txt file: "<<mGlobalTag+"_"+mPayloadName+"_"+JetCorParamsColl->findLabel(*ikey)+".txt"<<std::endl; JetCorParams.printFile(mGlobalTag+"_"+JetCorParamsColl->findLabel(*ikey)+"_"+mPayloadName+".txt"); } if (mPrintScreen) JetCorParams.printScreen(); } }
void JetCorrectorDBReader::beginJob | ( | void | ) | [private, virtual] |
void JetCorrectorDBReader::endJob | ( | void | ) | [private, virtual] |
bool JetCorrectorDBReader::mCreateTextFile [private] |
Definition at line 51 of file JetCorrectorDBReader.cc.
Referenced by analyze(), and JetCorrectorDBReader().
std::string JetCorrectorDBReader::mGlobalTag [private] |
Definition at line 50 of file JetCorrectorDBReader.cc.
Referenced by analyze(), and JetCorrectorDBReader().
std::string JetCorrectorDBReader::mPayloadName [private] |
Definition at line 50 of file JetCorrectorDBReader.cc.
Referenced by analyze(), and JetCorrectorDBReader().
bool JetCorrectorDBReader::mPrintScreen [private] |
Definition at line 51 of file JetCorrectorDBReader.cc.
Referenced by analyze(), and JetCorrectorDBReader().