506 : TInterface<
TDFDetail::TLoopManager>(
std::make_shared<
TDFDetail::TLoopManager>(nullptr, defaultBranches))
508 const std::string treeNameInt(treeName);
510 auto msg =
"Invalid TDirectory!";
511 throw std::runtime_error(msg);
513 auto tree =
static_cast<TTree *
>(dirPtr->
Get(treeNameInt.c_str()));
515 auto msg =
"Tree \"" + treeNameInt +
"\" cannot be found!";
516 throw std::runtime_error(msg);
518 fProxiedPtr->SetTree(std::shared_ptr<TTree>(
tree, [](TTree *) {}));
531 TDataFrame::TDataFrame(std::string_view treeName, std::string_view filenameglob,
535 const std::string treeNameInt(treeName);
536 const std::string filenameglobInt(filenameglob);
537 auto chain =
new TChain(treeNameInt.c_str());
538 chain->
Add(filenameglobInt.c_str());
539 fProxiedPtr->SetTree(std::shared_ptr<TTree>(static_cast<TTree *>(chain)));
TDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches={})
Build the dataframe.
TDFDetail::ColumnNames_t ColumnNames_t
std::shared_ptr< ToContentType_t< T > > Get(const std::string &name)
Get the object for a key.
std::shared_ptr< TDFDetail::TLoopManager > fProxiedPtr
Key/value store of objects.
A chain is a collection of files containing TTree objects.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.