Logo ROOT   6.16/01
Reference Guide
RDataFrame.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 12/2016
2
3/*************************************************************************
4 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11/**
12 \defgroup dataframe DataFrame
13ROOT's RDataFrame allows to analyse data stored in TTrees with a high level interface.
14*/
15
16#ifndef ROOT_RDATAFRAME
17#define ROOT_RDATAFRAME
18
20#include "ROOT/RDF/Utils.hxx"
21#include "ROOT/RStringView.hxx"
22#include "RtypesCore.h"
23
24#include <memory>
25#include <ostream>
26#include <string>
27#include <vector>
28
29class TDirectory;
30class TTree;
31
32namespace ROOT {
33namespace RDF {
34class RDataSource;
35}
36
39namespace TTraits = ROOT::TypeTraits;
40
41class RDataFrame : public ROOT::RDF::RInterface<RDFDetail::RLoopManager> {
42public:
44 RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches = {});
45 RDataFrame(std::string_view treename, const std::vector<std::string> &filenames,
46 const ColumnNames_t &defaultBranches = {});
47 RDataFrame(std::string_view treeName, ::TDirectory *dirPtr, const ColumnNames_t &defaultBranches = {});
48 RDataFrame(TTree &tree, const ColumnNames_t &defaultBranches = {});
49 RDataFrame(ULong64_t numEntries);
50 RDataFrame(std::unique_ptr<ROOT::RDF::RDataSource>, const ColumnNames_t &defaultBranches = {});
51};
52
53} // ns ROOT
54
55/// Print a RDataFrame at the prompt
56namespace cling {
57std::string printValue(ROOT::RDataFrame *tdf);
58} // ns cling
59
60#endif // ROOT_RDATAFRAME
unsigned long long ULong64_t
Definition: RtypesCore.h:70
The public interface to the RDataFrame federation of classes.
Definition: RInterface.hxx:87
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Definition: RDataFrame.hxx:41
RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches={})
Build the dataframe.
Definition: RDataFrame.cxx:830
RDFDetail::ColumnNames_t ColumnNames_t
Definition: RDataFrame.hxx:43
RDataFrame(std::string_view treeName, ::TDirectory *dirPtr, const ColumnNames_t &defaultBranches={})
Describe directory structure in memory.
Definition: TDirectory.h:34
A TTree object has a header with a name and a title.
Definition: TTree.h:71
ROOT type_traits extensions.
Definition: TypeTraits.hxx:23
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
ROOT::Detail::RDF::ColumnNames_t ColumnNames_t
Definition: RDataFrame.cxx:790
Print a TSeq at the prompt:
Definition: TDatime.h:115
std::string printValue(const TDatime *val)
Print a TDatime at the prompt.
Definition: TDatime.cxx:514
basic_string_view< char > string_view
Definition: RStringView.hxx:35
Definition: tree.py:1