#include <MVATrainerLooper.h>
Public Member Functions | |
const TrainObject | getCalibration () const |
const MVATrainer * | getTrainer () const |
Trainer (const edm::ParameterSet ¶ms) | |
virtual | ~Trainer () |
Private Attributes | |
TrainObject | trainCalib |
std::auto_ptr< MVATrainer > | trainer |
Friends | |
class | MVATrainerLooper |
Definition at line 37 of file MVATrainerLooper.h.
PhysicsTools::MVATrainerLooper::Trainer::Trainer | ( | const edm::ParameterSet & | params | ) |
Reimplemented in PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::Trainer.
Definition at line 29 of file MVATrainerLooper.cc.
References edm::errors::Configuration, Exception, edm::Entry::getFileInPath(), edm::Entry::getString(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::retrieveUntracked(), trainer, and edm::Entry::typeCode().
{ const edm::Entry *entry = params.retrieveUntracked("trainDescription"); if (!entry) throw edm::Exception(edm::errors::Configuration, "MissingParameter:") << "The required parameter 'trainDescription' " "was not specified." << std::endl;; std::string trainDescription; if (entry->typeCode() == 'F') trainDescription = entry->getFileInPath().fullPath(); else trainDescription = entry->getString(); bool useXSLT = params.getUntrackedParameter<bool>("useXSLT", false); bool doLoad = params.getUntrackedParameter<bool>("loadState", false); bool doSave = params.getUntrackedParameter<bool>("saveState", false); bool doMonitoring = params.getUntrackedParameter<bool>("monitoring", false); trainer.reset(new MVATrainer(trainDescription, useXSLT)); if (doLoad) trainer->loadState(); trainer->setAutoSave(doSave); trainer->setCleanup(!doSave); trainer->setMonitoring(doMonitoring); }
virtual PhysicsTools::MVATrainerLooper::Trainer::~Trainer | ( | ) | [inline, virtual] |
Definition at line 40 of file MVATrainerLooper.h.
{}
const TrainObject PhysicsTools::MVATrainerLooper::Trainer::getCalibration | ( | ) | const [inline] |
Definition at line 44 of file MVATrainerLooper.h.
References trainCalib.
Referenced by PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::produce().
{ return trainCalib; }
const MVATrainer* PhysicsTools::MVATrainerLooper::Trainer::getTrainer | ( | ) | const [inline] |
Definition at line 42 of file MVATrainerLooper.h.
References trainer.
Referenced by PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::produce().
{ return trainer.get(); }
friend class MVATrainerLooper [friend] |
Definition at line 48 of file MVATrainerLooper.h.
Definition at line 51 of file MVATrainerLooper.h.
Referenced by getCalibration(), and PhysicsTools::MVATrainerLooper::startingNewLoop().
std::auto_ptr<MVATrainer> PhysicsTools::MVATrainerLooper::Trainer::trainer [private] |
Definition at line 50 of file MVATrainerLooper.h.
Referenced by getTrainer(), PhysicsTools::MVATrainerLooper::startingNewLoop(), and Trainer().