#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) |
TStorageFactoryFile (void) | |
Private Attributes | |
Storage * | storage_ |
TFile wrapper around StorageFactory and Storage.
Definition at line 14 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().
TStorageFactoryFile::TStorageFactoryFile | ( | const char * | name, |
Option_t * | option = "" , |
||
const char * | ftitle = "" , |
||
Int_t | compress = 1 |
||
) |
Definition at line 117 of file TStorageFactoryFile.cc.
References Initialize().
TStorageFactoryFile::~TStorageFactoryFile | ( | void | ) |
|
private |
Definition at line 94 of file TStorageFactoryFile.cc.
References s_statsCtor, storageCounter(), and StorageAccount::Stamp::tick().
TStorageFactoryFile::ClassDef | ( | TStorageFactoryFile | , |
0 | |||
) |
|
private |
Definition at line 128 of file TStorageFactoryFile.cc.
References edm::Exception::categoryCode(), SurfaceDeformationFactory::create(), alignCSCRings::e, edm::hlt::Exception, StorageFactory::get(), edm::Service< T >::isAvailable(), edm::errors::NotFound, IOFlags::OpenCreate, IOFlags::OpenRead, IOFlags::OpenWrite, cmsHarvester::path, SiPixelLorentzAngle_cfi::read, s_statsCtor, edm::storage::StatisticsSenderService::setSize(), Storage::size(), storage_, storageCounter(), StorageAccount::Stamp::tick(), and update.
Referenced by TStorageFactoryFile().
|
virtual |
Definition at line 232 of file TStorageFactoryFile.cc.
References trackerHits::c, n, s_statsCPrefetch, s_statsCRead, s_statsRead, s_statsXRead, storage_, storageCounter(), StorageAccount::Stamp::tick(), and IOInput::xread().
Referenced by ReadBuffer().
|
virtual |
Definition at line 223 of file TStorageFactoryFile.cc.
References ReadBuffer().
|
virtual |
Definition at line 299 of file TStorageFactoryFile.cc.
References StorageFactory::CACHE_HINT_APPLICATION, StorageFactory::CACHE_HINT_STORAGE, StorageFactory::cacheHint(), f, StorageFactory::get(), o2o::iov, Storage::prefetch(), PREFETCH_PROBE_LENGTH, s_statsARead, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
virtual |
Definition at line 420 of file TStorageFactoryFile.cc.
References i, o2o::iov, Storage::prefetch(), 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 353 of file TStorageFactoryFile.cc.
References ReadRepacker::bufferUsed(), i, ReadRepacker::iov(), o2o::iov, ReadRepacker::pack(), Storage::readv(), ReadRepacker::realBytesProcessed(), query::result, s_statsXRead, storage_, storageCounter(), StorageAccount::Stamp::tick(), and ReadRepacker::unpack().
Referenced by ReadBuffers().
void TStorageFactoryFile::ResetErrno | ( | void | ) | const |
Definition at line 616 of file TStorageFactoryFile.cc.
|
protectedvirtual |
Definition at line 564 of file TStorageFactoryFile.cc.
References Storage::close(), s_statsClose, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 531 of file TStorageFactoryFile.cc.
References Storage::close(), edm::hlt::Exception, StorageFactory::get(), O_NONBLOCK, 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 580 of file TStorageFactoryFile.cc.
References Storage::CURRENT, Storage::END, evf::evtn::offset(), Storage::position(), s_statsSeek, Storage::SET, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 602 of file TStorageFactoryFile.cc.
References s_statsStat, Storage::size(), storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
protectedvirtual |
Definition at line 593 of file TStorageFactoryFile.cc.
References Storage::flush(), s_statsFlush, storage_, storageCounter(), and StorageAccount::Stamp::tick().
|
virtual |
Definition at line 468 of file TStorageFactoryFile.cc.
References n, s_statsCWrite, s_statsWrite, s_statsXWrite, storage_, storageCounter(), StorageAccount::Stamp::tick(), and IOOutput::xwrite().
|
private |
Definition at line 56 of file TStorageFactoryFile.h.
Referenced by Initialize(), ReadBuffer(), ReadBufferAsync(), ReadBuffers(), ReadBuffersSync(), SysClose(), SysOpen(), SysSeek(), SysStat(), SysSync(), WriteBuffer(), and ~TStorageFactoryFile().