PandaRoot
PndMvaClass.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*************************************
14  * The structure of the classes. *
15  * Author: M.Babai@rug.nl *
16  * Version: *
17  * License: *
18  *************************************/
19 //#pragma once
20 #ifndef PND_MVA_CLASS_H
21 #define PND_MVA_CLASS_H
22 
27 struct PndMvaClass {
29 
32  explicit PndMvaClass(std::string const &name);
33 
35  virtual ~PndMvaClass();
36 
38  PndMvaClass(PndMvaClass const &oth);
39 
41  PndMvaClass &operator=(PndMvaClass const &oth);
42 
43  std::string Name;
44  size_t NExamples;
45  size_t StartIdx;
46  size_t EndIdx;
47  size_t NTrainEx;
49  private:
50  bool operator==(PndMvaClass const &oth) const;
51  bool operator>(PndMvaClass const &oth) const;
52  bool operator<(PndMvaClass const &oth) const;
53 }; // End of interface.
54 
55 //_________________________ Implement. __________________
60 inline PndMvaClass::PndMvaClass(std::string const &name) : Name(name), NExamples(0), StartIdx(0), EndIdx(0), NTrainEx(0){};
61 
64 
67 {
68  // check for self-assignment
69  if (this != &oth) // Not self-assign
70  {
71  this->Name = oth.Name;
72  this->NExamples = oth.NExamples;
73  this->StartIdx = oth.StartIdx;
74  this->EndIdx = oth.EndIdx;
75  this->NTrainEx = oth.NTrainEx;
76  }
77  return (*this);
78 };
79 
82 #endif
PndMvaClass & operator=(PndMvaClass const &oth)
= Operator
Definition: PndMvaClass.h:66
std::string Name
Definition: PndMvaClass.h:43
virtual ~PndMvaClass()
Destructor.
Definition: PndMvaClass.h:81
size_t EndIdx
Definition: PndMvaClass.h:46
size_t NTrainEx
Definition: PndMvaClass.h:47
PndMvaClass(std::string const &name)
Constructor.
Definition: PndMvaClass.h:60
size_t NExamples
Definition: PndMvaClass.h:44
size_t StartIdx
Definition: PndMvaClass.h:45