#include <TStorageFactoryFile.h>
Public Member Functions | |
ClassDefOverride (TStorageFactoryFile, 0) | |
Bool_t | ReadBuffer (char *buf, Int_t len) override |
Bool_t | ReadBuffer (char *buf, Long64_t pos, Int_t len) override |
Bool_t | ReadBufferAsync (Long64_t off, Int_t len) override |
Bool_t | ReadBuffers (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) override |
void | ResetErrno (void) const override |
TStorageFactoryFile (const char *name, Option_t *option, const char *ftitle, Int_t compress, Int_t netopt, Bool_t parallelopen=kFALSE) | |
TStorageFactoryFile (const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1) | |
Bool_t | WriteBuffer (const char *buf, Int_t len) override |
~TStorageFactoryFile (void) override | |
Protected Member Functions | |
Int_t | SysClose (Int_t fd) override |
Int_t | SysOpen (const char *pathname, Int_t flags, UInt_t mode) override |
Long64_t | SysSeek (Int_t fd, Long64_t offset, Int_t whence) override |
Int_t | SysStat (Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override |
Int_t | SysSync (Int_t fd) override |
Private Member Functions | |
void | Initialize (const char *name, Option_t *option="") |
Bool_t | ReadBuffersSync (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) |
void | releaseStorage () |
TStorageFactoryFile (void) | |
Private Attributes | |
edm::propagate_const< std::unique_ptr< Storage > > | storage_ |
TFile wrapper around StorageFactory and Storage.
Definition at line 15 of file TStorageFactoryFile.h.
TStorageFactoryFile::TStorageFactoryFile | ( | const char * | name, |
Option_t * | option, | ||
const char * | ftitle, | ||
Int_t | compress, | ||
Int_t | netopt, | ||
Bool_t | parallelopen = kFALSE |
||
) |
Definition at line 105 of file TStorageFactoryFile.cc.
References Initialize(), and edm::threadLocalException::setException().
TStorageFactoryFile::TStorageFactoryFile | ( | const char * | name, |
Option_t * | option = "" , |
||
const char * | ftitle = "" , |
||
Int_t | compress = 1 |
||
) |
Definition at line 120 of file TStorageFactoryFile.cc.
References Initialize(), and edm::threadLocalException::setException().
|
override |
Definition at line 215 of file TStorageFactoryFile.cc.
|
private |
Definition at line 96 of file TStorageFactoryFile.cc.
References StorageAccount::construct, storageCounter(), and StorageAccount::Stamp::tick().
Referenced by releaseStorage().
TStorageFactoryFile::ClassDefOverride | ( | TStorageFactoryFile | , |
0 | |||
) |
|
private |
Definition at line 133 of file TStorageFactoryFile.cc.
References edm::Exception::categoryCode(), StorageAccount::construct, beamerCreator::create(), MillePedeFileConverter_cfg::e, Exception, StorageFactory::get(), edm::Service< T >::isAvailable(), edm::errors::NotFound, IOFlags::OpenCreate, IOFlags::OpenRead, IOFlags::OpenWrap, IOFlags::OpenWrite, TSGForRoadSearch_cfi::option, callgraph::path, edm::storage::StatisticsSenderService::setSize(), storage_, storageCounter(), StorageAccount::Stamp::tick(), and update.
Referenced by TStorageFactoryFile().
|
override |
Definition at line 228 of file TStorageFactoryFile.cc.
References EnergyCorrector::c, gen::n, StorageAccount::read, StorageAccount::readActual, StorageAccount::readPrefetchToCache, StorageAccount::readViaCache, storage_, storageCounter(), and StorageAccount::Stamp::tick().
Referenced by ReadBuffer().
|
override |
Definition at line 221 of file TStorageFactoryFile.cc.
References ReadBuffer().
|
override |
Definition at line 303 of file TStorageFactoryFile.cc.
References StorageFactory::CACHE_HINT_APPLICATION, StorageFactory::CACHE_HINT_STORAGE, StorageFactory::cacheHint(), f, StorageFactory::get(), PREFETCH_PROBE_LENGTH, StorageAccount::readAsync, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
override |
Definition at line 419 of file TStorageFactoryFile.cc.
References mps_fire::i, StorageAccount::readAsync, ReadBuffersSync(), storage_, storageCounter(), summarizeEdmComparisonLogfiles::success, StorageAccount::Stamp::tick(), and pileupDistInMC::total.
|
private |
Most storage systems are not prepared for the onslaught of small reads that ROOT will perform, even if they implement a vectored read interface.
Typically, on the server side, the loop is unrolled and the reads are issued sequentially - giving the OS no hint that you're about to read a very close-by byte in the near future. Normally, OS read-ahead takes care of such situations; because the storage server has so many clients, and ROOT reads look random to the OS, the read-ahead becomes disabled.
Hence, this function will repack the application-layer request into an optimized storage-layer request. The resulting request to the storage layer typically has a slightly larger number of bytes, but far less individual reads.
On average, the server's disks see a smaller number of overall reads, the number of bytes transferred over the network increases modestly (around 10%), and the single application request becomes one-to-two I/O transactions. A clear win for all cases except high-latency WAN.
Definition at line 352 of file TStorageFactoryFile.cc.
References ReadRepacker::bufferUsed(), mps_fire::i, ReadRepacker::iov(), ReadRepacker::pack(), StorageAccount::readActual, ReadRepacker::realBytesProcessed(), mps_fire::result, storage_, storageCounter(), StorageAccount::Stamp::tick(), and ReadRepacker::unpack().
Referenced by ReadBuffers().
|
inlineprivate |
Definition at line 56 of file TStorageFactoryFile.h.
References edm::get_underlying_safe(), storage_, and TStorageFactoryFile().
Referenced by SysClose().
|
override |
Definition at line 596 of file TStorageFactoryFile.cc.
|
overrideprotected |
Definition at line 557 of file TStorageFactoryFile.cc.
References StorageAccount::close, releaseStorage(), storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
overrideprotected |
Definition at line 524 of file TStorageFactoryFile.cc.
References Exception, StorageFactory::get(), O_NONBLOCK, StorageAccount::open, IOFlags::OpenAppend, IOFlags::OpenCreate, IOFlags::OpenExclusive, IOFlags::OpenNonBlock, IOFlags::OpenRead, IOFlags::OpenTruncate, IOFlags::OpenWrite, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
overrideprotected |
Definition at line 569 of file TStorageFactoryFile.cc.
References Storage::CURRENT, Storage::END, PFRecoTauDiscriminationByIsolation_cfi::offset, RefreshWebPage::rel, StorageAccount::seek, Storage::SET, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
overrideprotected |
Definition at line 585 of file TStorageFactoryFile.cc.
References StorageAccount::stat, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
overrideprotected |
Definition at line 578 of file TStorageFactoryFile.cc.
References StorageAccount::flush, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
override |
Definition at line 467 of file TStorageFactoryFile.cc.
References gen::n, storage_, storageCounter(), StorageAccount::Stamp::tick(), StorageAccount::write, StorageAccount::writeActual, and StorageAccount::writeViaCache.
|
private |
Definition at line 60 of file TStorageFactoryFile.h.
Referenced by Initialize(), ReadBuffer(), ReadBufferAsync(), ReadBuffers(), ReadBuffersSync(), releaseStorage(), SysClose(), SysOpen(), SysSeek(), SysStat(), SysSync(), and WriteBuffer().