KaliVeda
Toolkit for HIC analysis
KVDataSetManager.h
1 /*
2 $Id: KVDataSetManager.h,v 1.9 2007/09/20 11:30:17 franklan Exp $
3 $Revision: 1.9 $
4 $Date: 2007/09/20 11:30:17 $
5 $Author: franklan $
6 */
7 
8 #ifndef __KVDATASETMAN_H
9 #define __KVDATASETMAN_H
10 
11 #include "KVUniqueNameList.h"
12 #include "KVNameValueList.h"
13 #include <vector>
14 #include "KVDataSet.h"
15 #include "KVDataAnalysisTask.h"
16 #include "KVEnv.h"
17 
19 
42 
43  friend class KVDataSet;
44 
46 
47  std::ifstream fDatasets;
51  std::vector<Int_t> fIndex;
52 
55 
58 
60  {
61  return &fTasks;
62  }
69 
70 public:
72 
73  Bool_t Init(KVDataSetRepository* /*rep*/ = 0);
74  void CheckAvailability();
75  void Print(Option_t* opt = "") const;
76  KVDataSet* GetDataSet(Int_t) const;
77  KVDataSet* GetDataSet(const Char_t*);
80  {
81  return fNavailable;
82  }
83  Int_t GetNtotal() const
84  {
85  return fDataSets.GetSize();
86  }
87  KVDataAnalysisTask* GetTask(const Char_t* name);
88  void Update();
89  KVDataAnalysisTask* GetAnalysisTaskAny(const Char_t* keywords) const;
90 
91  ClassDef(KVDataSetManager, 3) //Handles datasets in a data repository
92 };
93 
95 R__EXTERN KVDataSetManager* gDataSetManager;
96 
97 #endif
int Int_t
unsigned int UInt_t
#define R__EXTERN
bool Bool_t
char Char_t
const char Option_t
#define ClassDef(name, id)
Define and manage data analysis tasks.
Manage all datasets contained in a given data repository.
TString fCacheFileName
name of cache file ( = [repository name].available.datasets)
Bool_t Init(KVDataSetRepository *=0)
KVUniqueNameList fDataSets
list of datasets handled by manager
void Print(Option_t *opt="") const
Int_t GetNavailable() const
const KVSeqCollection * GetAnalysisTaskList() const
Bool_t fCacheAvailable
kTRUE if caching is activated for parent repository
Int_t fNavailable
number of available datasets
KVDataAnalysisTask * GetAnalysisTaskAny(const Char_t *keywords) const
Bool_t OpenAvailableDatasetsFile()
Int_t GetNtotal() const
KVDataSetRepository * fRepository
the repository for which data sets are handled
Bool_t ReadAvailableDatasetsFile()
KVDataAnalysisTask * GetTask(const Char_t *name)
Return pointer to named data analysis task.
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
KVDataSet * NewDataSet()
Creates and returns pointer to new data set object.
KVUniqueNameList fTasks
list of all known analysis tasks
KVDataSet * GetAvailableDataSet(Int_t) const
std::vector< Int_t > fIndex
array of indices of available datasets
std::ifstream fDatasets
for reading cached repository available datasets file
UInt_t fMaxCacheTime
maximum allowed age of cache file in seconds
A repository for experimental datasets.
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:146
Extension of TEnv to allow the writing of comments in the file.
Definition: KVEnv.h:18
KaliVeda extensions to ROOT collection classes.
Int_t GetSize() const override
Optimised list in which named objects can only be placed once.