All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Static Private Member Functions | List of all members
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 11 of file larsim/larsim/EventWeight/Base/WeightCalcFactory.h.

Member Function Documentation

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

Definition at line 6 of file larsim/larsim/EventWeight/Base/WeightCalcFactory.cxx.

7  {
8  std::map<std::string, WeightCalcCreator*>::iterator i;
9  i = GetTable().find(wghcalcname);
10 
11  if (i != GetTable().end())
12  return i->second->Create();
13  else
14  return (WeightCalc*)NULL;
15  }
static std::map< std::string, WeightCalcCreator * > & GetTable()
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
std::map< std::string, WeightCalcCreator * > & evwgh::WeightCalcFactory::GetTable ( )
staticprivate

Definition at line 22 of file larsim/larsim/EventWeight/Base/WeightCalcFactory.cxx.

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

Definition at line 17 of file larsim/larsim/EventWeight/Base/WeightCalcFactory.cxx.

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

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