10#ifndef __KVDATAREPOSITORY_H
11#define __KVDATAREPOSITORY_H
16#include "KVAvailableRunsFile.h"
19#include "KVUniqueNameList.h"
138 virtual int CopyFile(
const char* f,
const char* t,
Bool_t overwrite = kFALSE);
143 virtual ~ KVDataRepository();
148 const Char_t* subdir = 0);
183 const Char_t* datatype =
"",
const Char_t* subdir =
"");
188 const Char_t* destination);
200 const Char_t* datatype =
"");
254#include "TRFIOFile.h"
255class KVRFIOSystem :
public TRFIOSystem {
257 KVRFIOSystem(): TRFIOSystem() { };
258 virtual ~KVRFIOSystem() { };
260 Int_t Unlink(
const char* path);
#define ClassDef(name, id)
Handles lists of available runs for different datasets and types of data.
Base class for KaliVeda framework.
Base class for managing repositories of experimental data.
virtual KVDataSetManager * GetDataSetManager() const
Return pointer to data set manager for this repository.
virtual int CopyFileToRepository(const Char_t *source, const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename)
virtual int Chmod(const char *file, UInt_t mode)
virtual TObject * OpenDataSetRunFile(const KVDataSet *ds, const Char_t *type, Int_t run, Option_t *opt="")
virtual Bool_t IsRemote() const
Returns kTRUE for remote repositories, kFALSE for local repositories.
virtual void CopyFileFromRepository(const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename, const Char_t *destination)
virtual const Char_t * GetReadProtocol(const Char_t *dataset, const Char_t *datatype)
static KVDataRepository * NewRepository(const Char_t *type)
virtual void Print(Option_t *opt="") const
Print info on repository.
virtual int CopyFile(const char *f, const char *t, Bool_t overwrite=kFALSE)
virtual KVUniqueNameList * GetDirectoryListing(const KVDataSet *dataset, const Char_t *datatype="", const Char_t *subdir="")
virtual const Char_t * GetFileTransferExec() const
returns full path to executable used for remote file transfer
virtual Bool_t CheckFileStatus(const KVDataSet *dataset, const Char_t *datatype, const Char_t *runfile)
KVDataSetManager * fDSM
handles datasets in repository
virtual Bool_t GetFileInfo(const KVDataSet *dataset, const Char_t *datatype, const Char_t *runfile, FileStat_t &fs)
virtual Bool_t CheckSubdirExists(const Char_t *dir, const Char_t *subdir=0)
virtual const Char_t * GetRootDirectory() const
returns root directory of data repository (fLocalrootdir)
virtual void PrepareXRDTunnel()
void SetFullPath(TString &path, const Char_t *protocol)
virtual KVAvailableRunsFile * NewAvailableRunsFile(const Char_t *, const KVDataSet *)
virtual void PrintAvailableDatasetsUpdateWarning() const
TSeqCollection * fHelpers
List of helper classes for alternative file/directory access.
virtual const Char_t * GetFileTransferUser() const
returns user name used for remote file transfer
void CreateAllNeededSubdirectories(const KVDataSet *DataSet, const Char_t *DataType)
virtual const Char_t * GetFileTransferServer() const
returns server url used for remote file transfer
virtual KVDataSetManager * NewDataSetManager()
Create and return pointer to new data set manager.
virtual Bool_t CanWrite() const
Bool_t HelperIsConsistentWith(TSystem *helper, const char *path, void *dirptr=0)
TSystem * FindHelper(const char *path, void *dirptr=0)
virtual void CommitFile(TFile *file, const Char_t *datatype, const KVDataSet *dataset)
virtual void DeleteFile(const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename, Bool_t confirm=kTRUE)
virtual TFile * CreateNewFile(const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename)
KVDataRepository()
Default constructor.
virtual const Char_t * GetFullPathToTransferFile(const KVDataSet *dataset, const Char_t *datatype, const Char_t *runfile)
virtual Bool_t IsConnected()
Always returns kTRUE for local repositories.
const KVDataSet * fCommitDataSet
used by CreateNewFile and CommitFile
virtual void MakeSubdirectory(const KVDataSet *dataset, const Char_t *datatype="")
virtual const Char_t * GetFullPathToOpenFile(const KVDataSet *dataset, const Char_t *datatype, const Char_t *runfile)
TObject * OpenDataSetFile(const KVDataSet *ds, const Char_t *type, const TString &fname, Option_t *opt="")
virtual const Char_t * GetFileTransferType() const
returns protocol used for remote file transfer
Manage all datasets contained in a given data repository.
Manage an experimental dataset corresponding to a given experiment or campaign.
Optimised list in which named objects can only be placed once.