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
DCacheFile::open
virtual void open(const char *name, int flags=IOFlags::OpenRead, int perms=0666)
Definition: DCacheFile.cc:48
Storage::size
virtual IOOffset size(void) const
Definition: Storage.cc:77
DCacheFile::m_fd
IOFD m_fd
Definition: DCacheFile.h:37
DCacheFile::create
virtual void create(const char *name, bool exclusive=false, int perms=0666)
Definition: DCacheFile.cc:32
DCacheFile::m_close
bool m_close
Definition: DCacheFile.h:38
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
Storage::SET
Definition: Storage.h:22
Storage::Relative
Relative
Definition: Storage.h:22
Storage.h
DCacheFile::m_name
std::string m_name
Definition: DCacheFile.h:39
ztee.fd
fd
Definition: ztee.py:136
IOFlags.h
DCacheFile::readv
IOSize readv(IOBuffer *into, IOSize buffers) override
Definition: DCacheFile.cc:212
IOFlags::OpenRead
Definition: IOFlags.h:7
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
IOBuffer
Definition: IOBuffer.h:7
DCacheFile::close
void close(void) override
Definition: DCacheFile.cc:122
IOOffset
int64_t IOOffset
Definition: IOTypes.h:19
DCacheFile::resize
void resize(IOOffset size) override
Definition: DCacheFile.cc:313
IOFD
int IOFD
Definition: IOTypes.h:22
DCacheFile::~DCacheFile
~DCacheFile(void) override
Definition: DCacheFile.cc:25
generator_cfi.exclusive
exclusive
Definition: generator_cfi.py:24
DCacheFile::DCacheFile
DCacheFile(void)
Definition: DCacheFile.cc:11
Storage::position
virtual IOOffset position(void) const
Definition: Storage.cc:72
IOInput::read
int read(void)
Definition: IOInput.cc:52
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DCacheFile::abort
virtual void abort(void)
Definition: DCacheFile.cc:141
IOPosBuffer
Definition: IOPosBuffer.h:7
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
IOSize
size_t IOSize
Definition: IOTypes.h:14
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13150
Storage
Definition: Storage.h:20
DCacheFile
Definition: DCacheFile.h:8
Storage::write
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:44
DCacheFile::write
IOSize write(const void *from, IOSize n) override
Definition: DCacheFile.cc:190