Logo ROOT  
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
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
float Float_t
Definition: RtypesCore.h:57
long long Long64_t
Definition: RtypesCore.h:80
const char Option_t
Definition: RtypesCore.h:66
#define ClassDef(name, id)
Definition: Rtypes.h:335
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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
mva values type(sig/bkg) (Results)
std::vector< Bool_t > * GetValueVectorTypes()
std::vector< Float_t > fRet
return val
virtual void Clear(Option_t *)
std::vector< Float_t > * GetValueVector()
std::vector< Float_t > fMvaValues
mva values (Results)
ResultsClassification(const DataSetInfo *dsi, TString resultsName)
constructor
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
MsgLogger * fLogger
! message logger
Class that is the base-class for a vector of result.
Definition: Results.h:57
EAnalysisType
Definition: Types.h:126
@ kClassification
Definition: Types.h:127
virtual void Clear(Option_t *="")
Definition: TObject.h:115
Basic string class.
Definition: TString.h:136
create variable transformations