#include <MVATrainerLooper.h>
Classes | |
class | Trainer |
class | TrainerContainer |
class | UntrainedMVAComputer |
class | UntrainedMVAComputerContainer |
Public Types | |
typedef boost::shared_ptr < Calibration::MVAComputerContainer > | TrainContainer |
typedef boost::shared_ptr < Calibration::MVAComputer > | TrainObject |
Public Member Functions | |
virtual Status | duringLoop (const edm::Event &ev, const edm::EventSetup &es) |
virtual Status | endOfLoop (const edm::EventSetup &es, unsigned int iteration) |
template<> | |
bool | isUntrained (const Calibration::MVAComputerContainer *ptr) |
template<> | |
bool | isUntrained (const Calibration::MVAComputer *ptr) |
MVATrainerLooper (const edm::ParameterSet ¶ms) | |
virtual void | startingNewLoop (unsigned int iteration) |
virtual | ~MVATrainerLooper () |
Static Public Member Functions | |
template<class T > | |
static bool | isUntrained (const T *ptr) |
Protected Member Functions | |
void | addTrainer (Trainer *trainer) |
const TrainerContainer & | getTrainers () const |
Private Attributes | |
bool | dataProcessedInLoop |
TrainerContainer | trainers |
Definition at line 18 of file MVATrainerLooper.h.
typedef boost::shared_ptr<Calibration::MVAComputerContainer> PhysicsTools::MVATrainerLooper::TrainContainer |
Definition at line 31 of file MVATrainerLooper.h.
typedef boost::shared_ptr<Calibration::MVAComputer> PhysicsTools::MVATrainerLooper::TrainObject |
Definition at line 29 of file MVATrainerLooper.h.
PhysicsTools::MVATrainerLooper::MVATrainerLooper | ( | const edm::ParameterSet & | params | ) |
Definition at line 73 of file MVATrainerLooper.cc.
: dataProcessedInLoop(false) { }
PhysicsTools::MVATrainerLooper::~MVATrainerLooper | ( | ) | [virtual] |
Definition at line 78 of file MVATrainerLooper.cc.
{ }
void PhysicsTools::MVATrainerLooper::addTrainer | ( | Trainer * | trainer | ) | [inline, protected] |
Definition at line 76 of file MVATrainerLooper.h.
References PhysicsTools::MVATrainerLooper::TrainerContainer::add(), and trainers.
Referenced by PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::MVATrainerContainerLooperImpl(), and PhysicsTools::MVATrainerLooperImpl< Record_t >::MVATrainerLooperImpl().
edm::EDLooper::Status PhysicsTools::MVATrainerLooper::duringLoop | ( | const edm::Event & | , |
const edm::EventSetup & | |||
) | [virtual] |
Called after all event modules have had a chance to process the edm::Event.
Implements edm::EDLooper.
Definition at line 96 of file MVATrainerLooper.cc.
References PhysicsTools::MVATrainerLooper::TrainerContainer::begin(), PhysicsTools::MVATrainerLooper::TrainerContainer::clear(), dataProcessedInLoop, PhysicsTools::MVATrainerLooper::TrainerContainer::empty(), PhysicsTools::MVATrainerLooper::TrainerContainer::end(), edm::EDLooperBase::kContinue, edm::EDLooperBase::kStop, and trainers.
edm::EDLooper::Status PhysicsTools::MVATrainerLooper::endOfLoop | ( | const edm::EventSetup & | , |
unsigned int | iCounter | ||
) | [virtual] |
Called after the system has finished one loop over the events. Thar argument is a count of how many loops have been processed before this loo. For the first time through the events the argument will be 0.
Implements edm::EDLooperBase.
Definition at line 124 of file edlooper.cc.
References edm::EDLooperBase::kStop.
{ return kStop; }
const TrainerContainer& PhysicsTools::MVATrainerLooper::getTrainers | ( | ) | const [inline, protected] |
Definition at line 78 of file MVATrainerLooper.h.
References trainers.
Referenced by PhysicsTools::MVATrainerLooperImpl< Record_t >::produce(), and PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::produce().
{ return trainers; }
static bool PhysicsTools::MVATrainerLooper::isUntrained | ( | const T * | ptr | ) | [inline, static] |
bool PhysicsTools::MVATrainerLooper::isUntrained | ( | const Calibration::MVAComputerContainer * | ptr | ) | [inline] |
Definition at line 90 of file MVATrainerLooper.h.
{ return dynamic_cast<const UntrainedMVAComputerContainer*>(ptr) != 0; }
bool PhysicsTools::MVATrainerLooper::isUntrained | ( | const Calibration::MVAComputer * | ptr | ) | [inline] |
Definition at line 86 of file MVATrainerLooper.h.
{ return dynamic_cast<const UntrainedMVAComputer*>(ptr) != 0; }
void PhysicsTools::MVATrainerLooper::startingNewLoop | ( | unsigned int | int | ) | [virtual] |
Called before system starts to loop over the events. The argument is a count of how many loops have been processed. For the first time through the events the argument will be 0.
Implements edm::EDLooperBase.
Definition at line 82 of file MVATrainerLooper.cc.
References PhysicsTools::MVATrainerLooper::TrainerContainer::begin(), dataProcessedInLoop, PhysicsTools::MVATrainerLooper::TrainerContainer::end(), PhysicsTools::MVATrainerLooper::Trainer::trainCalib, PhysicsTools::MVATrainerLooper::Trainer::trainer, and trainers.
{ dataProcessedInLoop = false; for(TrainerContainer::const_iterator iter = trainers.begin(); iter != trainers.end(); iter++) { Trainer *trainer = *iter; trainer->trainCalib = TrainObject(trainer->trainer->getTrainCalibration()); } }
bool PhysicsTools::MVATrainerLooper::dataProcessedInLoop [private] |
Definition at line 82 of file MVATrainerLooper.h.
Referenced by duringLoop(), and startingNewLoop().
Definition at line 81 of file MVATrainerLooper.h.
Referenced by addTrainer(), duringLoop(), getTrainers(), PhysicsTools::MVATrainerContainerLooperImpl< Record_t >::MVATrainerContainerLooperImpl(), and startingNewLoop().