Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
44namespace TMVA {
45
46 class MsgLogger;
47
49
50 public:
51
52 ResultsClassification( const DataSetInfo* dsi, TString resultsName );
54
55 // setters : set score value and type for each single event.
56 // note type=TRUE for signal and FLASE for background
57 void SetValue( Float_t value, Int_t ievt, Bool_t type );
58
59 void Resize( Int_t entries ) {
60 fMvaValues.resize( entries );
61 fMvaValuesTypes.resize(entries);
62 }
63 using TObject::Clear;
64 virtual void Clear(Option_t *) { fMvaValues.clear(); fMvaValuesTypes.clear(); }
65
66 // getters
67 Long64_t GetSize() const { return fMvaValues.size(); }
68 virtual const std::vector< Float_t >& operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return fRet; }
69 std::vector<Float_t>* GetValueVector() { return &fMvaValues; }
70 std::vector<Bool_t>* GetValueVectorTypes() { return &fMvaValuesTypes; }
71
73
74
75 private:
76
77 std::vector< Float_t > fMvaValues; // mva values (Results)
78 std::vector< Bool_t> fMvaValuesTypes;// mva values type(sig/bkg) (Results)
79 mutable std::vector< Float_t > fRet; // return val
80 mutable MsgLogger* fLogger; //! message logger
81 MsgLogger& Log() const { return *fLogger; }
82 protected:
83
85
86 };
87}
88
89#endif
long long Long64_t
Definition RtypesCore.h:80
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
int type
Definition TGX11.cxx:121
Class that contains all the data information.
Definition DataSetInfo.h:62
ostringstream derivative to redirect and format output
Definition MsgLogger.h:57
Class that is the base-class for a vector of result.
std::vector< Bool_t > fMvaValuesTypes
std::vector< Bool_t > * GetValueVectorTypes()
MsgLogger & Log() const
message logger
virtual void Clear(Option_t *)
std::vector< Float_t > * GetValueVector()
std::vector< Float_t > fMvaValues
Types::EAnalysisType GetAnalysisType()
virtual const std::vector< Float_t > & operator[](Int_t ievt) const
void SetValue(Float_t value, Int_t ievt, Bool_t type)
set MVA response
Class that is the base-class for a vector of result.
Definition Results.h:57
@ kClassification
Definition Types.h:127
virtual void Clear(Option_t *="")
Definition TObject.h:119
Basic string class.
Definition TString.h:136
create variable transformations