CMS 3D CMS Logo

MVATrainerFileSave.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_MVATrainer_MVATrainerFileSave_h
2 #define PhysicsTools_MVATrainer_MVATrainerFileSave_h
3 
4 #include <memory>
5 #include <vector>
6 #include <string>
7 
12 
14 
15 namespace PhysicsTools {
16 
18  public:
19  explicit MVATrainerFileSave(const edm::ParameterSet &params);
20 
21  void analyze(const edm::Event& iEvent,
22  const edm::EventSetup& iSetup) override;
23 
24  void endJob() override;
25 
26  protected:
27  virtual const Calibration::MVAComputerContainer *
28  getToPut(const edm::EventSetup& es) const = 0;
29 
30  bool trained;
31 
32  private:
33  typedef std::map<std::string, std::string> LabelFileMap;
34 
35  LabelFileMap toPut;
36  std::unique_ptr<Calibration::MVAComputerContainer> calib;
37  bool saved;
38 };
39 
40 } // namespace PhysicsTools
41 
42 #endif // PhysicsTools_MVATrainer_MVATrainerFileSave_h
virtual const Calibration::MVAComputerContainer * getToPut(const edm::EventSetup &es) const =0
MVATrainerFileSave(const edm::ParameterSet &params)
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::unique_ptr< Calibration::MVAComputerContainer > calib
std::map< std::string, std::string > LabelFileMap