Logo ROOT  
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 #include "TFileStager.h"
24 
25 class TCollection;
26 class TNetSystem;
27 
28 class TNetFileStager : public TFileStager {
29 
30 private:
31  TString fPrefix; // prefix to prepend to requests
32  TNetSystem *fSystem; // instance of the admin interface
33 
34  static void GetPrefix(const char *url, TString &pfx);
35 
36 public:
37  TNetFileStager(const char *stager = "");
38  virtual ~TNetFileStager();
39 
40  Bool_t IsStaged(const char *path);
41  Int_t Locate(const char *path, TString &endpath);
42  Bool_t Matches(const char *s);
43 
44  Bool_t IsValid() const { return (fSystem ? kTRUE : kFALSE); }
45 
46  void Print(Option_t *option = "") const;
47 
48  ClassDef(TNetFileStager,0) // Implementation for a 'rootd' backend
49 };
50 
51 #endif
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
Option_t
const char Option_t
Definition: RtypesCore.h:66
TNetFileStager::IsStaged
Bool_t IsStaged(const char *path)
Check if the file defined by 'path' is ready to be used.
Definition: TNetFileStager.cxx:50
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TNetFileStager::fPrefix
TString fPrefix
Definition: TNetFileStager.h:31
TNetFileStager::Print
void Print(Option_t *option="") const
Print basic info about this stager.
Definition: TNetFileStager.cxx:92
TNetFileStager::TNetFileStager
TNetFileStager(const char *stager="")
Constructor. Init a TNetSystem instance to the remote rootd.
Definition: TNetFileStager.cxx:28
TString
Basic string class.
Definition: TString.h:136
bool
TNetFileStager::Matches
Bool_t Matches(const char *s)
Returns kTRUE if stager 's' is compatible with current stager.
Definition: TNetFileStager.cxx:125
TFileStager
Definition: TFileStager.h:36
TNetFileStager::Locate
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.
Definition: TNetFileStager.cxx:101
TNetFileStager::GetPrefix
static void GetPrefix(const char *url, TString &pfx)
Isolate prefix in url.
Definition: TNetFileStager.cxx:71
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TNetFileStager::fSystem
TNetSystem * fSystem
Definition: TNetFileStager.h:32
TNetSystem
Definition: TNetFile.h:85
TNetFileStager::IsValid
Bool_t IsValid() const
Definition: TNetFileStager.h:44
TNetFileStager
Definition: TNetFileStager.h:28
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TFileStager.h
TCollection
Collection abstract base class.
Definition: TCollection.h:63
TNetFileStager::~TNetFileStager
virtual ~TNetFileStager()
Destructor.
Definition: TNetFileStager.cxx:41
int