CMS 3D CMS Logo

DCacheFile.h
Go to the documentation of this file.
1 #ifndef DCACHE_ADAPTOR_DCACHE_FILE_H
2 #define DCACHE_ADAPTOR_DCACHE_FILE_H
3 
6 #include <string>
7 
8 class DCacheFile : public Storage {
9 public:
10  DCacheFile(void);
12  DCacheFile(const char *name, int flags = IOFlags::OpenRead, int perms = 0666);
13  DCacheFile(const std::string &name, int flags = IOFlags::OpenRead, int perms = 0666);
14  ~DCacheFile(void) override;
15 
16  virtual void create(const char *name, bool exclusive = false, int perms = 0666);
17  virtual void create(const std::string &name, bool exclusive = false, int perms = 0666);
18  virtual void open(const char *name, int flags = IOFlags::OpenRead, int perms = 0666);
19  virtual void open(const std::string &name, int flags = IOFlags::OpenRead, int perms = 0666);
20 
21  using Storage::position;
22  using Storage::read;
23  using Storage::write;
24 
25  IOSize read(void *into, IOSize n) override;
26  IOSize readv(IOBuffer *into, IOSize buffers) override;
27  IOSize readv(IOPosBuffer *into, IOSize buffers) override;
28  IOSize write(const void *from, IOSize n) override;
29 
30  IOOffset position(IOOffset offset, Relative whence = SET) override;
31  void resize(IOOffset size) override;
32 
33  void close(void) override;
34  virtual void abort(void);
35 
36 private:
38  bool m_close;
40 };
41 
42 #endif // DCACHE_ADAPTOR_DCACHE_FILE_H
void close(void) override
Definition: DCacheFile.cc:122
void resize(IOOffset size) override
Definition: DCacheFile.cc:313
IOSize write(const void *from, IOSize n) override
Definition: DCacheFile.cc:190
Relative
Definition: Storage.h:22
virtual void abort(void)
Definition: DCacheFile.cc:141
~DCacheFile(void) override
Definition: DCacheFile.cc:25
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:44
DCacheFile(void)
Definition: DCacheFile.cc:11
IOFD m_fd
Definition: DCacheFile.h:37
virtual void create(const char *name, bool exclusive=false, int perms=0666)
Definition: DCacheFile.cc:32
virtual IOOffset position(void) const
Definition: Storage.cc:72
virtual void open(const char *name, int flags=IOFlags::OpenRead, int perms=0666)
Definition: DCacheFile.cc:48
int read(void)
Definition: IOInput.cc:52
bool m_close
Definition: DCacheFile.h:38
virtual IOOffset size(void) const
Definition: Storage.cc:77
int64_t IOOffset
Definition: IOTypes.h:19
int IOFD
Definition: IOTypes.h:22
std::string m_name
Definition: DCacheFile.h:39
IOSize readv(IOBuffer *into, IOSize buffers) override
Definition: DCacheFile.cc:212
size_t IOSize
Definition: IOTypes.h:14
fd
Definition: ztee.py:136