#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< edm::storage::Storage > > | storage_ |
TFile wrapper around #StorageFactory and #Storage.
Definition at line 17 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 107 of file TStorageFactoryFile.cc.
References Initialize(), fileinputsource_cfi::option, castor_dqm_sourceclient_file_cfg::path, and edm::threadLocalException::setException().
TStorageFactoryFile::TStorageFactoryFile | ( | const char * | name, |
Option_t * | option = "" , |
||
const char * | ftitle = "" , |
||
Int_t | compress = 1 |
||
) |
Definition at line 122 of file TStorageFactoryFile.cc.
References Initialize(), fileinputsource_cfi::option, castor_dqm_sourceclient_file_cfg::path, and edm::threadLocalException::setException().
|
override |
Definition at line 217 of file TStorageFactoryFile.cc.
|
private |
Definition at line 98 of file TStorageFactoryFile.cc.
References DDDCmsTrackerContruction::construct(), s_statsCtor, dqmMemoryStats::stats, and storageCounter().
TStorageFactoryFile::ClassDefOverride | ( | TStorageFactoryFile | , |
0 | |||
) |
|
private |
Definition at line 135 of file TStorageFactoryFile.cc.
References cms::cuda::assert(), DDDCmsTrackerContruction::construct(), beamerCreator::create(), MillePedeFileConverter_cfg::e, Exception, get, edm::Service< T >::isAvailable(), edm::errors::NotFound, edm::storage::IOFlags::OpenCreate, edm::storage::IOFlags::OpenRead, edm::storage::IOFlags::OpenWrap, edm::storage::IOFlags::OpenWrite, fileinputsource_cfi::option, castor_dqm_sourceclient_file_cfg::path, fileinputsource_cfi::read, s_statsCtor, edm::storage::StatisticsSenderService::setSize(), dqmMemoryStats::stats, storage_, storageCounter(), and update.
Referenced by TStorageFactoryFile().
|
override |
Definition at line 230 of file TStorageFactoryFile.cc.
References visDQMUpload::buf, HltBtagPostValidation_cff::c, dqmiodumpmetadata::n, fileinputsource_cfi::read, s_statsCPrefetch, s_statsCRead, s_statsRead, s_statsXRead, dqmMemoryStats::stats, storage_, storageCounter(), and edm::storage::StorageAccount::Stamp::tick().
Referenced by ReadBuffer().
|
override |
Definition at line 223 of file TStorageFactoryFile.cc.
References visDQMUpload::buf, and ReadBuffer().
|
override |
Definition at line 305 of file TStorageFactoryFile.cc.
References f, get, edm::storage::PREFETCH_PROBE_LENGTH, s_statsARead, dqmMemoryStats::stats, storage_, and storageCounter().
|
override |
Definition at line 421 of file TStorageFactoryFile.cc.
References visDQMUpload::buf, mps_fire::i, ReadBuffersSync(), s_statsARead, storage_, storageCounter(), summarizeEdmComparisonLogfiles::success, edm::storage::StorageAccount::Stamp::tick(), and dqmMemoryStats::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 354 of file TStorageFactoryFile.cc.
References cms::cuda::assert(), visDQMUpload::buf, ReadRepacker::bufferUsed(), mps_fire::i, ReadRepacker::iov(), ReadRepacker::pack(), ReadRepacker::realBytesProcessed(), mps_fire::result, s_statsXRead, storage_, storageCounter(), edm::storage::StorageAccount::Stamp::tick(), and ReadRepacker::unpack().
Referenced by ReadBuffers().
|
inlineprivate |
Definition at line 58 of file TStorageFactoryFile.h.
References edm::get_underlying_safe(), and storage_.
Referenced by SysClose().
|
override |
Definition at line 598 of file TStorageFactoryFile.cc.
|
overrideprotected |
Definition at line 559 of file TStorageFactoryFile.cc.
References releaseStorage(), s_statsClose, dqmMemoryStats::stats, storage_, and storageCounter().
|
overrideprotected |
Definition at line 526 of file TStorageFactoryFile.cc.
References Exception, HLT_2023v12_cff::flags, get, O_NONBLOCK, edm::storage::IOFlags::OpenAppend, edm::storage::IOFlags::OpenCreate, edm::storage::IOFlags::OpenExclusive, edm::storage::IOFlags::OpenNonBlock, edm::storage::IOFlags::OpenRead, edm::storage::IOFlags::OpenTruncate, edm::storage::IOFlags::OpenWrite, BTVHLTOfflineSource_cfi::pathname, s_statsOpen, dqmMemoryStats::stats, storage_, and storageCounter().
|
overrideprotected |
Definition at line 571 of file TStorageFactoryFile.cc.
References hltrates_dqm_sourceclient-live_cfg::offset, RefreshWebPage::rel, s_statsSeek, L1DTConfigBti_cff::SET, dqmMemoryStats::stats, storage_, and storageCounter().
|
overrideprotected |
Definition at line 587 of file TStorageFactoryFile.cc.
References HLT_2023v12_cff::flags, s_statsStat, findQualityFiles::size, edm_modernize_messagelogger::stat, dqmMemoryStats::stats, storage_, and storageCounter().
|
overrideprotected |
Definition at line 580 of file TStorageFactoryFile.cc.
References s_statsFlush, dqmMemoryStats::stats, storage_, and storageCounter().
|
override |
Definition at line 469 of file TStorageFactoryFile.cc.
References visDQMUpload::buf, dqmiodumpmetadata::n, s_statsCWrite, s_statsWrite, s_statsXWrite, dqmMemoryStats::stats, storage_, storageCounter(), edm::storage::StorageAccount::Stamp::tick(), and writeEcalDQMStatus::write.
|
private |
Definition at line 62 of file TStorageFactoryFile.h.
Referenced by Initialize(), ReadBuffer(), ReadBufferAsync(), ReadBuffers(), ReadBuffersSync(), releaseStorage(), SysClose(), SysOpen(), SysSeek(), SysStat(), SysSync(), and WriteBuffer().