CMS 3D CMS Logo

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::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 ()
 
virtual std::vector< const 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 221 of file MVAComputer.h.

Member Typedef Documentation

◆ CacheId

Definition at line 234 of file MVAComputer.h.

Constructor & Destructor Documentation

◆ MVAComputer() [1/2]

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

Definition at line 110 of file MVAComputer.cc.

static MVAComputer::CacheId getNextMVAComputerCacheId()
Definition: MVAComputer.cc:104

◆ MVAComputer() [2/2]

PhysicsTools::Calibration::MVAComputer::MVAComputer ( const MVAComputer orig)

Definition at line 112 of file MVAComputer.cc.

References addProcessor(), and processors.

113  : inputSet(orig.inputSet), output(orig.output), cacheId(orig.cacheId) {
114  for (std::vector<VarProcessor *>::const_iterator iter = orig.processors.begin(); iter != orig.processors.end();
115  ++iter)
116  addProcessor(*iter);
117  }
void addProcessor(const VarProcessor *proc)
Definition: MVAComputer.cc:149
std::vector< Variable > inputSet
Definition: MVAComputer.h:238

◆ ~MVAComputer()

PhysicsTools::Calibration::MVAComputer::~MVAComputer ( )
virtual

Definition at line 119 of file MVAComputer.cc.

References processors.

119  {
120  for (std::vector<VarProcessor *>::iterator iter = processors.begin(); iter != processors.end(); ++iter)
121  delete *iter;
122  processors.clear();
123  }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:242

Member Function Documentation

◆ addProcessor()

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

Definition at line 149 of file MVAComputer.cc.

References cacheId, PhysicsTools::Calibration::getNextMVAComputerCacheId(), ValidateTausOnZEEFastSim_cff::proc, and processors.

Referenced by MVAComputer(), and operator=().

149  {
151  processors.push_back(proc->clone().release());
152  }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:242
static MVAComputer::CacheId getNextMVAComputerCacheId()
Definition: MVAComputer.cc:104

◆ changed()

bool PhysicsTools::Calibration::MVAComputer::changed ( CacheId  old) const
inline

Definition at line 236 of file MVAComputer.h.

References cacheId.

Referenced by GenericMVAComputerCache::update().

236 { return old != cacheId; }

◆ getCacheId()

CacheId PhysicsTools::Calibration::MVAComputer::getCacheId ( ) const
inline

Definition at line 235 of file MVAComputer.h.

References cacheId.

Referenced by GenericMVAComputerCache::update().

◆ getProcessors() [1/2]

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

Definition at line 141 of file MVAComputer.cc.

References processors.

141 { return processors; }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:242

◆ getProcessors() [2/2]

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

Definition at line 143 of file MVAComputer.cc.

References filterCSVwithJSON::copy, processors, and runTheMatrix::ret.

143  {
144  std::vector<const VarProcessor *> ret(processors.size());
145  std::copy(processors.begin(), processors.end(), ret.begin());
146  return ret;
147  }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:242
ret
prodAgent to be discontinued

◆ operator=()

MVAComputer & PhysicsTools::Calibration::MVAComputer::operator= ( const MVAComputer orig)

Definition at line 125 of file MVAComputer.cc.

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

125  {
126  inputSet = orig.inputSet;
127  output = orig.output;
128  cacheId = orig.cacheId;
129 
130  for (std::vector<VarProcessor *>::iterator iter = processors.begin(); iter != processors.end(); ++iter)
131  delete *iter;
132  processors.clear();
133 
134  for (std::vector<VarProcessor *>::const_iterator iter = orig.processors.begin(); iter != orig.processors.end();
135  ++iter)
136  addProcessor(*iter);
137 
138  return *this;
139  }
std::vector< VarProcessor * > processors
Definition: MVAComputer.h:242
void addProcessor(const VarProcessor *proc)
Definition: MVAComputer.cc:149
std::vector< Variable > inputSet
Definition: MVAComputer.h:238

◆ serialize()

template<class Archive >
void PhysicsTools::Calibration::MVAComputer::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 246 of file MVAComputer.h.

◆ cond::serialization::access

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

Definition at line 246 of file MVAComputer.h.

Member Data Documentation

◆ cacheId

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

Definition at line 244 of file MVAComputer.h.

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

◆ inputSet

std::vector<Variable> PhysicsTools::Calibration::MVAComputer::inputSet

Definition at line 238 of file MVAComputer.h.

Referenced by operator=().

◆ output

unsigned int PhysicsTools::Calibration::MVAComputer::output

◆ processors

std::vector<VarProcessor *> PhysicsTools::Calibration::MVAComputer::processors
private

Definition at line 242 of file MVAComputer.h.

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