00001 #include <iostream> 00002 #include <vector> 00003 #include <string> 00004 00005 #include <xercesc/dom/DOM.hpp> 00006 00007 #include "FWCore/Utilities/interface/Exception.h" 00008 00009 #include "PhysicsTools/MVAComputer/interface/AtomicId.h" 00010 00011 #include "PhysicsTools/MVATrainer/interface/MVATrainer.h" 00012 #include "PhysicsTools/MVATrainer/interface/TrainProcessor.h" 00013 00014 XERCES_CPP_NAMESPACE_USE 00015 00016 using namespace PhysicsTools; 00017 00018 namespace { // anonymous 00019 00020 class ProcCount : public TrainProcessor { 00021 public: 00022 typedef TrainProcessor::Registry<ProcCount>::Type Registry; 00023 00024 ProcCount(const char *name, const AtomicId *id, 00025 MVATrainer *trainer); 00026 virtual ~ProcCount(); 00027 00028 virtual Variable::Flags getDefaultFlags() const 00029 { return Variable::FLAG_ALL; } 00030 00031 virtual void configure(DOMElement *elem); 00032 virtual Calibration::VarProcessor *getCalibration() const; 00033 00034 private: 00035 std::vector<double> neutrals; 00036 }; 00037 00038 static ProcCount::Registry registry("ProcCount"); 00039 00040 ProcCount::ProcCount(const char *name, const AtomicId *id, 00041 MVATrainer *trainer) : 00042 TrainProcessor(name, id, trainer) 00043 { 00044 } 00045 00046 ProcCount::~ProcCount() 00047 { 00048 } 00049 00050 void ProcCount::configure(DOMElement *elem) 00051 { 00052 trained = true; 00053 } 00054 00055 Calibration::VarProcessor *ProcCount::getCalibration() const 00056 { 00057 return new Calibration::ProcCount; 00058 } 00059 00060 } // anonymous namespace