ROOT  6.06/09
Reference Guide
DataSetManager.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 : DataSetManager *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Singleton class for dataset management *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Joerg Stelzer <Joerg.Stelzer@cern.ch> - CERN, Switzerland *
16  * Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland *
17  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
18  * *
19  * Copyright (c) 2006: *
20  * CERN, Switzerland *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_DataSetManager
29 #define ROOT_TMVA_DataSetManager
30 
31 //////////////////////////////////////////////////////////////////////////
32 // //
33 // DataSetManager //
34 // //
35 // Class that contains all the data information //
36 // //
37 //////////////////////////////////////////////////////////////////////////
38 
39 #ifndef ROOT_TList
40 #include "TList.h"
41 #endif
42 #ifndef ROOT_TString
43 #include "TString.h"
44 #endif
45 
46 namespace TMVA {
47 
48  class DataSet;
49  class DataSetInfo;
50  class DataInputHandler;
51  class DataSetFactory; // DSMTEST
52  class MsgLogger;
53 
55 
56  public:
57 
58 
59  // singleton class
60 // static DataSetManager& Instance();
61 // static void CreateInstance( DataInputHandler& dataInput );
62 // static void DestroyInstance();
63 
64  // private default constructor
65  DataSetManager(); // DSMTEST
66  DataSetManager( DataInputHandler& dataInput ); //DSMTEST
67  ~DataSetManager(); // DSMTEST
68 
69 
70  // ownership stays with this handler
71  DataSet* CreateDataSet ( const TString& dsiName );
72  DataSetInfo* GetDataSetInfo( const TString& dsiName );
73 
74  // makes a local copy of the dataset info object
76 
77  private:
78 
79 // ~DataSetManager(); // DSMTEST moved to public
80 
81 // static DataSetManager* fgDSManager; // removed DSMTEST
82 
83  // private default constructor
84 /* DataSetManager(); */ // DSMTEST
85 /* DataSetManager( DataInputHandler& dataInput ); */ // DSMTEST
86 
88 
89  // access to input data
91 
92  DataInputHandler& fDataInput; //! source of input data
93  TList fDataSetInfoCollection; //! all registered dataset definitions
94  MsgLogger* fLogger; // message logger
95  MsgLogger& Log() const { return *fLogger; }
96  };
97 }
98 
99 #endif
DataSetInfo * GetDataSetInfo(const TString &dsiName)
returns datasetinfo object for given name
DataInputHandler & fDataInput
TList fDataSetInfoCollection
source of input data
DataSet * CreateDataSet(const TString &dsiName)
Creates the singleton dataset.
Basic string class.
Definition: TString.h:137
MsgLogger * fLogger
all registered dataset definitions
A doubly linked list.
Definition: TList.h:47
DataSetInfo & AddDataSetInfo(DataSetInfo &dsi)
stores a copy of the dataset info object
TMVA::DataSetFactory * fDatasetFactory
Abstract ClassifierFactory template that handles arbitrary types.
DataInputHandler & DataInput()
MsgLogger & Log() const
~DataSetManager()
destructor fDataSetInfoCollection.SetOwner(); // DSMTEST –> created a segfault because the DataSetIn...