Logo ROOT   6.08/07
Reference Guide
TChirpFile.h
Go to the documentation of this file.
1 // @(#)root/chirp:$Id$
2 // Author: Dan Bradley, Michael Albrecht, Douglas Thain
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_TChirpFile
13 #define ROOT_TChirpFile
14 
15 #ifndef ROOT_TFile
16 #include "TFile.h"
17 #endif
18 
19 #ifndef ROOT_TSystem
20 #include "TSystem.h"
21 #endif
22 
23 class TChirpFile:public TFile {
24 private:
25  TChirpFile();
26  struct chirp_file *chirp_file_ptr;
27 
28  Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode);
29  Int_t SysClose(Int_t fd);
30  Int_t SysRead(Int_t fd, void *buf, Int_t len);
31  Int_t SysWrite(Int_t fd, const void *buf, Int_t len);
32  Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
33  Int_t SysStat(Int_t fd, Long_t * id, Long64_t * size, Long_t * flags, Long_t * modtime);
34  Int_t SysSync(Int_t fd);
35 
36 public:
37  TChirpFile(const char *path, Option_t * option = "", const char *ftitle = "", Int_t compress = 1);
38 
39  ~TChirpFile();
40 
41  Bool_t ReadBuffers(char *buf, Long64_t * pos, Int_t * len, Int_t nbuf);
42 
44 };
45 
46 
47 class TChirpSystem:public TSystem {
48 public:
49  TChirpSystem();
50  virtual ~ TChirpSystem();
51 
52  Int_t MakeDirectory(const char *name);
53  void *OpenDirectory(const char *name);
54  void FreeDirectory(void *dirp);
55  const char *GetDirEntry(void *dirp);
56  Int_t GetPathInfo(const char *path, FileStat_t & buf);
57  Bool_t AccessPathName(const char *path, EAccessMode mode);
58  Int_t Unlink(const char *path);
59 
60  int Rename(const char *from, const char *to);
61  int Link(const char *from, const char *to);
62  int Symlink(const char *from, const char *to);
63  int GetFsInfo(const char *path, Long_t * id, Long_t * bsize, Long_t * blocks, Long_t * bfree);
64  int Chmod(const char *file, UInt_t mode);
65  int Utime(const char *file, Long_t modtime, Long_t actime);
66 
68 };
69 
70 #endif
Int_t SysClose(Int_t fd)
Interface to system close. All arguments like in POSIX close().
Definition: TChirpFile.cxx:209
long long Long64_t
Definition: RtypesCore.h:69
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Return file stat information.
Definition: TChirpFile.cxx:268
Int_t SysRead(Int_t fd, void *buf, Int_t len)
Interface to system read. All arguments like in POSIX read().
Definition: TChirpFile.cxx:216
const char Option_t
Definition: RtypesCore.h:62
RooCmdArg Link(const char *state, RooAbsData &data)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:50
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read the nbuf blocks described in arrays pos and len.
Definition: TChirpFile.cxx:169
Int_t SysSync(Int_t fd)
Interface to system fsync. All arguments like in POSIX fsync().
Definition: TChirpFile.cxx:261
#define ClassDef(name, id)
Definition: Rtypes.h:254
Read and write data via a Chirp server.
Definition: TChirpFile.h:23
Int_t bsize[]
Definition: SparseFit4.cxx:31
unsigned int UInt_t
Definition: RtypesCore.h:42
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
Interface to system lseek.
Definition: TChirpFile.cxx:234
RooCmdArg Rename(const char *suffix)
struct chirp_file * chirp_file_ptr
Definition: TChirpFile.h:26
long Long_t
Definition: RtypesCore.h:50
EAccessMode
Definition: TSystem.h:54
Definition: file.py:1
~TChirpFile()
Destructor.
Definition: TChirpFile.cxx:162
Int_t SysWrite(Int_t fd, const void *buf, Int_t len)
Interface to system write. All arguments like in POSIX write().
Definition: TChirpFile.cxx:225
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Interface to system open. All arguments like in POSIX open().
Definition: TChirpFile.cxx:196
Abstract base class defining a generic interface to the underlying Operating System.
Definition: TSystem.h:258
char name[80]
Definition: TGX11.cxx:109