File indexing completed on 2025-09-16 09:09:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_TNetXNGFile
0011 #define ROOT_TNetXNGFile
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "TFile.h"
0023 #include "TSemaphore.h"
0024
0025 namespace XrdCl {
0026 class File;
0027 class URL;
0028 }
0029 class XrdSysCondVar;
0030
0031
0032
0033 class TNetXNGFile: public TFile {
0034 private:
0035 XrdCl::File *fFile;
0036 XrdCl::URL *fUrl;
0037 int fMode;
0038 XrdSysCondVar *fInitCondVar;
0039
0040 Int_t fReadvIorMax;
0041 Int_t fReadvIovMax;
0042 Int_t fQueryReadVParams;
0043 TString fNewUrl;
0044
0045 public:
0046 TNetXNGFile();
0047 TNetXNGFile(const char *url, const char *lurl, Option_t *mode, const char *title,
0048 Int_t compress, Int_t netopt, Bool_t parallelopen);
0049 TNetXNGFile(const char *url, Option_t *mode = "", const char *title = "",
0050 Int_t compress = 1, Int_t netopt = 0, Bool_t parallelopen = kFALSE);
0051
0052 virtual ~TNetXNGFile();
0053
0054 void Init(Bool_t create) override;
0055 void Close(const Option_t *option = "") override;
0056 void Seek(Long64_t offset, ERelativeTo position = kBeg) override;
0057 virtual void SetAsyncOpenStatus(EAsyncOpenStatus status);
0058 Long64_t GetSize() const override;
0059 Int_t ReOpen(Option_t *modestr) override;
0060 Bool_t IsOpen() const override;
0061 Bool_t WriteBuffer(const char *buffer, Int_t length) override;
0062 void Flush() override;
0063 Bool_t ReadBuffer(char *buffer, Int_t length) override;
0064 Bool_t ReadBuffer(char *buffer, Long64_t position, Int_t length) override;
0065 Bool_t ReadBuffers(char *buffer, Long64_t *position, Int_t *length,
0066 Int_t nbuffs) override;
0067 TString GetNewUrl() override { return fNewUrl; }
0068
0069 private:
0070 virtual Bool_t IsUseable() const;
0071 virtual Bool_t GetVectorReadLimits();
0072 virtual void SetEnv();
0073
0074 TNetXNGFile(const TNetXNGFile &other);
0075 TNetXNGFile &operator =(const TNetXNGFile &other);
0076
0077 ClassDefOverride(TNetXNGFile, 0)
0078 };
0079
0080 #endif