CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/PhysicsTools/MVATrainer/interface/MVATrainerContainerSave.h

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