CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_4/src/PhysicsTools/MVATrainer/interface/MVATrainerSave.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_MVATrainer_MVATrainerSave_h
00002 #define PhysicsTools_MVATrainer_MVATrainerSave_h
00003 
00004 #include <memory>
00005 #include <string>
00006 
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 #include "FWCore/Framework/interface/Event.h"
00009 #include "FWCore/Framework/interface/EventSetup.h"
00010 #include "FWCore/Framework/interface/EDAnalyzer.h"
00011 
00012 #include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h"
00013 
00014 namespace PhysicsTools {
00015 
00016 class MVATrainerSave : public edm::EDAnalyzer {
00017     public:
00018         explicit MVATrainerSave(const edm::ParameterSet &params);
00019 
00020         virtual void analyze(const edm::Event& iEvent,
00021                              const edm::EventSetup& iSetup);
00022 
00023         virtual void endJob();
00024 
00025     protected:
00026         virtual const Calibration::MVAComputer *
00027         getToPut(const edm::EventSetup& es) const = 0;
00028 
00029         virtual std::string getRecordName() const = 0;
00030 
00031     private:
00032         std::auto_ptr<Calibration::MVAComputer> calib;
00033         bool                                    saved;
00034 };
00035 
00036 } // namespace PhysicsTools
00037 
00038 #endif // PhysicsTools_MVATrainer_MVATrainerSave_h