ROOT  6.06/09
Reference Guide
ResultsClassification.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : ResultsClassification *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Base-class for result-vectors *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
16  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2006: *
20  * CERN, Switzerland *
21  * U. of Victoria, Canada *
22  * MPI-K Heidelberg, Germany *
23  * *
24  * Redistribution and use in source and binary forms, with or without *
25  * modification, are permitted according to the terms listed in LICENSE *
26  * (http://tmva.sourceforge.net/LICENSE) *
27  **********************************************************************************/
28 
29 #ifndef ROOT_TMVA_ResultsClassification
30 #define ROOT_TMVA_ResultsClassification
31 
32 //////////////////////////////////////////////////////////////////////////
33 // //
34 // ResultsClassification //
35 // //
36 // Class that is the base-class for a vector of result //
37 // //
38 //////////////////////////////////////////////////////////////////////////
39 
40 #include <vector>
41 
42 #ifndef ROOT_TMVA_Results
43 #include "TMVA/Results.h"
44 #endif
45 
46 namespace TMVA {
47 
48  class MsgLogger;
49 
50  class ResultsClassification : public Results {
51 
52  public:
53 
54  ResultsClassification( const DataSetInfo* dsi, TString resultsName );
56 
57  // setters
58  void SetValue( Float_t value, Int_t ievt );
59 
60  void Resize( Int_t entries ) { fMvaValues.resize( entries ); }
61  void Clear() { fMvaValues.clear(); }
62 
63  // getters
64  Long64_t GetSize() const { return fMvaValues.size(); }
65  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return fRet; }
66  std::vector<Float_t>* GetValueVector() { return &fMvaValues; }
67 
69 
70 
71  private:
72 
73  std::vector< Float_t > fMvaValues; //! mva values (Results)
74  mutable std::vector< Float_t > fRet; //! return val
75  mutable MsgLogger* fLogger; //! message logger
76  MsgLogger& Log() const { return *fLogger; }
77  };
78 }
79 
80 #endif
long long Long64_t
Definition: RtypesCore.h:69
MsgLogger * fLogger
return val
float Float_t
Definition: RtypesCore.h:53
std::vector< Float_t > fMvaValues
std::vector< Float_t > fRet
mva values (Results)
EAnalysisType
Definition: Types.h:124
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
Types::EAnalysisType GetAnalysisType()
std::vector< Float_t > * GetValueVector()
void SetValue(Float_t value, Int_t ievt)
set MVA response
virtual const std::vector< Float_t > & operator[](Int_t ievt) const
Abstract ClassifierFactory template that handles arbitrary types.
ResultsClassification(const DataSetInfo *dsi, TString resultsName)
constructor
MsgLogger & Log() const
message logger
float value
Definition: math.cpp:443