Logo ROOT   6.10/09
Reference Guide
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);
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
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...
const char Option_t
Definition: RtypesCore.h:62
TXNetSystem * fSystem
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
static struct mg_connection * fc(struct mg_context *ctx)
Definition: civetweb.c:1956
#define ClassDef(name, id)
Definition: Rtypes.h:297
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
Collection abstract base class.
Definition: TCollection.h:42
virtual ~TXNetFileStager()
Destructor.
const Bool_t kFALSE
Definition: RtypesCore.h:92
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
Bool_t Stage(const char *path, Option_t *opt=0)
Issue a stage request for file defined by 'path'.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries...
Int_t LocateCollection(TFileCollection *fc, Bool_t addDummyUrl=kFALSE)
Bulk locate request for a collection of files.
TXNetFileStager(const char *stager="")
Constructor. Init a TXNetSystem instance to the XRD system.
Bool_t IsValid() const
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
const Bool_t kTRUE
Definition: RtypesCore.h:91
void Print(Option_t *option="") const
Print basic info about this stager.