ResultsClassification.h

Go to the documentation of this file.
00001 // @(#)root/tmva $Id: ResultsClassification.h 35727 2010-09-24 21:41:20Z stelzer $
00002 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss
00003 
00004 /**********************************************************************************
00005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
00006  * Package: TMVA                                                                  *
00007  * Class  : ResultsClassification                                                 *
00008  * Web    : http://tmva.sourceforge.net                                           *
00009  *                                                                                *
00010  * Description:                                                                   *
00011  *      Base-class for result-vectors                                             *
00012  *                                                                                *
00013  * Authors (alphabetical):                                                        *
00014  *      Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland              *
00015  *      Peter Speckmayer <Peter.Speckmayer@cern.ch>  - CERN, Switzerland          *
00016  *      Joerg Stelzer   <Joerg.Stelzer@cern.ch>  - CERN, Switzerland              *
00017  *      Helge Voss      <Helge.Voss@cern.ch>     - MPI-K Heidelberg, Germany      *
00018  *                                                                                *
00019  * Copyright (c) 2006:                                                            *
00020  *      CERN, Switzerland                                                         *
00021  *      U. of Victoria, Canada                                                    *
00022  *      MPI-K Heidelberg, Germany                                                 *
00023  *                                                                                *
00024  * Redistribution and use in source and binary forms, with or without             *
00025  * modification, are permitted according to the terms listed in LICENSE           *
00026  * (http://tmva.sourceforge.net/LICENSE)                                          *
00027  **********************************************************************************/
00028 
00029 #ifndef ROOT_TMVA_ResultsClassification
00030 #define ROOT_TMVA_ResultsClassification
00031 
00032 //////////////////////////////////////////////////////////////////////////
00033 //                                                                      //
00034 // ResultsClassification                                                //
00035 //                                                                      //
00036 // Class that is the base-class for a vector of result                  //
00037 //                                                                      //
00038 //////////////////////////////////////////////////////////////////////////
00039 
00040 #include <vector>
00041 
00042 #ifndef ROOT_TMVA_Results
00043 #include "TMVA/Results.h"
00044 #endif
00045 
00046 namespace TMVA {
00047 
00048    class MsgLogger;
00049 
00050    class ResultsClassification :  public Results {
00051 
00052    public:
00053 
00054       ResultsClassification( const DataSetInfo* dsi );
00055       ~ResultsClassification();
00056 
00057       // setters
00058       void     SetValue( Float_t value, Int_t ievt );
00059 
00060       void     Resize( Int_t entries )   { fMvaValues.resize( entries ); }
00061       void     Clear()                   { fMvaValues.clear(); }
00062 
00063       // getters
00064       Long64_t GetSize()                  const { return fMvaValues.size(); }
00065       virtual const std::vector< Float_t >&  operator [] ( Int_t ievt ) const { fRet[0] = fMvaValues[ievt]; return  fRet; }
00066       std::vector<Float_t>* GetValueVector()    { return &fMvaValues; }
00067 
00068       Types::EAnalysisType  GetAnalysisType() { return Types::kClassification; }
00069 
00070 
00071    private:
00072 
00073       std::vector< Float_t >  fMvaValues;   //! mva values (Results)
00074       mutable std::vector< Float_t >  fRet;         //! return val
00075       mutable MsgLogger*      fLogger;      //! message logger
00076       MsgLogger& Log() const { return *fLogger; }
00077    };
00078 }
00079 
00080 #endif

Generated on Tue Jul 5 14:27:33 2011 for ROOT_528-00b_version by  doxygen 1.5.1