Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46075
b: "refs/heads/CMSSW_7_1_X"
c: aa543b7
h: "refs/heads/CMSSW_7_1_X"
i:
  46073: bde0577
  46071: 880f8ae
v: v3
  • Loading branch information
Lassi Tuura committed Jun 18, 2008
1 parent 2a22379 commit 53cfc5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: ac155dadd83efa75cad55c0508a57a2b9dd3d66c
"refs/heads/CMSSW_7_1_X": b002ae62c4a29f474dd42df99ef871ed7f640c61
"refs/heads/CMSSW_7_1_X": aa543b7cb85546ef59924fb90a134cf085a6cfd1
17 changes: 16 additions & 1 deletion trunk/IOPool/TFileAdaptor/src/TStorageFactoryFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ TStorageFactoryFile::ReadBufferAsync(Long64_t off, Int_t len)

StorageAccount::Stamp stats(storageCounter(s_statsARead, "read-async"));

// If asynchronous reading is disabled, bail out now, regardless
// whether the underlying storage supports prefetching. If it is
// forced on, pretend it's on, even if the storage doesn't support
// it, as this turns off the caching in ROOT's side.
StorageFactory *f = StorageFactory::get();
switch (f->cacheHint())
{
case StorageFactory::CACHE_HINT_APPLICATION:
return kTRUE;
case StorageFactory::CACHE_HINT_STORAGE:
return kFALSE;
default:
break;
}

// Let the I/O method indicate if it can do client-side prefetch.
// If it does, then for example TTreeCache will drop its own cache
// and will use the client-side cache of the actual I/O layer.
Expand Down Expand Up @@ -296,7 +311,7 @@ TStorageFactoryFile::ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbu

// Read from underlying storage.
Int_t total = 0;
std::vector<IOPosBuffer> iov(nbuf);
std::vector<IOPosBuffer> iov;
iov.reserve(nbuf);
for (Int_t i = 0; i < nbuf; ++i)
{
Expand Down

0 comments on commit 53cfc5f

Please sign in to comment.