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 {
10 public:
11  DCacheFile (void);
12  DCacheFile (IOFD fd);
13  DCacheFile (const char *name, int flags = IOFlags::OpenRead, int perms = 0666);
14  DCacheFile (const std::string &name, int flags = IOFlags::OpenRead, int perms = 0666);
15  ~DCacheFile (void) override;
16 
17  virtual void create (const char *name,
18  bool exclusive = false,
19  int perms = 0666);
20  virtual void create (const std::string &name,
21  bool exclusive = false,
22  int perms = 0666);
23  virtual void open (const char *name,
25  int perms = 0666);
26  virtual void open (const std::string &name,
28  int perms = 0666);
29 
30  using Storage::read;
31  using Storage::write;
32  using Storage::position;
33 
34  IOSize read (void *into, IOSize n) override;
35  IOSize readv (IOBuffer *into, IOSize buffers) override;
36  IOSize readv (IOPosBuffer *into, IOSize buffers) override;
37  IOSize write (const void *from, IOSize n) override;
38 
39  IOOffset position (IOOffset offset, Relative whence = SET) override;
40  void resize (IOOffset size) override;
41 
42  void close (void) override;
43  virtual void abort (void);
44 
45 private:
47  bool m_close;
49 };
50 
51 #endif // DCACHE_ADAPTOR_DCACHE_FILE_H
void close(void) override
Definition: DCacheFile.cc:154
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
void resize(IOOffset size) override
Definition: DCacheFile.cc:380
IOSize write(const void *from, IOSize n) override
Definition: DCacheFile.cc:237
Relative
Definition: Storage.h:23
virtual void abort(void)
Definition: DCacheFile.cc:180
~DCacheFile(void) override
Definition: DCacheFile.cc:35
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:59
DCacheFile(void)
Definition: DCacheFile.cc:11
IOFD m_fd
Definition: DCacheFile.h:46
virtual void create(const char *name, bool exclusive=false, int perms=0666)
Definition: DCacheFile.cc:45
virtual IOOffset position(void) const
Definition: Storage.cc:95
virtual void open(const char *name, int flags=IOFlags::OpenRead, int perms=0666)
Definition: DCacheFile.cc:73
int read(void)
Definition: IOInput.cc:54
bool m_close
Definition: DCacheFile.h:47
virtual IOOffset size(void) const
Definition: Storage.cc:102
int64_t IOOffset
Definition: IOTypes.h:19
int IOFD
Definition: IOTypes.h:22
std::string m_name
Definition: DCacheFile.h:48
IOSize readv(IOBuffer *into, IOSize buffers) override
Definition: DCacheFile.cc:265
size_t IOSize
Definition: IOTypes.h:14