Logo ROOT   6.12/07
Reference Guide
TNetXNGSystem.h
Go to the documentation of this file.
1 // @(#)root/netxng:$Id$
2 /*************************************************************************
3  * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. *
4  * All rights reserved. *
5  * *
6  * For the licensing terms see $ROOTSYS/LICENSE. *
7  * For the list of contributors see $ROOTSYS/README/CREDITS. *
8  *************************************************************************/
9 
10 #ifndef ROOT_TNetXNGSystem
11 #define ROOT_TNetXNGSystem
12 
13 ////////////////////////////////////////////////////////////////////////////////
14 // //
15 // TNetXNGSystem //
16 // //
17 // Authors: Justin Salmon, Lukasz Janyst //
18 // CERN, 2013 //
19 // //
20 // Enables access to XRootD filesystem interface using the new client. //
21 // //
22 ////////////////////////////////////////////////////////////////////////////////
23 
24 #include "TSystem.h"
25 #include "TCollection.h"
26 #include "TMutex.h"
27 #include "THashList.h"
28 #include <set>
29 
30 namespace XrdCl {
31  class FileSystem;
32  class URL;
33  class DirectoryList;
34 }
35 
36 class TNetXNGSystem: public TSystem {
37 
38 private:
39  std::set<void *> fDirPtrs;
40  static THashList fgAddrFQDN; // Cache of addresses to FQDNs
41  static TMutex fgAddrMutex; // Serialise access to the FQDN list
42 #ifndef __CINT__
43 private:
44  XrdCl::URL *fUrl; // URL of this TSystem
45  XrdCl::FileSystem *fFileSystem; // Cached for convenience
46 
47 #endif
48 
49 public:
50  TNetXNGSystem(Bool_t owner = kTRUE);
51  TNetXNGSystem(const char *url, Bool_t owner = kTRUE);
52  virtual ~TNetXNGSystem();
53 
54  virtual void *OpenDirectory(const char *dir);
55  virtual Int_t MakeDirectory(const char *dir);
56  virtual void FreeDirectory(void *dirp);
57  virtual const char *GetDirEntry(void *dirp);
58  virtual Int_t GetPathInfo(const char *path, FileStat_t &buf);
59  virtual Bool_t ConsistentWith(const char *path, void *dirptr);
60  virtual int Unlink(const char *path);
61  virtual Bool_t IsPathLocal(const char *path);
62  virtual Int_t Locate(const char *path, TString &endurl);
63  virtual Int_t Stage(const char *path, UChar_t priority);
64  virtual Int_t Stage(TCollection *files, UChar_t priority);
65 
66  ClassDef(TNetXNGSystem, 0) // ROOT class definition
67 };
68 
69 #endif
std::set< void * > fDirPtrs
Definition: TNetXNGSystem.h:39
Definition: TMutex.h:30
Basic string class.
Definition: TString.h:125
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
XrdCl::URL * fUrl
Definition: TNetXNGSystem.h:44
#define ClassDef(name, id)
Definition: Rtypes.h:320
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition: THashList.h:34
static TMutex fgAddrMutex
Definition: TNetXNGSystem.h:41
Collection abstract base class.
Definition: TCollection.h:63
static THashList fgAddrFQDN
Definition: TNetXNGSystem.h:40
unsigned char UChar_t
Definition: RtypesCore.h:34
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:248
const Bool_t kTRUE
Definition: RtypesCore.h:87
XrdCl::FileSystem * fFileSystem
Definition: TNetXNGSystem.h:45