CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
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, MVAComputerEntry
 

Public Member Functions

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

Private Member Functions

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

Private Attributes

CacheId cacheId
 
std::vector< Entryentries
 

Friends

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

Detailed Description

Definition at line 247 of file MVAComputer.h.

Member Typedef Documentation

Definition at line 259 of file MVAComputer.h.

Definition at line 249 of file MVAComputer.h.

Constructor & Destructor Documentation

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

Definition at line 195 of file MVAComputer.cc.

195  :
197 {
198 }
static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:189
virtual PhysicsTools::Calibration::MVAComputerContainer::~MVAComputerContainer ( )
inlinevirtual

Member Function Documentation

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

Definition at line 200 of file MVAComputer.cc.

References cacheId, Comparator::Comparator(), entries, mps_splice::entry, PhysicsTools::Calibration::getNextMVAComputerContainerCacheId(), label, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

201 {
203 
204  entries.push_back(std::make_pair(label, MVAComputer()));
205  return entries.back().second;
206 }
const std::string & label
Definition: MVAComputer.cc:218
static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:189
bool PhysicsTools::Calibration::MVAComputerContainer::changed ( CacheId  old) const
inline
bool PhysicsTools::Calibration::MVAComputerContainer::contains ( const std::string &  label) const
virtual

Reimplemented in PhysicsTools::MVATrainerContainer.

Definition at line 236 of file MVAComputer.cc.

References entries.

Referenced by LumiList.LumiList::__contains__(), PhysicsTools::MVATrainerContainer::contains(), and GenericMVAComputerCache::update().

237 {
238  std::vector<Entry>::const_iterator pos =
239  std::find_if(entries.begin(), entries.end(),
240  Comparator(label));
241  if (pos == entries.end()) return false;
242  return true;
243 }
const std::string & label
Definition: MVAComputer.cc:218
const MVAComputer & PhysicsTools::Calibration::MVAComputerContainer::find ( const std::string &  label) const
virtual

Reimplemented in PhysicsTools::MVATrainerContainer.

Definition at line 222 of file MVAComputer.cc.

References entries.

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().

223 {
224  std::vector<Entry>::const_iterator pos =
225  std::find_if(entries.begin(), entries.end(),
226  Comparator(label));
227 
228  if (pos == entries.end())
229  throw cms::Exception("MVAComputerCalibration")
230  << "Calibration record " << label
231  << " not found in MVAComputerContainer." << std::endl;
232 
233  return pos->second;
234 }
const std::string & label
Definition: MVAComputer.cc:218
CacheId PhysicsTools::Calibration::MVAComputerContainer::getCacheId ( ) const
inline
template<class Archive >
void PhysicsTools::Calibration::MVAComputerContainer::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 268 of file MVAComputer.h.

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

Definition at line 268 of file MVAComputer.h.

Member Data Documentation

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

Definition at line 266 of file MVAComputer.h.

Referenced by add().

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