Skip to content
Snippets Groups Projects
Commit 206ec200 authored by Danilo Piparo's avatar Danilo Piparo
Browse files

[TDF] Fix bug in construction with container of names

parent d4dc97b5
No related branches found
No related tags found
No related merge requests found
......@@ -63,10 +63,9 @@ TDataFrame::TDataFrame(std::string_view treeName, const FILENAMESCOLL &filenames
const ColumnNames_t &defaultBranches)
: TDF::TInterface<TDFDetail::TLoopManager>(std::make_shared<TDFDetail::TLoopManager>(nullptr, defaultBranches))
{
const std::string treeNameInt(treeName);
auto chain = new TChain(treeNameInt.c_str());
auto chain = std::make_shared<TChain>(treeName.c_str());
for (auto &fileName : filenamescoll) chain->Add(TDFInternal::ToConstCharPtr(fileName));
fProxiedPtr->SetTree(std::make_shared<TTree>(static_cast<TTree *>(chain)));
fProxiedPtr->SetTree(std::static_pointer_cast<TTree>(chain));
}
} // end NS Experimental
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment