00001 #ifndef PhysicsTools_MVATrainer_Source_h 00002 #define PhysicsTools_MVATrainer_Source_h 00003 00004 #include "PhysicsTools/MVAComputer/interface/AtomicId.h" 00005 00006 #include "PhysicsTools/MVATrainer/interface/SourceVariable.h" 00007 #include "PhysicsTools/MVATrainer/interface/SourceVariableSet.h" 00008 00009 namespace PhysicsTools { 00010 00011 class MVATrainer; 00012 00013 class Source { 00014 public: 00015 Source(AtomicId name, bool trained = false) : 00016 trained(trained), name(name) {} 00017 virtual ~Source() {} 00018 00019 inline AtomicId getName() const { return name; } 00020 00021 inline SourceVariable *getOutput(AtomicId name) const 00022 { return outputs.find(name); } 00023 00024 inline bool isTrained() const { return trained; } 00025 00026 inline const SourceVariableSet &getInputs() const { return inputs; } 00027 inline const SourceVariableSet &getOutputs() const { return outputs; } 00028 00029 protected: 00030 friend class MVATrainer; 00031 00032 inline SourceVariableSet &getInputs() { return inputs; } 00033 inline SourceVariableSet &getOutputs() { return outputs; } 00034 00035 bool trained; 00036 00037 private: 00038 AtomicId name; 00039 SourceVariableSet inputs; 00040 SourceVariableSet outputs; 00041 }; 00042 00043 } // namespace PhysicsTools 00044 00045 #endif // PhysicsTools_MVATrainer_Source_h