#ifndef ROOT_TRFIOFile #define ROOT_TRFIOFile //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TRFIOFile // // // // A TRFIOFile is like a normal TFile except that it reads and writes // // its data via a rfiod server. // // // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TFile //*KEEP,TFile. #include "TFile.h" //*KEND. #endif #ifndef ROOT_TUrl //*KEEP,TUrl,T=C++. #include "TUrl.h" //*KEND. #endif class TRFIOFile : public TFile { private: TUrl fUrl; //URL of file Seek_t fOffset; //seek offet TRFIOFile() : fUrl("dummy") { } // Interface to basic system I/O routines Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode); Int_t SysClose(Int_t fd); Int_t SysRead(Int_t fd, void *buf, Int_t len); Int_t SysWrite(Int_t fd, const void *buf, Int_t len); Seek_t SysSeek(Int_t fd, Seek_t offset, Int_t whence); Int_t SysSync(Int_t) { /* no fsync for RFIO */ return 0; } public: TRFIOFile(const char *url, Option_t *option="", const Text_t *ftitle="", Int_t compress=1); ~TRFIOFile(); ClassDef(TRFIOFile,1) //A ROOT file that reads/writes via a rfiod server }; #endif