ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 #ifndef ROOT_TFileStager
24 #include "TFileStager.h"
25 #endif
26 
27 class TCollection;
28 class TXNetSystem;
29 class TFileCollection;
30 
31 class TXNetFileStager : public TFileStager {
32 
33 private:
34  TString fPrefix; // prefix to prepend to requests
35  TXNetSystem *fSystem; // instance of the admin interface
36 
37  static void GetPrefix(const char *url, TString &pfx);
38 
39 public:
40  TXNetFileStager(const char *stager = "");
41  virtual ~TXNetFileStager();
42 
43  Bool_t IsStaged(const char *path);
44  Int_t Locate(const char *path, TString &endpath);
46  Bool_t Matches(const char *s);
47  Bool_t Stage(const char *path, Option_t *opt = 0);
48  Bool_t Stage(TCollection *pathlist, Option_t *opt = 0);
49 
50  Bool_t IsValid() const { return (fSystem ? kTRUE : kFALSE); }
51 
52  void Print(Option_t *option = "") const;
53 
54  ClassDef(TXNetFileStager,0) // Interface to a 'XRD' staging
55 };
56 
57 #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:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
void Print(Option_t *option="") const
Print basic info about this stager.
static struct mg_connection * fc(struct mg_context *ctx)
Definition: civetweb.c:839
#define ClassDef(name, id)
Definition: Rtypes.h:254
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
Bool_t IsValid() const
Collection abstract base class.
Definition: TCollection.h:48
virtual ~TXNetFileStager()
Destructor.
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.
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
const Bool_t kTRUE
Definition: Rtypes.h:91