File indexing completed on 2025-01-18 10:11:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_Results
0030 #define ROOT_TMVA_Results
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include <vector>
0041 #include <map>
0042
0043 #include "TList.h"
0044
0045 #include "TMVA/Types.h"
0046 #include "TMVA/DataSetInfo.h"
0047
0048 class TH1;
0049 class TH2;
0050 class TGraph;
0051
0052 namespace TMVA {
0053
0054 class DataSet;
0055 class MsgLogger;
0056
0057 class Results : public TObject {
0058
0059 public:
0060 Results(const DataSetInfo *dsi, TString resultsName);
0061 Results();
0062 virtual ~Results();
0063
0064
0065 void Store(TObject *obj, const char *alias = nullptr);
0066 void SetTreeType(Types::ETreeType type) { fTreeType = type; }
0067
0068
0069 Types::ETreeType GetTreeType() const { return fTreeType; }
0070 const DataSetInfo *GetDataSetInfo() const { return fDsi; }
0071 DataSet *GetDataSet() const { return fDsi->GetDataSet(); }
0072 TList *GetStorage() const { return fStorage; }
0073 TObject *GetObject(const TString &alias) const;
0074 TH1 *GetHist(const TString &alias) const;
0075 TH2 *GetHist2D(const TString &alias) const;
0076 TGraph *GetGraph(const TString &alias) const;
0077 virtual Types::EAnalysisType GetAnalysisType() { return Types::kNoAnalysisType; }
0078
0079 Bool_t DoesExist(const TString &alias) const;
0080
0081
0082
0083 void Delete(Option_t *option = "") override;
0084
0085 virtual const std::vector<Float_t> &operator[](Int_t ievt) const = 0;
0086
0087 private:
0088 Types::ETreeType fTreeType;
0089 const DataSetInfo *fDsi;
0090 TList *fStorage;
0091 std::map<TString, TObject *> *fHistAlias;
0092 mutable MsgLogger *fLogger;
0093 MsgLogger &Log() const { return *fLogger; }
0094
0095 public:
0096 ClassDefOverride(Results, 2);
0097 };
0098 }
0099
0100 #endif