CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RFIO.h
Go to the documentation of this file.
1 #ifndef RFIO_ADAPTOR_RFIO_H
2 # define RFIO_ADAPTOR_RFIO_H
3 
4 # include <sys/stat.h>
5 # include <sys/uio.h>
6 # include <unistd.h>
7 # include <fcntl.h>
8 
9 # define RFIO_READOPT 1
10 # define serrno (*C__serrno())
11 # define rfio_errno (*C__rfio_errno())
12 #ifdef __APPLE__
13 typedef off_t off64_t;
14 #endif
15 
16 extern "C"
17 {
18  // This is a RFIO-special structure like the "iovec" one
19  // in sys/uio.h, but this doesn't actually exist on the system.
20  struct iovec64
21  {
22  off64_t iov_base;
23  int iov_len;
24  };
25 
26  int rfio_preseek64(int, struct iovec64 *, int);
27  int rfio_open64(const char *filepath, int flags, int mode);
28  int rfio_close(int s);
29  int rfio_close64(int s) { return rfio_close(s);}
30  int rfio_read64(int s, void *ptr, int size);
31  int rfio_write64(int s, const void *ptr, int size);
32  off64_t rfio_lseek64(int s, off64_t offset, int how);
33  int rfio_access(const char *filepath, int mode);
34  int rfio_unlink(const char *filepath);
35  int rfio_parse(const char *name, char **host, char **path);
36  int rfio_stat64(const char *path, struct stat *statbuf);
37  int rfio_fstat64(int s, struct stat *statbuf);
38  void rfio_perror(const char *msg);
39  char * rfio_serror();
40  int rfioreadopt(int opt);
41  int rfiosetopt(int opt, int *pval, int len);
42  int rfio_mkdir(const char *path, int mode);
43  void * rfio_opendir(const char *dirpath);
44  int rfio_closedir(void *dirp);
45  void * rfio_readdir(void *dirp);
46 
47  int Cthread_init(void);
48  int * C__rfio_errno(void);
49  int * C__serrno(void);
50 }
51 
52 #endif // RFIO_ADAPTOR_RFIO_H
int rfio_write64(int s, const void *ptr, int size)
int rfio_fstat64(int s, struct stat *statbuf)
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
off64_t iov_base
Definition: RFIO.h:22
int rfiosetopt(int opt, int *pval, int len)
int rfio_read64(int s, void *ptr, int size)
int Cthread_init(void)
int rfio_parse(const char *name, char **host, char **path)
list path
Definition: scaleCards.py:51
void * rfio_opendir(const char *dirpath)
int rfio_access(const char *filepath, int mode)
int * C__serrno(void)
int iov_len
Definition: RFIO.h:23
int rfio_closedir(void *dirp)
Definition: RFIO.h:20
unsigned int offset(bool)
int rfio_open64(const char *filepath, int flags, int mode)
void rfio_perror(const char *msg)
string host
Definition: query.py:114
char * rfio_serror()
int rfio_close(int s)
void * rfio_readdir(void *dirp)
int rfio_close64(int s)
Definition: RFIO.h:29
int * C__rfio_errno(void)
int rfioreadopt(int opt)
int rfio_unlink(const char *filepath)
int rfio_stat64(const char *path, struct stat *statbuf)
tuple size
Write out results.
int rfio_mkdir(const char *path, int mode)
off64_t rfio_lseek64(int s, off64_t offset, int how)
int rfio_preseek64(int, struct iovec64 *, int)