Logo ROOT   6.10/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 #include "TMVA/Results.h"
43 
44 namespace TMVA {
45 
46  class MsgLogger;
47 
48  class ResultsClassification : public Results {
49 
50  public:
51 
52  ResultsClassification( const DataSetInfo* dsi, TString resultsName );
54 
55  // setters
56  void SetValue( Float_t value, Int_t ievt );
57 
58  void Resize( Int_t entries ) { fMvaValues.resize( entries ); }
59  using TObject::Clear;
60  virtual void Clear(Option_t *) { fMvaValues.clear(); fMvaValuesTypes.clear(); }
61 
62  // getters
63  Long64_t GetSize() const { return fMvaValues.size(); }
64  virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return fRet; }
65  std::vector<Float_t>* GetValueVector() { return &fMvaValues; }
66  std::vector<Bool_t>* GetValueVectorTypes() { return &fMvaValuesTypes; }
67 
69 
70 
71  private:
72 
73  std::vector< Float_t > fMvaValues; // mva values (Results)
74  std::vector< Bool_t> fMvaValuesTypes;// mva values type(sig/bkg) (Results)
75  mutable std::vector< Float_t > fRet; // return val
76  mutable MsgLogger* fLogger; //! message logger
77  MsgLogger& Log() const { return *fLogger; }
78  protected:
79 
80  ClassDef(Results,2);
81 
82  };
83 }
84 
85 #endif
virtual void Clear(Option_t *="")
Definition: TObject.h:91
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:125
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
virtual void Clear(Option_t *)
Types::EAnalysisType GetAnalysisType()
#define ClassDef(name, id)
Definition: Rtypes.h:297
std::vector< Float_t > * GetValueVector()
Class that contains all the data information.
Definition: DataSetInfo.h:60
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
ostringstream derivative to redirect and format output
Definition: MsgLogger.h:59
Abstract ClassifierFactory template that handles arbitrary types.
ResultsClassification(const DataSetInfo *dsi, TString resultsName)
constructor
Class that is the base-class for a vector of result.
Definition: Results.h:57
std::vector< Bool_t > * GetValueVectorTypes()
MsgLogger & Log() const
message logger
Class that is the base-class for a vector of result.