CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MVATrainerContainer.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_MVATrainer_MVATrainerContainer_h
2 #define PhysicsTools_MVATrainer_MVATrainerContainer_h
3 
4 #include <vector>
5 #include <string>
6 #include <memory>
7 
8 #include <boost/shared_ptr.hpp>
9 
13 
14 namespace PhysicsTools {
15 
17  public:
19 
20  virtual const Calibration::MVAComputer &
21  find(const std::string &label) const
22  {
23  Map_t::const_iterator pos = trainCalibs.find(label);
24  if (pos != trainCalibs.end())
25  return *pos->second.get();
26 
28  }
29 
30  void addTrainer(const std::string &label, const Value_t &calibration)
31  { trainCalibs[label] = calibration; }
32 
33  private:
34  typedef std::map<std::string, Value_t> Map_t;
35 
37 };
38 
39 } // namespace PhysicsTools
40 
41 #endif // PhysicsTools_MVATrainer_MVATrainerContainer_h
virtual const MVAComputer & find(const std::string &label) const
Definition: MVAComputer.cc:192
virtual const Calibration::MVAComputer & find(const std::string &label) const
boost::shared_ptr< Calibration::MVAComputer > TrainObject
void addTrainer(const std::string &label, const Value_t &calibration)
MVATrainerLooper::TrainObject Value_t
std::map< std::string, Value_t > Map_t