/************************************* * The structure of the classes. * * Author: M.Babai@rug.nl * * Version: * * License: * *************************************/ #ifndef PND_MVA_CLASS_H #define PND_MVA_CLASS_H /** * Struct to describe a class of particles. It stores the name of the class, * the number of examples available and their indices. */ struct PndMvaClass { //! Constructor. /** *@Param name Class name. */ PndMvaClass(std::string const& name); virtual ~PndMvaClass(); PndMvaClass(PndMvaClass const& oth); PndMvaClass& operator=(PndMvaClass const& oth); std::string Name; /**< Name of the class. */ size_t NExamples; /**< Number of examples available of the class. */ size_t StartIdx; /**< Start index of events of this class. */ size_t EndIdx; /**< End index of events of this class. */ private: bool operator== (PndMvaClass const& oth) const; bool operator> (PndMvaClass const& oth) const; bool operator< (PndMvaClass const& oth) const; };// End of interface. //_________________________ Implement. _____ _____________ /** * Constructor implementation. *@Param name Class name. */ inline PndMvaClass::PndMvaClass(std::string const& name) : Name(name), NExamples(0), StartIdx(0), EndIdx(0) {}; //! Copy Constructor. inline PndMvaClass::PndMvaClass(PndMvaClass const& oth) : Name(oth.Name), NExamples(oth.NExamples), StartIdx(oth.StartIdx), EndIdx(oth.EndIdx) {}; //! = operator. inline PndMvaClass& PndMvaClass::operator=(PndMvaClass const& oth) { this->Name = oth.Name; this->NExamples = oth.NExamples; this->StartIdx = oth.StartIdx; this->EndIdx = oth.EndIdx; return (*this); }; //! Destructor inline PndMvaClass::~PndMvaClass() {}; #endif