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 | Private Attributes
PhysicsTools::Calibration::MVAComputerContainer Class Reference

#include <MVAComputer.h>

Inheritance diagram for PhysicsTools::Calibration::MVAComputerContainer:
PhysicsTools::MVATrainerContainer PhysicsTools::MVATrainerLooper::UntrainedMVAComputerContainer

Public Types

typedef unsigned int CacheId
 
typedef std::pair< std::string,
MVAComputer
Entry
 

Public Member Functions

MVAComputeradd (const std::string &label)
 
bool changed (CacheId old) const
 
virtual const MVAComputerfind (const std::string &label) const
 
CacheId getCacheId () const
 
 MVAComputerContainer ()
 
virtual ~MVAComputerContainer ()
 

Private Attributes

CacheId cacheId
 
std::vector< Entryentries
 

Detailed Description

Definition at line 188 of file MVAComputer.h.

Member Typedef Documentation

Definition at line 199 of file MVAComputer.h.

Definition at line 190 of file MVAComputer.h.

Constructor & Destructor Documentation

PhysicsTools::Calibration::MVAComputerContainer::MVAComputerContainer ( )

Definition at line 163 of file MVAComputer.cc.

163  :
165 {
166 }
static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:157
virtual PhysicsTools::Calibration::MVAComputerContainer::~MVAComputerContainer ( )
inlinevirtual

Definition at line 193 of file MVAComputer.h.

193 {}

Member Function Documentation

MVAComputer & PhysicsTools::Calibration::MVAComputerContainer::add ( const std::string &  label)

Definition at line 168 of file MVAComputer.cc.

References cacheId, entries, and PhysicsTools::Calibration::getNextMVAComputerContainerCacheId().

169 {
171 
172  entries.push_back(std::make_pair(label, MVAComputer()));
173  return entries.back().second;
174 }
static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:157
bool PhysicsTools::Calibration::MVAComputerContainer::changed ( CacheId  old) const
inline

Definition at line 201 of file MVAComputer.h.

References cacheId.

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

201 { return old != cacheId; }
const MVAComputer & PhysicsTools::Calibration::MVAComputerContainer::find ( const std::string &  label) const
virtual

Reimplemented in PhysicsTools::MVATrainerContainer.

Definition at line 190 of file MVAComputer.cc.

References entries, and pos.

Referenced by BeautifulSoup.Tag::__getattr__(), PhysicsTools::MVATrainerContainerSave::analyze(), PhysicsTools::MVATrainerContainer::find(), BeautifulSoup.Tag::firstText(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::init(), GenericMVAComputerCache::update(), and PhysicsTools::MVAComputerCache::update().

191 {
192  std::vector<Entry>::const_iterator pos =
193  std::find_if(entries.begin(), entries.end(),
194  Comparator(label));
195 
196  if (pos == entries.end())
197  throw cms::Exception("MVAComputerCalibration")
198  << "Calibration record " << label
199  << " not found in MVAComputerContainer." << std::endl;
200 
201  return pos->second;
202 }
CacheId PhysicsTools::Calibration::MVAComputerContainer::getCacheId ( ) const
inline

Member Data Documentation

CacheId PhysicsTools::Calibration::MVAComputerContainer::cacheId
private

Definition at line 206 of file MVAComputer.h.

Referenced by add(), changed(), and getCacheId().

std::vector<Entry> PhysicsTools::Calibration::MVAComputerContainer::entries
private