Logo ROOT  
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
13 ROOT'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 
19 #include "TROOT.h" // To allow ROOT::EnableImplicitMT without including ROOT.h
20 #include "ROOT/RDF/RInterface.hxx"
21 #include "ROOT/RDF/Utils.hxx"
22 #include "ROOT/RStringView.hxx"
23 #include "RtypesCore.h"
24 
25 #include <memory>
26 #include <ostream>
27 #include <string>
28 #include <vector>
29 
30 class TDirectory;
31 class TTree;
32 
33 namespace ROOT {
34 namespace RDF {
35 class RDataSource;
36 }
37 
38 namespace RDFDetail = ROOT::Detail::RDF;
40 namespace TTraits = ROOT::TypeTraits;
41 
42 class RDataFrame : public ROOT::RDF::RInterface<RDFDetail::RLoopManager> {
43 public:
45  RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches = {});
46  RDataFrame(std::string_view treename, const std::vector<std::string> &filenames,
47  const ColumnNames_t &defaultBranches = {});
48  RDataFrame(std::string_view treeName, ::TDirectory *dirPtr, const ColumnNames_t &defaultBranches = {});
49  RDataFrame(TTree &tree, const ColumnNames_t &defaultBranches = {});
50  RDataFrame(ULong64_t numEntries);
51  RDataFrame(std::unique_ptr<ROOT::RDF::RDataSource>, const ColumnNames_t &defaultBranches = {});
52 };
53 
54 } // ns ROOT
55 
56 /// Print a RDataFrame at the prompt
57 namespace cling {
58 std::string printValue(ROOT::RDataFrame *tdf);
59 } // ns cling
60 
61 #endif // ROOT_RDATAFRAME
ROOT::RDataFrame::ColumnNames_t
RDFDetail::ColumnNames_t ColumnNames_t
Definition: RDataFrame.hxx:44
ROOT::TypeTraits
ROOT type_traits extensions.
Definition: TypeTraits.hxx:27
tree
Definition: tree.py:1
string_view
basic_string_view< char > string_view
Definition: libcpp_string_view.h:785
TTree
Definition: TTree.h:79
Utils.hxx
ROOT::RDataFrame::RDataFrame
RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches={})
Build the dataframe.
Definition: RDataFrame.cxx:905
RInterface.hxx
ROOT::RDataFrame
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Definition: RDataFrame.hxx:42
ROOT::Detail::RDF
Definition: GraphUtils.hxx:40
ROOT::Detail::RDF::ColumnNames_t
std::vector< std::string > ColumnNames_t
Definition: RLoopManager.hxx:53
TROOT.h
RStringView.hxx
ROOT::RDF::RInterface
The public interface to the RDataFrame federation of classes.
Definition: InterfaceUtils.hxx:53
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:74
RtypesCore.h
ROOT::Internal::RDF
Definition: RArrowDS.hxx:15
TDirectory
Definition: TDirectory.h:40
ROOT
VSD Structures.
Definition: StringConv.hxx:21