CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes

PhysicsTools::MVATrainerLooper Class Reference

#include <MVATrainerLooper.h>

Inheritance diagram for PhysicsTools::MVATrainerLooper:
edm::ESProducerLooper edm::ESProducer edm::EventSetupRecordIntervalFinder edm::EDLooper edm::ESProxyFactoryProducer edm::EDLooperBase edm::eventsetup::DataProxyProvider PhysicsTools::MVATrainerContainerLooperImpl< Record_t > PhysicsTools::MVATrainerLooperImpl< Record_t >

List of all members.

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 &params)
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 TrainerContainergetTrainers () const

Private Attributes

bool dataProcessedInLoop
TrainerContainer trainers

Detailed Description

Definition at line 18 of file MVATrainerLooper.h.


Member Typedef Documentation

Definition at line 31 of file MVATrainerLooper.h.

Definition at line 29 of file MVATrainerLooper.h.


Constructor & Destructor Documentation

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.

{
}

Member Function Documentation

void PhysicsTools::MVATrainerLooper::addTrainer ( Trainer trainer) [inline, protected]
edm::EDLooper::Status PhysicsTools::MVATrainerLooper::duringLoop ( const edm::Event ,
const edm::EventSetup  
) [virtual]
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]
template<class T >
static bool PhysicsTools::MVATrainerLooper::isUntrained ( const T ptr) [inline, static]
template<>
bool PhysicsTools::MVATrainerLooper::isUntrained ( const Calibration::MVAComputerContainer ptr) [inline]

Definition at line 90 of file MVATrainerLooper.h.

{ return dynamic_cast<const UntrainedMVAComputerContainer*>(ptr) != 0; }
template<>
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());
        }
}

Member Data Documentation

Definition at line 82 of file MVATrainerLooper.h.

Referenced by duringLoop(), and startingNewLoop().