693 : RInterface<
RDFDetail::RLoopManager>(
std::make_shared<
RDFDetail::RLoopManager>(nullptr, defaultBranches))
696 auto msg =
"Invalid TDirectory!";
697 throw std::runtime_error(msg);
699 const std::string treeNameInt(treeName);
700 auto tree =
static_cast<TTree *
>(dirPtr->
Get(treeNameInt.c_str()));
702 auto msg =
"Tree \"" + treeNameInt +
"\" cannot be found!";
703 throw std::runtime_error(msg);
705 GetProxiedPtr()->SetTree(std::shared_ptr<TTree>(
tree, [](
TTree *) {}));
721 const std::string treeNameInt(treeName);
722 const std::string filenameglobInt(filenameglob);
723 auto chain = std::make_shared<TChain>(treeNameInt.c_str());
724 chain->Add(filenameglobInt.c_str());
740 std::string treeNameInt(treeName);
741 auto chain = std::make_shared<TChain>(treeNameInt.c_str());
742 for (
auto &fileName : filenames)
743 chain->Add(fileName.c_str());
792 auto *
tree = df->GetTree();
793 auto defBranches = df->GetDefaultColumnNames();
795 std::ostringstream ret;
797 ret <<
"A data frame built on top of the " <<
tree->GetName() <<
" dataset.";
798 if (!defBranches.empty()) {
799 if (defBranches.size() == 1)
800 ret <<
"\nDefault branch: " << defBranches[0];
802 ret <<
"\nDefault branches:\n";
803 for (
auto &&branch : defBranches) {
804 ret <<
" - " << branch <<
"\n";
809 ret <<
"A data frame that will create " << df->GetNEmptyEntries() <<
" entries\n";
Namespace for new ROOT classes and functions.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
std::shared_ptr< RLoopManager > GetLoopManager()
Get the RLoopManager if reachable. If not, throw.
std::string printValue(const TDatime *val)
Print a TDatime at the prompt.
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees, CSV's and other data formats.
const std::shared_ptr< RDFDetail::RLoopManager > & GetProxiedPtr() const
Describe directory structure in memory.
unsigned long long ULong64_t
Print a TSeq at the prompt:
basic_string_view< char > string_view
RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches={})
Build the dataframe.
A TTree object has a header with a name and a title.
RDFDetail::ColumnNames_t ColumnNames_t