54#if defined(_GFAL2_API_) || defined(GFAL2_API_) || defined(_GFAL2_API) || defined(_GFAL2_API_H_) || defined(GFAL2_API_H_) || defined(_GFAL2_API_H)
55#define gfal_lseek64 gfal_lseek
56#define gfal_open64 gfal_open
57#define gfal_readdir64 gfal_readdir
58#define gfal_stat64 gfal_stat
59#define dirent64 dirent
82 :
TFile(url,
"NET", ftitle, compress)
106 fname = (
char *)stmp.
Data();
114 ::gfal_unlink(fname);
120 Error(
"TGFALFile",
"file %s already exists", fname);
129 Error(
"TGFALFile",
"no write permission, could not open file %s", fname);
134#ifdef GFAL_ACCESS_FIXED
136 Error(
"TGFALFile",
"file %s does not exist", fname);
140 Error(
"TGFALFile",
"no read permission, could not open file %s", fname);
151 fD =
SysOpen(fname, O_RDWR | O_CREAT, 0644);
156 SysError(
"TGFALFile",
"file %s can not be opened", fname);
167 SysError(
"TGFALFile",
"file %s can not be opened for reading", fname);
206 Int_t ret = ::gfal_close(fd);
216 Int_t ret = ::gfal_read(fd, buf,
len);
226 Int_t ret = ::gfal_write(fd, buf,
len);
256 if (::gfal_stat64(
fRealName, &statbuf) >= 0)
262 *
id = (statbuf.st_dev << 24) + statbuf.st_ino;
264 *
size = statbuf.st_size;
266 *modtime = statbuf.st_mtime;
269 if (statbuf.st_mode & ((S_IEXEC)|(S_IEXEC>>3)|(S_IEXEC>>6)))
271 if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
273 if ((statbuf.st_mode & S_IFMT) != S_IFREG &&
274 (statbuf.st_mode & S_IFMT) != S_IFDIR)
371 Error(
"OpenDirectory",
"invalid directory pointer (should never happen)");
382 if ((finfo.st_mode & S_IFMT) != S_IFDIR)
396 Error(
"FreeDirectory",
"invalid directory pointer (should never happen)");
401 ::gfal_closedir((DIR*)dirp);
412 Error(
"GetDirEntry",
"invalid directory pointer (should never happen)");
419 dp = ::gfal_readdir64((DIR*)dirp);
441 buf.
fDev = sbuf.st_dev;
442 buf.
fIno = sbuf.st_ino;
443 buf.
fMode = sbuf.st_mode;
444 buf.
fUid = sbuf.st_uid;
445 buf.
fGid = sbuf.st_gid;
446 buf.
fSize = sbuf.st_size;
447 buf.
fMtime = sbuf.st_mtime;
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
RooAbsTestStatistic * create(const char *name, const char *title, RooAbsReal &real, RooAbsData &adata, const RooArgSet &projDeps, RooAbsTestStatistic::Configuration const &cfg) override
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void SysError(const char *location, const char *msgfmt,...)
Use this function in case a system (OS or GUI) related error occurred.
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
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
R__EXTERN TSystem * gSystem
Bool_t fWritable
True if directory is writable.
A ROOT file is composed of a header, followed by consecutive data records (TKey instances) with a wel...
Int_t WriteBufferViaCache(const char *buf, Int_t len)
Write buffer via cache.
Int_t ReadBufferViaCache(char *buf, Int_t len)
Read buffer via cache.
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
virtual void Init(Bool_t create)
Initialize a TFile object.
TString fOption
File options.
virtual Bool_t WriteBuffer(const char *buf, Int_t len)
Write a buffer to the file.
TString fRealName
Effective real file name (not original url)
virtual void SetOffset(Long64_t offset, ERelativeTo pos=kBeg)
Set position from where to start reading.
void Close(Option_t *option="") override
Close a file.
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Read a buffer from the file.
Read and write data via the underlying Grid access mechanism.
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence) override
Interface to system lseek.
Int_t SysClose(Int_t fd) override
Interface to system close. All arguments like in POSIX close.
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode) override
Interface to system open. All arguments like in POSIX open.
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override
Interface to TSystem:GetPathInfo().
Bool_t ReadBuffer(char *buf, Int_t len) override
Read specified byte range from remote file via GFAL.
struct stat64 fStatBuffer
! (transient) Cached file status buffer (for performance)
Int_t SysWrite(Int_t fd, const void *buf, Int_t len) override
Interface to system write. All arguments like in POSIX write.
~TGFALFile() override
GFAL file dtor. Close and flush directory structure.
Bool_t WriteBuffer(const char *buf, Int_t len) override
Write specified byte range to remote file via GFAL.
Int_t SysRead(Int_t fd, void *buf, Int_t len) override
Interface to system read. All arguments like in POSIX read.
Bool_t fStatCached
! (transient) is file status cached?
Directory handler for GFAL.
Bool_t AccessPathName(const char *path, EAccessMode mode) override
Returns FALSE if one can access a file using the specified access mode.
void * OpenDirectory(const char *name) override
Open a directory via GFAL.
void FreeDirectory(void *dirp) override
Free directory via GFAL.
const char * GetDirEntry(void *dirp) override
Get directory entry via GFAL. Returns 0 in case no more entries.
TGFALSystem()
Create helper class that allows directory access via GFAL.
Int_t GetPathInfo(const char *path, FileStat_t &buf) override
Get info about a file.
Int_t MakeDirectory(const char *name) override
Make a directory via GFAL.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * Data() const
void ToUpper()
Change string to upper case.
Abstract base class defining a generic interface to the underlying Operating System.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
This class represents a WWW compatible URL.
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).