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,
int>::type = 0>
54 TDataFrame(std::string_view treeName,
const FILENAMESCOLL &filenamescoll,
61 template <typename FILENAMESCOLL, typename std::enable_if<TDFInternal::TIsContainer<FILENAMESCOLL>::fgValue,
int>
::type>
66 std::string treeNameInt(treeName);
67 auto chain = std::make_shared<TChain>(treeNameInt.c_str());
69 fProxiedPtr->SetTree(std::static_pointer_cast<TTree>(chain));
81 auto *
tree = df->GetTree();
82 auto defBranches = df->GetDefaultBranches();
83 auto tmpBranches = df->GetTmpBranches();
85 std::ostringstream ret;
87 ret <<
"A data frame built on top of the " <<
tree->GetName() <<
" dataset.";
88 if (!defBranches.empty()) {
89 if (defBranches.size() == 1)
90 ret <<
"\nDefault branch: " << defBranches[0];
92 ret <<
"\nDefault branches:\n";
93 for (
auto &&branch : defBranches) {
94 ret <<
" - " << branch <<
"\n";
99 ret <<
"A data frame that will create " << df->GetNEmptyEntries() <<
" entries\n";
106 #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.