CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 namespace edm::storage {
9  class DCacheFile : public Storage {
10  public:
11  DCacheFile(void);
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, bool exclusive = false, int perms = 0666);
18  virtual void create(const std::string &name, bool exclusive = false, int perms = 0666);
19  virtual void open(const char *name, int flags = IOFlags::OpenRead, int perms = 0666);
20  virtual void open(const std::string &name, int flags = IOFlags::OpenRead, int perms = 0666);
21 
22  using Storage::position;
23  using Storage::read;
24  using Storage::write;
25 
26  IOSize read(void *into, IOSize n) override;
27  IOSize readv(IOBuffer *into, IOSize buffers) override;
28  IOSize readv(IOPosBuffer *into, IOSize buffers) override;
29  IOSize write(const void *from, IOSize n) override;
30 
31  IOOffset position(IOOffset offset, Relative whence = SET) override;
32  void resize(IOOffset size) override;
33 
34  void close(void) override;
35  virtual void abort(void);
36 
37  private:
39  bool m_close;
41  };
42 } // namespace edm::storage
43 #endif // DCACHE_ADAPTOR_DCACHE_FILE_H
int64_t IOOffset
Definition: IOTypes.h:20
void resize(IOOffset size) override
Definition: DCacheFile.cc:315
virtual IOOffset size() const
Definition: Storage.cc:509
IOSize readv(IOBuffer *into, IOSize buffers) override
Definition: DCacheFile.cc:214
virtual void open(const char *name, int flags=IOFlags::OpenRead, int perms=0666)
Definition: DCacheFile.cc:50
virtual IOOffset position() const
Definition: Storage.cc:504
~DCacheFile(void) override
Definition: DCacheFile.cc:27
virtual void create(const char *name, bool exclusive=false, int perms=0666)
Definition: DCacheFile.cc:34
tuple fd
Definition: ztee.py:136
IOSize write(const void *from, IOSize n) override
Definition: DCacheFile.cc:192
void close(void) override
Definition: DCacheFile.cc:124
virtual void abort(void)
Definition: DCacheFile.cc:143
size_t IOSize
Definition: IOTypes.h:15
IOSize write(unsigned char byte)
Definition: Storage.cc:329
int IOFD
Definition: IOTypes.h:23