![]() |
KaliVeda
Toolkit for HIC analysis
|
Manage all datasets contained in a given data repository.
KVDataSetManager handles a collection of datasets contained in a data repository, which may be analysed with KaliVeda. The list of all known datasets is defined in $KVROOT/KVFiles/.kvrootrc. Some of these datasets may not be physically present in the repository. This is checked by method CheckAvailability(). This will search in the data repository for the subdirectories corresponding to each dataset, and afterwards KVDataSet::IsAvailable() will return kTRUE or kFALSE for each dataset depending on the result of the search.
Each data repository has a data set manager. At any time, one repository is designated as being 'active' or 'current', and its address is held in the global pointer gDataRepository. One can then access the corresponding dataset manager through gDataSetManager.
Definition at line 41 of file KVDataSetManager.h.
#include <KVDataSetManager.h>
Public Member Functions | |
| KVDataSetManager () | |
| void | CheckAvailability () |
| KVDataAnalysisTask * | GetAnalysisTaskAny (const Char_t *keywords) const |
| KVDataSet * | GetAvailableDataSet (Int_t) const |
| KVDataSet * | GetDataSet (const Char_t *) |
| Return pointer to DataSet using name. More... | |
| KVDataSet * | GetDataSet (Int_t) const |
| Return pointer to DataSet using index in list of all datasets, index>=0. More... | |
| Int_t | GetNavailable () const |
| Int_t | GetNtotal () const |
| KVDataAnalysisTask * | GetTask (const Char_t *name) |
| Return pointer to named data analysis task. More... | |
| Bool_t | Init (KVDataSetRepository *=0) |
| void | Print (Option_t *opt="") const |
| void | Update () |
Friends | |
| class | KVDataSet |
| KVDataSetManager::KVDataSetManager | ( | ) |
Definition at line 29 of file KVDataSetManager.cpp.
| void KVDataSetManager::CheckAvailability | ( | ) |
Check availability of datasets in repository associated to this data set manager
If caching is activated for the parent repository, i.e. if
then instead of directly checking the existence of the directories for each dataset, we use the cached information written in the file $HOME/.kaliveda/[repository name].available.datasets unless
In either of these 2 cases, we check the existence of the directories and update/ create the cache file.
If the repository appears to be empty (perhaps because we are using a remote access protocol to check it, and the protocol has some problems...), then as a last resort we we will use the cache if it exists, whatever its age.
Definition at line 234 of file KVDataSetManager.cpp.
| KVDataAnalysisTask * KVDataSetManager::GetAnalysisTaskAny | ( | const Char_t * | keywords | ) | const |
This method returns a pointer to the analysis task whose description (title) contains all of the whitespace-separated keywords (which may be regular expressions) given in the string "keywords". The comparison is case-insensitive. case-insensitive search for matches in list of all analysis tasks, based on 'title' attribute
Definition at line 553 of file KVDataSetManager.cpp.
Return pointer to available DataSet using index of available datasets
Note this index begins at 1, and corresponds to the number printed next to the dataset when Print("available") is called
Definition at line 362 of file KVDataSetManager.cpp.
Return pointer to DataSet using name.
Definition at line 348 of file KVDataSetManager.cpp.
Return pointer to DataSet using index in list of all datasets, index>=0.
Definition at line 335 of file KVDataSetManager.cpp.
|
inline |
Definition at line 79 of file KVDataSetManager.h.
|
inline |
Definition at line 83 of file KVDataSetManager.h.
| KVDataAnalysisTask * KVDataSetManager::GetTask | ( | const Char_t * | name | ) |
Return pointer to named data analysis task.
Definition at line 378 of file KVDataSetManager.cpp.
| Bool_t KVDataSetManager::Init | ( | KVDataSetRepository * | dr = 0 | ) |
Initialisation of dataset manager for the repository 'dr'.
If dr=0x0 (default) then all known datasets are 'available', otherwise we check availability of datasets based on data present in repository.
Initialise all possible data analysis tasks, then set list of possible tasks for each available dataset.
Definition at line 54 of file KVDataSetManager.cpp.
Print list of datasets:
opt="" (default) all datasets are shown with full informationopt="available" only available datasets are shown, each with a number which can be used with GetAvailableDataSet() in order to retrieve the corresponding dataset. Definition at line 176 of file KVDataSetManager.cpp.
| void KVDataSetManager::Update | ( | ) |
Called when the physical state of the repository has changed i.e. a subdirectory for a new dataset or datatype has been added or removed. We update the available datatsets, datatypes and analysis tasks. check which datasets are available
Definition at line 403 of file KVDataSetManager.cpp.
|
friend |
Definition at line 43 of file KVDataSetManager.h.