Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RRawFileNetXNG.hxx
Go to the documentation of this file.
1// @(#)root/io:$Id$
2// Author: Michal Simon
3
4/*************************************************************************
5 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef NET_NETXNG_INC_ROOT_RRAWFILENETXNG_HXX_
13#define NET_NETXNG_INC_ROOT_RRAWFILENETXNG_HXX_
14
15#include <ROOT/RRawFile.hxx>
16#include <memory>
17
18namespace ROOT {
19namespace Internal {
20
21struct RRawFileNetXNGImpl;
22
23/** \class RRawFileNetXNG RRawFileNetXNG.hxx
24
25The RRawFileNetXNG class provides read-only access to remote files using root/roots protocol. It uses the
26XrdCl (XRootD client) library for the transport layer. It instructs the RRawFile base class to buffer in
27larger chunks than the default for local files, assuming that remote file access has high(er) latency.
28
29*/
30
32{
33private:
34 std::unique_ptr<RRawFileNetXNGImpl> pImpl; //< pointer to implementation
35
36protected:
37 void OpenImpl() final;
38 size_t ReadAtImpl(void *buffer, size_t nbytes, std::uint64_t offset) final;
39 void ReadVImpl(RIOVec *ioVec, unsigned int nReq) final;
40 std::uint64_t GetSizeImpl() final;
41
42public:
43 RRawFileNetXNG(std::string_view url, RRawFile::ROptions options);
45 std::unique_ptr<RRawFile> Clone() const final;
46 int GetFeatures() const final { return kFeatureHasSize | kFeatureHasAsyncIo; }
47};
48
49} // namespace Internal
50} // namespace ROOT
51
52#endif /* NET_NETXNG_INC_ROOT_RRAWFILENETXNG_HXX_ */
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
The RRawFileNetXNG class provides read-only access to remote files using root/roots protocol.
void OpenImpl() final
OpenImpl() is called at most once and before any call to either DoReadAt or DoGetSize.
int GetFeatures() const final
Derived classes shall inform the user about the supported functionality, which can possibly depend on...
std::unique_ptr< RRawFileNetXNGImpl > pImpl
void ReadVImpl(RIOVec *ioVec, unsigned int nReq) final
By default implemented as a loop of ReadAt calls but can be overwritten, e.g. XRootD or DAVIX impleme...
std::unique_ptr< RRawFile > Clone() const final
Create a new RawFile that accesses the same resource. The file pointer is reset to zero.
size_t ReadAtImpl(void *buffer, size_t nbytes, std::uint64_t offset) final
Derived classes should implement low-level reading without buffering.
std::uint64_t GetSizeImpl() final
Derived classes should return the file size or kUnknownFileSize.
The RRawFile provides read-only access to local and remote files.
Definition RRawFile.hxx:43
static constexpr int kFeatureHasSize
GetSize() does not return kUnknownFileSize.
Definition RRawFile.hxx:52
static constexpr int kFeatureHasAsyncIo
File supports async IO.
Definition RRawFile.hxx:56
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Used for vector reads from multiple offsets into multiple buffers.
Definition RRawFile.hxx:71
On construction, an ROptions parameter can customize the RRawFile behavior.
Definition RRawFile.hxx:59