KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVDataSetManager.h
Go to the documentation of this file.
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 
39 
40  friend class KVDataSet;
41 
42 protected:
43  std::ifstream fDatasets;
47  std::vector<Int_t> fIndex;
49 
50  virtual Bool_t ReadDataSetList();
51  virtual Bool_t ReadTaskList();
52  virtual void ReadUserGroups();
53 
54  virtual KVDataSet* NewDataSet();
56 
58  {
59  return &fTasks;
60  }
66  virtual Bool_t CheckCacheStatus();
67 
68 public:
70  virtual ~ KVDataSetManager();
71 
72  virtual Bool_t Init(KVDataRepository* /*rep*/ = 0);
73  virtual void CheckAvailability();
74  virtual void Print(Option_t* opt = "") const;
75  KVDataSet* GetDataSet(Int_t) const;
76  KVDataSet* GetDataSet(const Char_t*);
77  virtual KVDataSet* GetAvailableDataSet(Int_t) const;
78  virtual Int_t GetNavailable() const
79  {
80  return fNavailable;
81  };
82  virtual Int_t GetNtotal() const
83  {
84  return fDataSets.GetSize();
85  };
87  {
88  return fUserGroups;
89  };
90  virtual Bool_t CheckUser(const Char_t* groupname,
91  const Char_t* username = "");
92 
93  virtual KVDataAnalysisTask* GetTask(const Char_t* name);
94 
95  virtual void Update();
96  KVDataAnalysisTask* GetAnalysisTaskAny(const Char_t* keywords) const;
97 
98  ClassDef(KVDataSetManager, 3) //Handles datasets in a data repository
99 };
100 
103 
104 #endif
int Int_t
unsigned int UInt_t
#define R__EXTERN
R__EXTERN KVDataSetManager * gDataSetManager
................ global variable
char Char_t
bool Bool_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:207
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.