CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MVATrainerFileSaveImpl.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_MVATrainer_MVATrainerFileSaveImpl_h
2 #define PhysicsTools_MVATrainer_MVATrainerFileSaveImpl_h
3 
4 #include <iostream>
5 #include <memory>
6 #include <vector>
7 #include <string>
8 
13 
15 
17 
18 namespace PhysicsTools {
19 
20 template<typename Record_t>
22  public:
23  explicit MVATrainerFileSaveImpl(const edm::ParameterSet &params) :
24  MVATrainerFileSave(params) {}
25 
26  protected:
27  virtual const Calibration::MVAComputerContainer *
28  getToPut(const edm::EventSetup& es) const
29  {
31  if (trained)
32  es.get<Record_t>().get("trained", handle);
33  else
34  es.get<Record_t>().get(handle);
35  return handle.product();
36  }
37 };
38 
39 } // namespace PhysicsTools
40 
41 #endif // PhysicsTools_MVATrainer_MVATrainerFileSaveImpl_h
tuple handle
Definition: patZpeak.py:22
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
MVATrainerFileSaveImpl(const edm::ParameterSet &params)
virtual const Calibration::MVAComputerContainer * getToPut(const edm::EventSetup &es) const