Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/ROOT/RRawFileDavix.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/io:$Id$
0002 // Author: Jakob Blomer
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_RRawFileDavix
0013 #define ROOT_RRawFileDavix
0014 
0015 #include <ROOT/RRawFile.hxx>
0016 #include <string_view>
0017 
0018 #include <cstddef>
0019 #include <cstdint>
0020 #include <memory>
0021 
0022 namespace ROOT {
0023 namespace Internal {
0024 
0025 struct RDavixFileDes;
0026 
0027 /** \class RRawFileDavix RRawFileDavix.hxx
0028 
0029 The RRawFileDavix class provides read-only access to remote non-ROOT files.  It uses the Davix library for
0030 the transport layer.  It instructs the RRawFile base class to buffer in larger chunks than the default for
0031 local files, assuming that remote file access has high(er) latency.
0032 
0033 */
0034 
0035 class RRawFileDavix : public RRawFile {
0036 private:
0037    std::unique_ptr<Internal::RDavixFileDes> fFileDes;
0038 
0039 protected:
0040    void OpenImpl() final;
0041    size_t ReadAtImpl(void *buffer, size_t nbytes, std::uint64_t offset) final;
0042    void ReadVImpl(RIOVec *ioVec, unsigned int nReq) final;
0043    std::uint64_t GetSizeImpl() final;
0044 
0045 public:
0046    RRawFileDavix(std::string_view url, RRawFile::ROptions options);
0047    ~RRawFileDavix();
0048    std::unique_ptr<RRawFile> Clone() const final;
0049 };
0050 
0051 } // namespace Internal
0052 } // namespace ROOT
0053 
0054 #endif