KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDataRepositoryManager Class Reference

Detailed Description

Manages access to one or more data repositories.

The data repository manager is set up and initialised in the following way:

new KVDataRepositoryManager;
gDataRepositoryManager->Init();

<p<blockquote>‍

The available data repositories are defined in the user's $HOME/.kvrootrc file (see KVDataRepository for details of configuration).

Default data repository

If more than one repository is defined, which one will be "active" (gDataRepository) after initialisation of the data repository manager ? You can define the default repository by setting the variable

DataRepository.Default:   [name]

in your .kvrootrc file. If you don't, the default repository "by default" will be either: the data repository named "default" if there is one; or the last one defined in your .kvrootrc.

Definition at line 47 of file KVDataRepositoryManager.h.

#include <KVDataRepositoryManager.h>

Public Member Functions

 KVDataRepositoryManager ()
 Default constructor.
 
virtual ~KVDataRepositoryManager ()
 Destructor.
 
KVDataSetGetDataSet (const Char_t *repository, const Char_t *dataset) const
 Return pointer to named dataset in the given repository.
 
const TListGetListOfRepositories () const
 
KVDataRepositoryGetRepository (const Char_t *name) const
 
void Init ()
 
void Print (Option_t *opt="") const
 

Private Attributes

TList fRepositories
 list of available repositories
 

Constructor & Destructor Documentation

◆ KVDataRepositoryManager()

KVDataRepositoryManager::KVDataRepositoryManager ( )

Default constructor.

Definition at line 31 of file KVDataRepositoryManager.cpp.

◆ ~KVDataRepositoryManager()

KVDataRepositoryManager::~KVDataRepositoryManager ( )
virtual

Destructor.

Definition at line 43 of file KVDataRepositoryManager.cpp.

Member Function Documentation

◆ GetDataSet()

KVDataSet * KVDataRepositoryManager::GetDataSet ( const Char_t repository,
const Char_t dataset 
) const

Return pointer to named dataset in the given repository.

Definition at line 200 of file KVDataRepositoryManager.cpp.

◆ GetListOfRepositories()

const TList * KVDataRepositoryManager::GetListOfRepositories ( ) const
inline

Definition at line 59 of file KVDataRepositoryManager.h.

◆ GetRepository()

KVDataRepository * KVDataRepositoryManager::GetRepository ( const Char_t name) const

Return pointer to data repository with given name. Data repository names are defined in .kvrootrc file by lines such as

DataRepository: default +DataRepository: ccali

Definition at line 149 of file KVDataRepositoryManager.cpp.

◆ Init()

void KVDataRepositoryManager::Init ( )

Read .kvrootrc and set up all data repositories it defines.

The default data repository (gDataRepository) is defined by the environment variable DataRepository.Default (default value = "default").

For this repository, KVDataRepository::cd() will be called and gDataRepository and gDataSetManager will point, respectively, to the repository and to its data set manager.

If the repository corresponding to DataRepository.Default is not found, the last repository defined in the .kvrootrc file will be made default. make sure KaliVeda environment is initialised

Definition at line 67 of file KVDataRepositoryManager.cpp.

◆ Print()

void KVDataRepositoryManager::Print ( Option_t opt = "") const

Print list of repositories opt = "all" : print full configuration information for each repository

Definition at line 168 of file KVDataRepositoryManager.cpp.

Member Data Documentation

◆ fRepositories

TList KVDataRepositoryManager::fRepositories
private

list of available repositories

Definition at line 49 of file KVDataRepositoryManager.h.