Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
25 class TCollection;
26 class TXNetSystem;
27 class TFileCollection;
28 
29 class TXNetFileStager : public TFileStager {
30 
31 private:
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 
37 public:
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);
43  Int_t LocateCollection(TFileCollection *fc, Bool_t addDummyUrl = kFALSE);
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