CMS 3D CMS Logo

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

#include <MVAComputer.h>

Inheritance diagram for PhysicsTools::Calibration::MVAComputer:
PhysicsTools::MVATrainerLooper::UntrainedMVAComputer PhysicsTools::TrainMVAComputerCalibration

Public Types

typedef unsigned int CacheId
 

Public Member Functions

void addProcessor (const VarProcessor *proc)
 
bool changed (CacheId old) const
 
CacheId getCacheId () const
 
virtual std::vector
< VarProcessor * > 
getProcessors () const
 
 MVAComputer ()
 
 MVAComputer (const MVAComputer &orig)
 
MVAComputeroperator= (const MVAComputer &orig)
 
virtual ~MVAComputer ()
 

Public Attributes

std::vector< VariableinputSet
 
unsigned int output
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

CacheId cacheId
 
std::vector< VarProcessor * > processors
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 218 of file MVAComputer.h.

Member Typedef Documentation

Definition at line 230 of file MVAComputer.h.

Constructor & Destructor Documentation

PhysicsTools::Calibration::MVAComputer::MVAComputer ( )

Definition at line 135 of file MVAComputer.cc.

135  :
137 {
138 }
static MVAComputer::CacheId getNextMVAComputerCacheId()
Definition: MVAComputer.cc:128
PhysicsTools::Calibration::MVAComputer::MVAComputer ( const MVAComputer orig)

Definition at line 140 of file MVAComputer.cc.

References addProcessor(), and processors.

140  :
141  inputSet(orig.inputSet),
142  output(orig.output),
143  cacheId(orig.cacheId)
144 {
145  for(std::vector<VarProcessor*>::const_iterator iter =
146  orig.processors.begin();
147  iter != orig.processors.end(); ++iter)
148  addProcessor(*iter);
149 }
void addProcessor(const VarProcessor *proc)
Definition: MVAComputer.cc:183
std::vector< Variable > inputSet
Definition: MVAComputer.h:234
PhysicsTools::Calibration::MVAComputer::~MVAComputer ( )
virtual

Definition at line 151 of file MVAComputer.cc.

References processors.

152 {
153  for(std::vector<VarProcessor*>::iterator iter = processors.begin();
154  iter != processors.end(); ++iter)
155  delete *iter;
156  processors.clear();
157 }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:238

Member Function Documentation

void PhysicsTools::Calibration::MVAComputer::addProcessor ( const VarProcessor proc)

Definition at line 183 of file MVAComputer.cc.

References cacheId, PhysicsTools::Calibration::VarProcessor::clone(), PhysicsTools::Calibration::getNextMVAComputerCacheId(), and processors.

Referenced by PhysicsTools::MVATrainer::connectProcessors(), MVAComputer(), and operator=().

184 {
186  processors.push_back(proc->clone().release());
187 }
TrainProcessor *const proc
Definition: MVATrainer.cc:101
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:238
static MVAComputer::CacheId getNextMVAComputerCacheId()
Definition: MVAComputer.cc:128
bool PhysicsTools::Calibration::MVAComputer::changed ( CacheId  old) const
inline

Definition at line 232 of file MVAComputer.h.

References cacheId.

Referenced by GenericMVAComputerCache::update(), and PhysicsTools::MVAComputerCache::update().

232 { return old != cacheId; }
CacheId PhysicsTools::Calibration::MVAComputer::getCacheId ( ) const
inline

Definition at line 231 of file MVAComputer.h.

References cacheId.

Referenced by GenericMVAComputerCache::update(), and PhysicsTools::MVAComputerCache::update().

std::vector< VarProcessor * > PhysicsTools::Calibration::MVAComputer::getProcessors ( ) const
virtual

Definition at line 178 of file MVAComputer.cc.

References processors.

Referenced by PhysicsTools::MVAComputer::setup().

179 {
180  return processors;
181 }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:238
MVAComputer & PhysicsTools::Calibration::MVAComputer::operator= ( const MVAComputer orig)

Definition at line 159 of file MVAComputer.cc.

References addProcessor(), cacheId, inputSet, output, and processors.

160 {
161  inputSet = orig.inputSet;
162  output = orig.output;
163  cacheId = orig.cacheId;
164 
165  for(std::vector<VarProcessor*>::iterator iter = processors.begin();
166  iter != processors.end(); ++iter)
167  delete *iter;
168  processors.clear();
169 
170  for(std::vector<VarProcessor*>::const_iterator iter =
171  orig.processors.begin();
172  iter != orig.processors.end(); ++iter)
173  addProcessor(*iter);
174 
175  return *this;
176 }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:238
void addProcessor(const VarProcessor *proc)
Definition: MVAComputer.cc:183
std::vector< Variable > inputSet
Definition: MVAComputer.h:234
template<class Archive >
void PhysicsTools::Calibration::MVAComputer::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 242 of file MVAComputer.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 242 of file MVAComputer.h.

Member Data Documentation

CacheId PhysicsTools::Calibration::MVAComputer::cacheId
private

Definition at line 240 of file MVAComputer.h.

Referenced by addProcessor(), changed(), getCacheId(), and operator=().

std::vector<Variable> PhysicsTools::Calibration::MVAComputer::inputSet
unsigned int PhysicsTools::Calibration::MVAComputer::output
std::vector<VarProcessor*> PhysicsTools::Calibration::MVAComputer::processors
private

Definition at line 238 of file MVAComputer.h.

Referenced by addProcessor(), getProcessors(), MVAComputer(), operator=(), and ~MVAComputer().