16 #ifndef ROOT_TDATAFRAME 17 #define ROOT_TDATAFRAME 32 namespace Experimental {
40 TDataFrame(std::string_view treeName, std::string_view filenameglob,
const ColumnNames_t &defaultBranches = {});
52 template <
typename FILENAMESCOLL = std::vector<std::
string>,
53 typename std::enable_if<TDFInternal::TIsContainer<FILENAMESCOLL>::fgValue &&
54 !std::is_same<std::
string, FILENAMESCOLL>::value,
56 TDataFrame(std::string_view treeName,
const FILENAMESCOLL &filenamescoll,
const ColumnNames_t &defaultBranches = {});
62 template <typename FILENAMESCOLL, typename std::enable_if<TDFInternal::TIsContainer<FILENAMESCOLL>::fgValue &&
63 !std::is_same<std::string, FILENAMESCOLL>::value,
69 std::string treeNameInt(treeName);
70 auto chain = std::make_shared<TChain>(treeNameInt.c_str());
72 fProxiedPtr->SetTree(std::static_pointer_cast<TTree>(chain));
84 auto *
tree = df->GetTree();
85 auto defBranches = df->GetDefaultBranches();
86 auto tmpBranches = df->GetTmpBranches();
88 std::ostringstream ret;
90 ret <<
"A data frame built on top of the " <<
tree->GetName() <<
" dataset.";
91 if (!defBranches.empty()) {
92 if (defBranches.size() == 1)
93 ret <<
"\nDefault branch: " << defBranches[0];
95 ret <<
"\nDefault branches:\n";
96 for (
auto &&branch : defBranches) {
97 ret <<
" - " << branch <<
"\n";
102 ret <<
"A data frame that will create " << df->GetNEmptyEntries() <<
" entries\n";
109 #endif // ROOT_TDATAFRAME TDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches={})
Build the dataframe.
Namespace for new ROOT classes and functions.
TDFDetail::ColumnNames_t ColumnNames_t
std::shared_ptr< TLoopManager > GetDataFrameChecked()
Get the TLoopManager if reachable. If not, throw.
const char * ToConstCharPtr(const char *s)
std::string printValue(ROOT::Experimental::TDataFrame *tdf)
Describe directory structure in memory.
Print a TSeq at the prompt:
std::shared_ptr< TDFDetail::TLoopManager > fProxiedPtr
Key/value store of objects.
ROOT's TDataFrame offers a high level interface for analyses of data stored in TTrees.
A TTree object has a header with a name and a title.
The public interface to the TDataFrame federation of classes.