WeightCalcFactory.cxx
Go to the documentation of this file.
1 #include "WeightCalcFactory.h"
2 #include "WeightCalcCreator.h"
3 
4 namespace evwgh {
5 
7  {
9  i = GetTable().find(wghcalcname);
10 
11  if (i != GetTable().end())
12  return i->second->Create();
13  else
14  return (WeightCalc*)NULL;
15  }
16 
17  void WeightCalcFactory::Register(const std::string& wghcalcname, WeightCalcCreator* creator)
18  {
19  GetTable()[wghcalcname] = creator;
20  }
21 
22  std::map<std::string, WeightCalcCreator*>& WeightCalcFactory::GetTable()
23  {
24  static std::map<std::string, WeightCalcCreator*> table;
25  return table;
26  }
27 
28 }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
intermediate_table::iterator iterator
static WeightCalc * Create(const std::string &classname)
std::string string
Definition: nybbler.cc:12
static std::map< std::string, WeightCalcCreator * > & GetTable()
static void Register(const std::string &wghcalcname, WeightCalcCreator *creator)