CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LocalCacheFile.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_LOCAL_CACHE_FILE_H
2 # define STORAGE_FACTORY_LOCAL_CACHE_FILE_H
3 
6 # include <vector>
7 # include <string>
8 
10 class LocalCacheFile : public Storage
11 {
12 public:
13  LocalCacheFile (Storage *base, const std::string &tmpdir = "");
14  ~LocalCacheFile (void);
15 
16  using Storage::read;
17  using Storage::write;
18 
19  virtual bool prefetch (const IOPosBuffer *what, IOSize n);
20  virtual IOSize read (void *into, IOSize n);
21  virtual IOSize read (void *into, IOSize n, IOOffset pos);
22  virtual IOSize readv (IOBuffer *into, IOSize n);
23  virtual IOSize readv (IOPosBuffer *into, IOSize n);
24  virtual IOSize write (const void *from, IOSize n);
25  virtual IOSize write (const void *from, IOSize n, IOOffset pos);
26  virtual IOSize writev (const IOBuffer *from, IOSize n);
27  virtual IOSize writev (const IOPosBuffer *from, IOSize n);
28 
29  virtual IOOffset position (IOOffset offset, Relative whence = SET);
30  virtual void resize (IOOffset size);
31  virtual void flush (void);
32  virtual void close (void);
33 
34 private:
36 
38  std::vector<char> present_;
42  unsigned int cacheCount_;
43  unsigned int cacheTotal_;
44 };
45 
46 #endif // STORAGE_FACTORY_LOCAL_CACHE_FILE_H
tuple base
Main Program
Definition: newFWLiteAna.py:92
void cache(IOOffset start, IOOffset end)
unsigned int cacheTotal_
virtual void flush(void)
Definition: Storage.h:8
virtual void close(void)
Relative
Definition: Storage.h:11
virtual IOSize write(const void *from, IOSize n, IOOffset pos)
Definition: Storage.cc:59
unsigned int cacheCount_
virtual IOOffset position(void) const
Definition: Storage.cc:95
#define end
Definition: vmac.h:38
virtual IOSize writev(const IOBuffer *from, IOSize n)
LocalCacheFile(Storage *base, const std::string &tmpdir="")
int read(void)
Definition: IOInput.cc:54
unsigned int offset(bool)
std::vector< char > present_
static std::string from(" from ")
virtual IOSize write(const void *from, IOSize n)
virtual IOOffset size(void) const
Definition: Storage.cc:102
virtual IOSize readv(IOBuffer *into, IOSize n)
int64_t IOOffset
Definition: IOTypes.h:19
virtual bool prefetch(const IOPosBuffer *what, IOSize n)
virtual void resize(IOOffset size)
size_t IOSize
Definition: IOTypes.h:14
Definition: File.h:11
Storage * storage_