Skip to content

Commit d8546e2

Browse files
authored
Merge pull request #48969 from dan131riley/ttrecache-refactoring
PoolSource TTreeCache refactoring
2 parents 7dd41ef + d379344 commit d8546e2

File tree

5 files changed

+712
-356
lines changed

5 files changed

+712
-356
lines changed

IOPool/Input/src/InputFile.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ namespace edm {
4848
static void reportReadBranch(InputType inputType, std::string const& branchname);
4949

5050
TObject* Get(char const* name) { return file_->Get(name); }
51-
std::unique_ptr<TTreeCache> createCacheWithSize(TTree& iTree, unsigned int cacheSize) {
52-
iTree.SetCacheSize(static_cast<Long64_t>(cacheSize));
53-
std::unique_ptr<TTreeCache> newCache(dynamic_cast<TTreeCache*>(file_->GetCacheRead(&iTree)));
54-
file_->SetCacheRead(nullptr, &iTree, TFile::kDoNotDisconnect);
51+
std::unique_ptr<TTreeCache> createCacheWithSize(TTree* iTree, unsigned int cacheSize) {
52+
iTree->SetCacheSize(static_cast<Long64_t>(cacheSize));
53+
std::unique_ptr<TTreeCache> newCache(dynamic_cast<TTreeCache*>(file_->GetCacheRead(iTree)));
54+
file_->SetCacheRead(nullptr, iTree, TFile::kDoNotDisconnect);
5555
return newCache;
5656
}
5757

0 commit comments

Comments
 (0)