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 "KVDataRepository.h"
16 #include "KVDataAnalysisTask.h"
17 
40 
41  friend class KVDataSet;
42 
43 protected:
44  std::ifstream fDatasets;
48  std::vector<Int_t> fIndex;
50 
51  virtual Bool_t ReadDataSetList();
52  virtual Bool_t ReadTaskList();
53  virtual void ReadUserGroups();
54 
55  virtual KVDataSet* NewDataSet();
57 
59  {
60  return &fTasks;
61  }
67  virtual Bool_t CheckCacheStatus();
68 
69 public:
71  virtual ~ KVDataSetManager();
72 
73  virtual Bool_t Init(KVDataRepository* /*rep*/ = 0);
74  virtual void CheckAvailability();
75  virtual void Print(Option_t* opt = "") const;
76  KVDataSet* GetDataSet(Int_t) const;
77  KVDataSet* GetDataSet(const Char_t*);
78  virtual KVDataSet* GetAvailableDataSet(Int_t) const;
79  virtual Int_t GetNavailable() const
80  {
81  return fNavailable;
82  };
83  virtual Int_t GetNtotal() const
84  {
85  return fDataSets.GetSize();
86  };
88  {
89  return fUserGroups;
90  };
91  virtual Bool_t CheckUser(const Char_t* groupname,
92  const Char_t* username = "");
93 
94  virtual KVDataAnalysisTask* GetTask(const Char_t* name);
95 
96  virtual void Update();
97  KVDataAnalysisTask* GetAnalysisTaskAny(const Char_t* keywords) const;
98 
99  ClassDef(KVDataSetManager, 3) //Handles datasets in a data repository
100 };
101 
103 R__EXTERN KVDataSetManager* gDataSetManager;
104 
105 #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.
Base class for managing repositories of experimental data.
Manage all datasets contained in a given data repository.
TString fCacheFileName
name of cache file ( = [repository name].available.datasets)
KVUniqueNameList fDataSets
list of datasets handled by manager
virtual void Print(Option_t *opt="") const
KVNameValueList fUserGroups
list of user groups
virtual void ReadUserGroups()
virtual Int_t GetNavailable() const
const KVSeqCollection * GetAnalysisTaskList() const
Bool_t fCacheAvailable
kTRUE if caching is activated for parent repository
KVDataRepository * fRepository
the repository for which data sets are handled
Int_t fNavailable
number of available datasets
virtual Bool_t ReadDataSetList()
virtual Bool_t Init(KVDataRepository *=0)
virtual Int_t GetNtotal() const
KVDataAnalysisTask * GetAnalysisTaskAny(const Char_t *keywords) const
virtual Bool_t OpenAvailableDatasetsFile()
virtual ~ KVDataSetManager()
virtual void Update()
virtual Bool_t CheckCacheStatus()
virtual Bool_t ReadAvailableDatasetsFile()
virtual Bool_t CheckUser(const Char_t *groupname, const Char_t *username="")
virtual 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.
virtual KVDataSet * NewDataSet()
Creates and returns pointer to new data set object.
virtual Bool_t ReadTaskList()
KVUniqueNameList fTasks
list of all known analysis tasks
const KVNameValueList & GetUserGroups()
virtual void CheckAvailability()
virtual 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
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:35
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
KaliVeda extensions to ROOT collection classes.
virtual Int_t GetSize() const
Optimised list in which named objects can only be placed once.