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>

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 251 of file MVAComputer.h.

Member Typedef Documentation

◆ CacheId

Definition at line 263 of file MVAComputer.h.

◆ Entry

Definition at line 253 of file MVAComputer.h.

Constructor & Destructor Documentation

◆ MVAComputerContainer()

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

Definition at line 159 of file MVAComputer.cc.

static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:154

◆ ~MVAComputerContainer()

virtual PhysicsTools::Calibration::MVAComputerContainer::~MVAComputerContainer ( )
inlinevirtual

Definition at line 256 of file MVAComputer.h.

256 {}

Member Function Documentation

◆ add()

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

Definition at line 161 of file MVAComputer.cc.

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

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

161  {
163 
164  entries.push_back(std::make_pair(label, MVAComputer()));
165  return entries.back().second;
166  }
char const * label
static MVAComputerContainer::CacheId getNextMVAComputerContainerCacheId()
Definition: MVAComputer.cc:154

◆ changed()

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

Definition at line 265 of file MVAComputer.h.

References cacheId.

Referenced by PhysicsTools::MVAComputerCache::update().

◆ contains()

bool PhysicsTools::Calibration::MVAComputerContainer::contains ( const std::string &  label) const
virtual

Definition at line 181 of file MVAComputer.cc.

References entries, mps_splice::entry, and label.

Referenced by LumiList.LumiList::__contains__().

181  {
182  std::vector<Entry>::const_iterator pos =
183  std::find_if(entries.begin(), entries.end(), [&label](const MVAComputerContainer::Entry &entry) {
184  return entry.first == label;
185  });
186  if (pos == entries.end())
187  return false;
188  return true;
189  }
char const * label
std::pair< std::string, MVAComputer > Entry
Definition: MVAComputer.h:253

◆ find()

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

Definition at line 168 of file MVAComputer.cc.

References entries, mps_splice::entry, and label.

Referenced by PhysicsTools::MVAComputerCache::update().

168  {
169  std::vector<Entry>::const_iterator pos =
170  std::find_if(entries.begin(), entries.end(), [&label](const MVAComputerContainer::Entry &entry) {
171  return entry.first == label;
172  });
173 
174  if (pos == entries.end())
175  throw cms::Exception("MVAComputerCalibration")
176  << "Calibration record " << label << " not found in MVAComputerContainer." << std::endl;
177 
178  return pos->second;
179  }
char const * label
std::pair< std::string, MVAComputer > Entry
Definition: MVAComputer.h:253

◆ getCacheId()

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

Definition at line 264 of file MVAComputer.h.

References cacheId.

Referenced by PhysicsTools::MVAComputerCache::update().

◆ serialize()

template<class Archive >
void PhysicsTools::Calibration::MVAComputerContainer::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 272 of file MVAComputer.h.

◆ cond::serialization::access

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

Definition at line 272 of file MVAComputer.h.

Member Data Documentation

◆ cacheId

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

Definition at line 270 of file MVAComputer.h.

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

◆ entries

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