CMS 3D CMS Logo

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
const T & get() const
Definition: EventSetup.h:55
MVATrainerFileSaveImpl(const edm::ParameterSet &params)
T const * product() const
Definition: ESHandle.h:86
virtual const Calibration::MVAComputerContainer * getToPut(const edm::EventSetup &es) const