Go to the documentation of this file.00001 #ifndef TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H
00002 # define TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H
00003
00004 # include <vector>
00005
00006 # include "TFile.h"
00007
00008 # include "Utilities/StorageFactory/interface/IOPosBuffer.h"
00009
00010
00011 class Storage;
00012
00014 class TStorageFactoryFile : public TFile
00015 {
00016 public:
00017 ClassDef(TStorageFactoryFile, 0);
00018
00019
00020
00021
00022
00023
00024 TStorageFactoryFile(const char *name, Option_t *option,
00025 const char *ftitle, Int_t compress, Int_t netopt,
00026 Bool_t parallelopen = kFALSE);
00027
00028
00029 TStorageFactoryFile(const char *name, Option_t *option = "",
00030 const char *ftitle = "", Int_t compress = 1);
00031
00032 ~TStorageFactoryFile(void);
00033
00034 virtual Bool_t ReadBuffer(char *buf, Int_t len);
00035 virtual Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
00036 virtual Bool_t ReadBufferAsync(Long64_t off, Int_t len);
00037 virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
00038 virtual Bool_t WriteBuffer(const char *buf, Int_t len);
00039
00040 void ResetErrno(void) const;
00041
00042 protected:
00043 virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode);
00044 virtual Int_t SysClose(Int_t fd);
00045 virtual Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
00046 virtual Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
00047 virtual Int_t SysSync(Int_t fd);
00048
00049 private:
00050 void Initialize(const char *name, Option_t *option = "");
00051
00052 Bool_t ReadBuffersSync(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
00053
00054 TStorageFactoryFile(void);
00055
00056 Storage *storage_;
00057 };
00058
00059 #endif // TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H