CMS 3D CMS Logo

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

List of all members.

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)

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(), AlCaHLTBitMon_QueryRunRegistry::string, 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.

{}

Member Function Documentation

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(); }

Friends And Related Function Documentation

friend class MVATrainerLooper [friend]

Definition at line 48 of file MVATrainerLooper.h.


Member Data Documentation