All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sbncode/sbncode/SBNEventWeight/Base/WeightCalcFactory.h
Go to the documentation of this file.
1 #ifndef _SBN_WEIGHTCALCFACTORY_H_
2 #define _SBN_WEIGHTCALCFACTORY_H_
3 
4 // Imported from LArSoft's larsim EventWeight
5 
6 #include <map>
7 #include <string>
8 
9 namespace sbn {
10  namespace evwgh {
11 
12 class WeightCalc;
13 class WeightCalcCreator;
14 
16 public:
17  static WeightCalc* Create(const std::string& classname);
18 
19  static void Register(const std::string& wghcalcname,
20  WeightCalcCreator* creator);
21 
22 private:
23  static std::map<std::string, WeightCalcCreator*>& GetTable();
24 };
25 
26  } // namespace evwgh
27 } // namespace sbn
28 
29 #endif // _SBN_WEIGHTCALCFACTORY_H_
30 
static void Register(const std::string &wghcalcname, WeightCalcCreator *creator)
static std::map< std::string, WeightCalcCreator * > & GetTable()
static WeightCalc * Create(const std::string &classname)