#include <TStorageFactoryFile.h>
Public Member Functions | |
ClassDef (TStorageFactoryFile, 0) | |
virtual Bool_t | ReadBuffer (char *buf, Int_t len) |
virtual Bool_t | ReadBuffer (char *buf, Long64_t pos, Int_t len) |
virtual Bool_t | ReadBufferAsync (Long64_t off, Int_t len) |
virtual Bool_t | ReadBuffers (char *buf, Long64_t *pos, Int_t *len, Int_t nbuf) |
void | ResetErrno (void) const |
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) | |
virtual Bool_t | WriteBuffer (const char *buf, Int_t len) |
~TStorageFactoryFile (void) | |
Protected Member Functions | |
virtual Int_t | SysClose (Int_t fd) |
virtual Int_t | SysOpen (const char *pathname, Int_t flags, UInt_t mode) |
virtual Long64_t | SysSeek (Int_t fd, Long64_t offset, Int_t whence) |
virtual Int_t | SysStat (Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) |
virtual Int_t | SysSync (Int_t fd) |
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 16 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 108 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 124 of file TStorageFactoryFile.cc.
References Initialize(), and edm::threadLocalException::setException().
TStorageFactoryFile::~TStorageFactoryFile | ( | void | ) |
Definition at line 225 of file TStorageFactoryFile.cc.
|
private |
Definition at line 97 of file TStorageFactoryFile.cc.
References StorageAccount::construct, storageCounter(), and StorageAccount::Stamp::tick().
Referenced by releaseStorage().
TStorageFactoryFile::ClassDef | ( | TStorageFactoryFile | , |
0 | |||
) |
|
private |
Definition at line 139 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().
|
virtual |
Definition at line 244 of file TStorageFactoryFile.cc.
References EnergyCorrector::c, gen::n, StorageAccount::read, StorageAccount::readActual, StorageAccount::readPrefetchToCache, StorageAccount::readViaCache, s_statsCPrefetch, s_statsCRead, s_statsRead, s_statsXRead, storage_, storageCounter(), and StorageAccount::Stamp::tick().
Referenced by ReadBuffer().
|
virtual |
Definition at line 235 of file TStorageFactoryFile.cc.
References ReadBuffer().
|
virtual |
Definition at line 315 of file TStorageFactoryFile.cc.
References StorageFactory::CACHE_HINT_APPLICATION, StorageFactory::CACHE_HINT_STORAGE, StorageFactory::cacheHint(), f, StorageFactory::get(), PREFETCH_PROBE_LENGTH, StorageAccount::readAsync, s_statsARead, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
virtual |
Definition at line 437 of file TStorageFactoryFile.cc.
References mps_fire::i, StorageAccount::readAsync, ReadBuffersSync(), s_statsARead, 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 369 of file TStorageFactoryFile.cc.
References ReadRepacker::bufferUsed(), mps_fire::i, ReadRepacker::iov(), ReadRepacker::pack(), StorageAccount::readActual, ReadRepacker::realBytesProcessed(), mps_fire::result, s_statsXRead, 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().
void TStorageFactoryFile::ResetErrno | ( | void | ) | const |
Definition at line 636 of file TStorageFactoryFile.cc.
|
protectedvirtual |
Definition at line 585 of file TStorageFactoryFile.cc.
References StorageAccount::close, releaseStorage(), s_statsClose, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 554 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, s_statsOpen, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 600 of file TStorageFactoryFile.cc.
References Storage::CURRENT, Storage::END, PFRecoTauDiscriminationByIsolation_cfi::offset, RefreshWebPage::rel, s_statsSeek, StorageAccount::seek, Storage::SET, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 622 of file TStorageFactoryFile.cc.
References s_statsStat, StorageAccount::stat, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 613 of file TStorageFactoryFile.cc.
References StorageAccount::flush, s_statsFlush, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
virtual |
Definition at line 491 of file TStorageFactoryFile.cc.
References gen::n, s_statsCWrite, s_statsWrite, s_statsXWrite, 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().