Logo ROOT   6.08/07
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  using TObject::Clear;
62  virtual void Clear(Option_t *) { fMvaValues.clear(); fMvaValuesTypes.clear(); }
63 
64  // getters
65  Long64_t GetSize() const { return fMvaValues.size(); }
66  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return fRet; }
67  std::vector<Float_t>* GetValueVector() { return &fMvaValues; }
68  std::vector<Bool_t>* GetValueVectorTypes() { return &fMvaValuesTypes; }
69 
71 
72 
73  private:
74 
75  std::vector< Float_t > fMvaValues; // mva values (Results)
76  std::vector< Bool_t> fMvaValuesTypes;// mva values type(sig/bkg) (Results)
77  mutable std::vector< Float_t > fRet; // return val
78  mutable MsgLogger* fLogger; //! message logger
79  MsgLogger& Log() const { return *fLogger; }
80  protected:
81 
82  ClassDef(Results,2);
83 
84  };
85 }
86 
87 #endif
virtual void Clear(Option_t *="")
Definition: TObject.h:89
long long Long64_t
Definition: RtypesCore.h:69
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
std::vector< Float_t > fMvaValues
EAnalysisType
Definition: Types.h:129
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
virtual void Clear(Option_t *)
Types::EAnalysisType GetAnalysisType()
#define ClassDef(name, id)
Definition: Rtypes.h:254
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
std::vector< Bool_t > fMvaValuesTypes
Abstract ClassifierFactory template that handles arbitrary types.
ResultsClassification(const DataSetInfo *dsi, TString resultsName)
constructor
std::vector< Bool_t > * GetValueVectorTypes()
MsgLogger & Log() const
message logger