00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TChirpFile
00013 #define ROOT_TChirpFile
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef ROOT_TFile
00028 #include "TFile.h"
00029 #endif
00030
00031 class TChirpFile : public TFile {
00032
00033 private:
00034 struct chirp_client *chirp_client;
00035
00036 TChirpFile() : chirp_client(0) { }
00037
00038
00039 Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode);
00040 Int_t SysClose(Int_t fd);
00041 Int_t SysRead(Int_t fd, void *buf, Int_t len);
00042 Int_t SysWrite(Int_t fd, const void *buf, Int_t len);
00043 Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
00044 Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
00045 Int_t SysSync(Int_t fd);
00046
00047 Int_t OpenChirpClient(const char *URL,char const **path);
00048 Int_t CloseChirpClient();
00049
00050 public:
00051 TChirpFile(const char *path, Option_t *option="",
00052 const char *ftitle="", Int_t compress=1);
00053
00054 ~TChirpFile();
00055
00056 Bool_t ReadBuffer(char *buf, Int_t len);
00057 Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
00058 Bool_t WriteBuffer(const char *buf, Int_t len);
00059
00060 void ResetErrno() const;
00061
00062 ClassDef(TChirpFile,0)
00063 };
00064
00065 #endif