CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Private Types | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
XrdAdaptor::QualityMetricFactory Class Reference

#include <QualityMetric.h>

Private Types

typedef std::unordered_map
< std::string,
QualityMetricUniqueSource * > 
MetricMap
 

Static Private Member Functions

static std::unique_ptr
< QualityMetricSource
get (timespec now, const std::string &id)
 

Private Attributes

MetricMap m_sources
 

Static Private Attributes

static QualityMetricFactorym_instance = new QualityMetricFactory()
 

Friends

class Source
 

Detailed Description

Definition at line 59 of file QualityMetric.h.

Member Typedef Documentation

typedef std::unordered_map<std::string, QualityMetricUniqueSource*> XrdAdaptor::QualityMetricFactory::MetricMap
private

Definition at line 69 of file QualityMetric.h.

Member Function Documentation

std::unique_ptr< QualityMetricSource > QualityMetricFactory::get ( timespec  now,
const std::string &  id 
)
staticprivate

Definition at line 158 of file QualityMetric.cc.

References m_instance, m_sources, XrdAdaptor::QualityMetricUniqueSource::newSource(), and source.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

159 {
160  MetricMap::const_iterator it = m_instance->m_sources.find(id);
162  if (it == m_instance->m_sources.end())
163  {
164  source = new QualityMetricUniqueSource(now);
165  m_instance->m_sources[id] = source;
166  }
167  else
168  {
169  source = it->second;
170  }
171  return source->newSource(now);
172 }
std::unique_ptr< QualityMetricSource > newSource(timespec now)
static QualityMetricFactory * m_instance
Definition: QualityMetric.h:67
static std::string const source
Definition: EdmProvDump.cc:42

Friends And Related Function Documentation

friend class Source
friend

Definition at line 61 of file QualityMetric.h.

Member Data Documentation

QualityMetricFactory * QualityMetricFactory::m_instance = new QualityMetricFactory()
staticprivate

Definition at line 67 of file QualityMetric.h.

Referenced by get().

MetricMap XrdAdaptor::QualityMetricFactory::m_sources
private

Definition at line 70 of file QualityMetric.h.

Referenced by get().