CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Friends
PhysicsTools::MVATrainerLooper::Trainer Class Reference

#include <MVATrainerLooper.h>

Inheritance diagram for PhysicsTools::MVATrainerLooper::Trainer:
PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::Trainer

Public Member Functions

const TrainObject getCalibration () const
 
const MVATrainergetTrainer () const
 
 Trainer (const edm::ParameterSet &params)
 
virtual ~Trainer ()
 

Private Attributes

TrainObject trainCalib
 
std::auto_ptr< MVATrainertrainer
 

Friends

class MVATrainerLooper
 

Detailed Description

Definition at line 37 of file MVATrainerLooper.h.

Constructor & Destructor Documentation

PhysicsTools::MVATrainerLooper::Trainer::Trainer ( const edm::ParameterSet params)

Definition at line 29 of file MVATrainerLooper.cc.

References edm::errors::Configuration, edm::hlt::Exception, edm::FileInPath::fullPath(), edm::Entry::getFileInPath(), edm::Entry::getString(), edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::retrieveUntracked(), AlCaHLTBitMon_QueryRunRegistry::string, trainer, and edm::Entry::typeCode().

30 {
31  const edm::Entry *entry = params.retrieveUntracked("trainDescription");
32  if (!entry)
34  "MissingParameter:")
35  << "The required parameter 'trainDescription' "
36  "was not specified." << std::endl;;
37  std::string trainDescription;
38  if (entry->typeCode() == 'F')
39  trainDescription = entry->getFileInPath().fullPath();
40  else
41  trainDescription = entry->getString();
42 
43  bool useXSLT = params.getUntrackedParameter<bool>("useXSLT", false);
44  bool doLoad = params.getUntrackedParameter<bool>("loadState", false);
45  bool doSave = params.getUntrackedParameter<bool>("saveState", false);
46  bool doMonitoring = params.getUntrackedParameter<bool>("monitoring", false);
47 
48  trainer.reset(new MVATrainer(trainDescription, useXSLT));
49 
50  if (doLoad)
51  trainer->loadState();
52 
53  trainer->setAutoSave(doSave);
54  trainer->setCleanup(!doSave);
55  trainer->setMonitoring(doMonitoring);
56 }
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< MVATrainer > trainer
FileInPath getFileInPath() const
Definition: Entry.cc:787
char typeCode() const
Definition: Entry.h:175
Entry const * retrieveUntracked(char const *) const
std::string fullPath() const
Definition: FileInPath.cc:165
std::string getString() const
Definition: Entry.cc:764
virtual PhysicsTools::MVATrainerLooper::Trainer::~Trainer ( )
inlinevirtual

Definition at line 40 of file MVATrainerLooper.h.

40 {}

Member Function Documentation

const TrainObject PhysicsTools::MVATrainerLooper::Trainer::getCalibration ( ) const
inline
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().

43  { return trainer.get(); }
std::auto_ptr< MVATrainer > trainer

Friends And Related Function Documentation

friend class MVATrainerLooper
friend

Definition at line 48 of file MVATrainerLooper.h.

Member Data Documentation

TrainObject PhysicsTools::MVATrainerLooper::Trainer::trainCalib
private
std::auto_ptr<MVATrainer> PhysicsTools::MVATrainerLooper::Trainer::trainer
private