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 WeightCalcFactory.h.

Member Function Documentation

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

Definition at line 6 of file WeightCalcFactory.cxx.

7  {
9  i = GetTable().find(wghcalcname);
10 
11  if (i != GetTable().end())
12  return i->second->Create();
13  else
14  return (WeightCalc*)NULL;
15  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
intermediate_table::iterator iterator
static std::map< std::string, WeightCalcCreator * > & GetTable()
std::map< std::string, WeightCalcCreator * > & evwgh::WeightCalcFactory::GetTable ( )
staticprivate

Definition at line 22 of file 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 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: