#include <MVAComputerESSourceBase.h>
Public Types | |
typedef boost::shared_ptr < Calibration::MVAComputerContainer > | ReturnType |
Public Member Functions | |
MVAComputerESSourceBase (const edm::ParameterSet ¶ms) | |
virtual | ~MVAComputerESSourceBase () |
Protected Types | |
typedef std::map< std::string, std::string > | LabelFileMap |
Protected Member Functions | |
ReturnType | produce () const |
Protected Attributes | |
LabelFileMap | mvaCalibrations |
Definition at line 17 of file MVAComputerESSourceBase.h.
typedef std::map<std::string, std::string> PhysicsTools::MVAComputerESSourceBase::LabelFileMap [protected] |
Definition at line 27 of file MVAComputerESSourceBase.h.
typedef boost::shared_ptr<Calibration::MVAComputerContainer> PhysicsTools::MVAComputerESSourceBase::ReturnType |
Definition at line 19 of file MVAComputerESSourceBase.h.
PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase | ( | const edm::ParameterSet & | params | ) |
Definition at line 21 of file MVAComputerESSourceBase.cc.
References edm::Entry::getFileInPath(), edm::ParameterSet::getParameterNames(), edm::Entry::getString(), mvaCalibrations, h::names, path(), edm::ParameterSet::retrieve(), and edm::Entry::typeCode().
{ std::vector<std::string> names = params.getParameterNames(); for(std::vector<std::string>::const_iterator iter = names.begin(); iter != names.end(); iter++) { if (iter->c_str()[0] == '@') continue; const edm::Entry &entry = params.retrieve(*iter); std::string path; if (entry.typeCode() == 'F') path = entry.getFileInPath().fullPath(); else path = entry.getString(); mvaCalibrations[*iter] = path; } }
PhysicsTools::MVAComputerESSourceBase::~MVAComputerESSourceBase | ( | ) | [virtual] |
Definition at line 42 of file MVAComputerESSourceBase.cc.
{ }
MVAComputerESSourceBase::ReturnType PhysicsTools::MVAComputerESSourceBase::produce | ( | ) | const [protected] |
Definition at line 47 of file MVAComputerESSourceBase.cc.
References mvaCalibrations, and PhysicsTools::MVAComputer::readCalibration().
{ ReturnType container(new Calibration::MVAComputerContainer); for(LabelFileMap::const_iterator iter = mvaCalibrations.begin(); iter != mvaCalibrations.end(); iter++) { std::auto_ptr<Calibration::MVAComputer> calibration( MVAComputer::readCalibration(iter->second.c_str())); container->add(iter->first) = *calibration; } return container; }
Definition at line 29 of file MVAComputerESSourceBase.h.
Referenced by MVAComputerESSourceBase(), and produce().