KaliVeda
Toolkit for HIC analysis
|
Base class for transferring data between data repositories.
Created by KVClassFactory on Mon Sep 18 14:27:21 2006 Author: franklan
If the user has defined two or more repositories in her $HOME/.kvrootrc file, then it is possible to transfer files from one to the other by running one of the following commands on the local machine:
The same menu-driven approach as for submitting analysis tasks is used to allow the user to choose among the available datasets, systems and runs to transfer. The transferred files are copied in to the target repository, creating any missing directories which may be needed.
It is also possible to use a KVDataTransfer object interactively, in this case you should use:
To use the BBFTP transfer facility, a bbftp client must be installed on the user's machine If the client is not located in the user's PATH, he should give the full path to the executable in the configuration, e.g. on WinXP with cygwin version of bbftp client:
Definition at line 51 of file KVDataTransfer.h.
#include <KVDataTransfer.h>
Static Public Member Functions | |
static KVDataTransfer * | NewTransfer (const Char_t *source_rep, const Char_t *target_rep) |
Static Public Member Functions inherited from KVDataAnalyser | |
static Bool_t | AbortProcessingLoop () |
static KVDataAnalyser * | GetAnalyser (const Char_t *plugin) |
static Bool_t | IsRunningBatchAnalysis () |
static void | RunAnalyser (const Char_t *plugin="") |
static void | SetAbortProcessingLoop (Bool_t now=kTRUE) |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
static Bool_t | GetObjectStat () |
static void | SetDtorOnly (void *obj) |
static void | SetObjectStat (Bool_t stat) |
Private Member Functions | |
virtual void | CheckTargetRepository () |
virtual void | ChooseAnalysisTask () |
virtual void | ExecuteCommand ()=0 |
virtual void | init () |
Initialisation of data transfer. | |
virtual void | set_dataset_name (const Char_t *name) |
virtual void | set_dataset_pointer (KVDataSet *ds) |
virtual void | SetTransferExec (const Char_t *path) |
virtual void | SubmitTask () |
virtual void | WriteTransferScript ()=0 |
Private Attributes | |
TString | fCmdFile |
name of command file given to transfer agent | |
Bool_t | fOK |
may be set to kFALSE by init(), in which case Run() will abort | |
KVDataRepository * | fSourceRep |
repository containing source files | |
KVDataRepository * | fTargetRep |
repository where files will be copied | |
TString | fTransferExec |
full path to transfer client executable | |
Additional Inherited Members | |
Public Types inherited from KVDataAnalyser | |
enum | EProofMode { None , Lite , Proof } |
Public Types inherited from TObject | |
enum | EDeprecatedStatusBits |
enum | EStatusBits |
Public Attributes inherited from TObject | |
kBitMask | |
kCanDelete | |
kCannotPick | |
kHasUUID | |
kInconsistent | |
kInvalidObject | |
kIsOnHeap | |
kIsReferenced | |
kMustCleanup | |
kNoContextMenu | |
kNotDeleted | |
kObjInCanvas | |
kOverwrite | |
kSingleKey | |
kWriteDelete | |
kZombie | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
void | MakeZombie () |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
KVDataTransfer::KVDataTransfer | ( | ) |
Default constructor. Use KVDataTransfer::NewTransfer to create a new data transfer object with the correct properties to transfer files between two repositories.
Definition at line 27 of file KVDataTransfer.cpp.
|
virtual |
Destructor.
Definition at line 42 of file KVDataTransfer.cpp.
|
privatevirtual |
Make sure that the target repository has the necessary dataset/subdirectory to receive the transferred files. If not, we create the new dataset/subdir.
Definition at line 269 of file KVDataTransfer.cpp.
|
inlineprivatevirtual |
Reimplemented from KVDataSetAnalyser.
Definition at line 62 of file KVDataTransfer.h.
|
privatepure virtual |
Implemented in KVDataTransferDMS, and KVDataTransferXRD.
|
privatevirtual |
Initialisation of data transfer.
Definition at line 298 of file KVDataTransfer.cpp.
|
static |
Creates a new data transfer object to transfer files between the two named data repositories.
The type of the created object depends on the values of the environment variables (defined in .kvrootrc file):
If either of these = bbftp, we create a KVDataTransferBBFTP object.
If source_rep.DataRepository.FileTransfer.type = xrd, we create a KVDataTransferXRD object.
By default (no type given), we use a KVDataTransferSFTP object. In fact, the type of object created is defined in .kvrootrc by the following plugins:
Plugin.KVDataTransfer: sftp KVDataTransferSFTP KVMultiDet "KVDataTransferSFTP()" +Plugin.KVDataTransfer: bbftp KVDataTransferBBFTP KVMultiDet "KVDataTransferBBFTP()" +Plugin.KVDataTransfer: xrd KVDataTransferXRD KVMultiDet "KVDataTransferXRD()"
Definition at line 72 of file KVDataTransfer.cpp.
|
virtual |
Perform file transfer The user selects runs which are available in the source repository in the same way as when performing data analysis Note that this will make the 'source' repository the current active repository (i.e. gDataRepository and gDataSetManager will correspond to source repository after execution of this command).
Reimplemented from KVDataAnalyser.
Definition at line 161 of file KVDataTransfer.cpp.
Set dataset to be analysed. If 'name' is not the name of a valid and available dataset in the 'source' data repository an error message is printed.
Reimplemented from KVDataSetAnalyser.
Definition at line 311 of file KVDataTransfer.cpp.
Set dataset to be used for transfer. If the chosen dataset is not available, an error message is printed Only datasets which are available in the source repository can be transferred If the pointer actually corresponds to a dataset in the target repository, we replace it with a pointer to the dataset with the same name in the source repository. allow user to reset dataset pointer to 0
Reimplemented from KVDataSetAnalyser.
Definition at line 339 of file KVDataTransfer.cpp.
Definition at line 58 of file KVDataTransfer.h.
|
inlineprivatevirtual |
Reimplemented from KVDataAnalyser.
Definition at line 65 of file KVDataTransfer.h.
|
virtual |
Based on information gathered from user (see Run()), perform the transfer of files. Any missing directories in the target repository are created beforehand. After transfer, the available runlist for the target repository is updated
Definition at line 217 of file KVDataTransfer.cpp.
|
privatepure virtual |
Implemented in KVDataTransferDMS, and KVDataTransferXRD.
|
private |
name of command file given to transfer agent
Definition at line 55 of file KVDataTransfer.h.
|
private |
may be set to kFALSE by init(), in which case Run() will abort
Definition at line 75 of file KVDataTransfer.h.
|
private |
repository containing source files
Definition at line 53 of file KVDataTransfer.h.
|
private |
repository where files will be copied
Definition at line 54 of file KVDataTransfer.h.
|
private |
full path to transfer client executable
Definition at line 56 of file KVDataTransfer.h.