CMS 3D CMS Logo

TStorageFactoryFile.h
Go to the documentation of this file.
1 #ifndef TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H
2 #define TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H
3 
4 #include <vector>
5 #include <memory>
6 
7 #include "TFile.h"
8 
11 
12 class Storage;
13 
15 class TStorageFactoryFile : public TFile {
16 public:
17  ClassDefOverride(TStorageFactoryFile, 0); // ROOT File operating on CMS Storage.
18 
19  // Due to limitations in the ROOT plugin manager, TStorageFactoryFile must
20  // provide a constructor matching all the different variants that other
21  // ROOT plugins might use
22 
23  // This one is to match TXNetFile
24  TStorageFactoryFile(const char *name,
25  Option_t *option,
26  const char *ftitle,
27  Int_t compress,
28  Int_t netopt,
29  Bool_t parallelopen = kFALSE);
30 
31  // This matches everything else.
32  TStorageFactoryFile(const char *name, Option_t *option = "", const char *ftitle = "", Int_t compress = 1);
33 
34  ~TStorageFactoryFile(void) override;
35 
36  Bool_t ReadBuffer(char *buf, Int_t len) override;
37  Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len) override;
38  Bool_t ReadBufferAsync(Long64_t off, Int_t len) override;
39  Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override;
40  Bool_t WriteBuffer(const char *buf, Int_t len) override;
41 
42  void ResetErrno(void) const override;
43 
44 protected:
45  Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode) override;
46  Int_t SysClose(Int_t fd) override;
47  Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence) override;
48  Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override;
49  Int_t SysSync(Int_t fd) override;
50 
51 private:
52  void Initialize(const char *name, Option_t *option = "");
53 
54  Bool_t ReadBuffersSync(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
55 
57 
58  TStorageFactoryFile(void);
59 
61 };
62 
63 #endif // TFILE_ADAPTOR_TSTORAGE_FACTORY_FILE_H
BTVHLTOfflineSource_cfi.pathname
pathname
Definition: BTVHLTOfflineSource_cfi.py:28
TStorageFactoryFile::TStorageFactoryFile
TStorageFactoryFile(void)
Definition: TStorageFactoryFile.cc:96
TStorageFactoryFile::ResetErrno
void ResetErrno(void) const override
Definition: TStorageFactoryFile.cc:596
pos
Definition: PixelAliasList.h:18
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
TStorageFactoryFile::ReadBuffersSync
Bool_t ReadBuffersSync(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Definition: TStorageFactoryFile.cc:352
TStorageFactoryFile::~TStorageFactoryFile
~TStorageFactoryFile(void) override
Definition: TStorageFactoryFile.cc:215
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
TStorageFactoryFile::storage_
edm::propagate_const< std::unique_ptr< Storage > > storage_
Definition: TStorageFactoryFile.h:60
TStorageFactoryFile::SysClose
Int_t SysClose(Int_t fd) override
Definition: TStorageFactoryFile.cc:557
TStorageFactoryFile::SysSeek
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence) override
Definition: TStorageFactoryFile.cc:569
TStorageFactoryFile::Initialize
void Initialize(const char *name, Option_t *option="")
Definition: TStorageFactoryFile.cc:133
ztee.fd
fd
Definition: ztee.py:136
edm::propagate_const
Definition: propagate_const.h:32
TStorageFactoryFile::SysSync
Int_t SysSync(Int_t fd) override
Definition: TStorageFactoryFile.cc:578
TStorageFactoryFile::releaseStorage
void releaseStorage()
Definition: TStorageFactoryFile.h:56
TStorageFactoryFile::ReadBufferAsync
Bool_t ReadBufferAsync(Long64_t off, Int_t len) override
Definition: TStorageFactoryFile.cc:303
edm::get_underlying_safe
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:40
TStorageFactoryFile::ClassDefOverride
ClassDefOverride(TStorageFactoryFile, 0)
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
TStorageFactoryFile::ReadBuffers
Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override
Definition: TStorageFactoryFile.cc:419
TStorageFactoryFile::ReadBuffer
Bool_t ReadBuffer(char *buf, Int_t len) override
Definition: TStorageFactoryFile.cc:228
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
TStorageFactoryFile::WriteBuffer
Bool_t WriteBuffer(const char *buf, Int_t len) override
Definition: TStorageFactoryFile.cc:467
IOPosBuffer.h
TStorageFactoryFile::SysStat
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override
Definition: TStorageFactoryFile.cc:585
TStorageFactoryFile::SysOpen
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode) override
Definition: TStorageFactoryFile.cc:524
TStorageFactoryFile
Definition: TStorageFactoryFile.h:15
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
get_underlying_safe.h
Storage
Definition: Storage.h:20
HLT_2018_cff.flags
flags
Definition: HLT_2018_cff.py:11758
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443