ROOT  6.06/09
Reference Guide
TNetFileStager.h
Go to the documentation of this file.
1 // @(#)root/netx:$Id$
2 // Author: G. Ganis Feb 2011
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_TNetFileStager
13 #define ROOT_TNetFileStager
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TNetFileStager //
18 // //
19 // TFileStager implementation for a 'rootd' backend. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #ifndef ROOT_TFileStager
24 #include "TFileStager.h"
25 #endif
26 
27 class TCollection;
28 class TNetSystem;
29 
30 class TNetFileStager : public TFileStager {
31 
32 private:
33  TString fPrefix; // prefix to prepend to requests
34  TNetSystem *fSystem; // instance of the admin interface
35 
36  static void GetPrefix(const char *url, TString &pfx);
37 
38 public:
39  TNetFileStager(const char *stager = "");
40  virtual ~TNetFileStager();
41 
42  Bool_t IsStaged(const char *path);
43  Int_t Locate(const char *path, TString &endpath);
44  Bool_t Matches(const char *s);
45 
46  Bool_t IsValid() const { return (fSystem ? kTRUE : kFALSE); }
47 
48  void Print(Option_t *option = "") const;
49 
50  ClassDef(TNetFileStager,0) // Implementation for a 'rootd' backend
51 };
52 
53 #endif
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
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
virtual ~TNetFileStager()
Destructor.
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
TNetSystem * fSystem
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
#define ClassDef(name, id)
Definition: Rtypes.h:254
void Print(Option_t *option="") const
Print basic info about this stager.
Collection abstract base class.
Definition: TCollection.h:48
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
TNetFileStager(const char *stager="")
Constructor. Init a TNetSystem instance to the remote rootd.
const Bool_t kTRUE
Definition: Rtypes.h:91
Bool_t IsValid() const