LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
evwgh::WeightCalcFactory Class Reference

#include "WeightCalcFactory.h"

Static Public Member Functions

static WeightCalcCreate (const std::string &classname)
 
static void Register (const std::string &wghcalcname, WeightCalcCreator *creator)
 

Static Private Member Functions

static std::map< std::string, WeightCalcCreator * > & GetTable ()
 

Detailed Description

Definition at line 8 of file WeightCalcFactory.h.

Member Function Documentation

WeightCalc * evwgh::WeightCalcFactory::Create ( const std::string &  classname)
static

Definition at line 5 of file WeightCalcFactory.cxx.

References evd::details::end(), and GetTable().

Referenced by evwgh::WeightManager::Configure().

6  {
8  i = GetTable().find(wghcalcname);
9 
10  if (i != GetTable().end())
11  return i->second->Create();
12  else
13  return (WeightCalc*)NULL;
14  }
intermediate_table::iterator iterator
static std::map< std::string, WeightCalcCreator * > & GetTable()
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
std::map< std::string, WeightCalcCreator * > & evwgh::WeightCalcFactory::GetTable ( )
staticprivate

Definition at line 21 of file WeightCalcFactory.cxx.

Referenced by Create(), and Register().

22  {
23  static std::map<std::string, WeightCalcCreator*> table;
24  return table;
25  }
void evwgh::WeightCalcFactory::Register ( const std::string &  wghcalcname,
WeightCalcCreator creator 
)
static

Definition at line 16 of file WeightCalcFactory.cxx.

References GetTable().

Referenced by evwgh::WeightCalcCreator::WeightCalcCreator().

17  {
18  GetTable()[wghcalcname] = creator;
19  }
static std::map< std::string, WeightCalcCreator * > & GetTable()

The documentation for this class was generated from the following files: