Logo ROOT   6.12/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 #include "TFile.h"
16 
17 #include "TSystem.h"
18 
19 class TChirpFile:public TFile {
20 private:
21  TChirpFile();
22  struct chirp_file *chirp_file_ptr;
23 
24  Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode);
25  Int_t SysClose(Int_t fd);
26  Int_t SysRead(Int_t fd, void *buf, Int_t len);
27  Int_t SysWrite(Int_t fd, const void *buf, Int_t len);
28  Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
29  Int_t SysStat(Int_t fd, Long_t * id, Long64_t * size, Long_t * flags, Long_t * modtime);
30  Int_t SysSync(Int_t fd);
31 
32 public:
33  TChirpFile(const char *path, Option_t * option = "", const char *ftitle = "", Int_t compress = 1);
34 
35  ~TChirpFile();
36 
37  Bool_t ReadBuffers(char *buf, Long64_t * pos, Int_t * len, Int_t nbuf);
38 
40 };
41 
42 
43 class TChirpSystem:public TSystem {
44 public:
45  TChirpSystem();
46  virtual ~ TChirpSystem();
47 
48  Int_t MakeDirectory(const char *name);
49  void *OpenDirectory(const char *name);
50  void FreeDirectory(void *dirp);
51  const char *GetDirEntry(void *dirp);
52  Int_t GetPathInfo(const char *path, FileStat_t & buf);
53  Bool_t AccessPathName(const char *path, EAccessMode mode);
54  Int_t Unlink(const char *path);
55 
56  int Rename(const char *from, const char *to);
57  int Link(const char *from, const char *to);
58  int Symlink(const char *from, const char *to);
59  int GetFsInfo(const char *path, Long_t * id, Long_t * bsize, Long_t * blocks, Long_t * bfree);
60  int Chmod(const char *file, UInt_t mode);
61  int Utime(const char *file, Long_t modtime, Long_t actime);
62 
64 };
65 
66 #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:46
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:320
Read and write data via a Chirp server.
Definition: TChirpFile.h:19
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:22
long Long_t
Definition: RtypesCore.h:50
EAccessMode
Definition: TSystem.h:44
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:248
char name[80]
Definition: TGX11.cxx:109