Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TXNetFileStager.h
Go to the documentation of this file.
1// @(#)root/netx:$Id$
2// Author: A. Peters, G. Ganis 7/2/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TXNetFileStager
13#define ROOT_TXNetFileStager
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TXNetFileStager //
18// //
19// Interface to the 'XRD' staging capabilities. //
20// //
21//////////////////////////////////////////////////////////////////////////
22
23#include "TFileStager.h"
24
25class TCollection;
26class TXNetSystem;
27class TFileCollection;
28
30
31private:
32 TString fPrefix; // prefix to prepend to requests
33 TXNetSystem *fSystem; // instance of the admin interface
34
35 static void GetPrefix(const char *url, TString &pfx);
36
37public:
38 TXNetFileStager(const char *stager = "");
39 virtual ~TXNetFileStager();
40
41 Bool_t IsStaged(const char *path);
42 Int_t Locate(const char *path, TString &endpath);
44 Bool_t Matches(const char *s);
45 Bool_t Stage(const char *path, Option_t *opt = 0);
46 Bool_t Stage(TCollection *pathlist, Option_t *opt = 0);
47
48 Bool_t IsValid() const { return (fSystem ? kTRUE : kFALSE); }
49
50 void Print(Option_t *option = "") const;
51
52 ClassDef(TXNetFileStager,0) // Interface to a 'XRD' staging
53};
54
55#endif
const Bool_t kFALSE
Definition RtypesCore.h:101
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t option
Collection abstract base class.
Definition TCollection.h:65
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Basic string class.
Definition TString.h:139
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
Int_t LocateCollection(TFileCollection *fc, Bool_t addDummyUrl=kFALSE)
Bulk locate request for a collection of files.
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
Bool_t IsValid() const
void Print(Option_t *option="") const
Print basic info about this stager.
virtual ~TXNetFileStager()
Destructor.
Bool_t Stage(const char *path, Option_t *opt=0)
Issue a stage request for file defined by 'path'.
TXNetSystem * fSystem
Int_t Locate(const char *path, TString &endpath)
Get actual end-point url for a path Returns 0 in case of success and 1 if any error occured.