Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
19#include "TROOT.h" // To allow ROOT::EnableImplicitMT without including ROOT.h
22#include "ROOT/RDF/Utils.hxx"
23#include "ROOT/RStringView.hxx"
24#include "RtypesCore.h"
25
26#include <memory>
27#include <ostream>
28#include <string>
29#include <vector>
30
31class TDirectory;
32class TTree;
33
34namespace ROOT {
35
36class RDataFrame;
37
38namespace Internal {
39namespace RDF {
40ROOT::RDataFrame MakeDataFrameFromSpec(const RDatasetSpec &spec);
41} // namespace RDF
42} // namespace Internal
43
44namespace RDF {
45class RDataSource;
46}
47
49
50class RDataFrame : public ROOT::RDF::RInterface<RDFDetail::RLoopManager> {
51public:
53 RDataFrame(std::string_view treeName, std::string_view filenameglob, const ColumnNames_t &defaultBranches = {});
54 RDataFrame(std::string_view treename, const std::vector<std::string> &filenames,
55 const ColumnNames_t &defaultBranches = {});
56 RDataFrame(std::string_view treeName, ::TDirectory *dirPtr, const ColumnNames_t &defaultBranches = {});
57 RDataFrame(TTree &tree, const ColumnNames_t &defaultBranches = {});
58 RDataFrame(ULong64_t numEntries);
59 RDataFrame(std::unique_ptr<ROOT::RDF::RDataSource>, const ColumnNames_t &defaultBranches = {});
60
61 friend RDataFrame ROOT::Internal::RDF::MakeDataFrameFromSpec(const ROOT::Internal::RDF::RDatasetSpec &spec);
62
63private:
64 RDataFrame(ROOT::Internal::RDF::RDatasetSpec spec);
65};
66
67} // ns ROOT
68
69/// Print a RDataFrame at the prompt
70namespace cling {
71std::string printValue(ROOT::RDataFrame *tdf);
72} // ns cling
73
74#endif // ROOT_RDATAFRAME
unsigned long long ULong64_t
Definition RtypesCore.h:81
The public interface to the RDataFrame federation of classes.
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTree,...
ROOT::RDF::ColumnNames_t ColumnNames_t
RDataFrame(std::string_view treeName, ::TDirectory *dirPtr, const ColumnNames_t &defaultBranches={})
Describe directory structure in memory.
Definition TDirectory.h:45
A TTree represents a columnar dataset.
Definition TTree.h:79
ROOT::RDataFrame MakeDataFrameFromSpec(const RDatasetSpec &spec)
std::vector< std::string > ColumnNames_t
Definition Utils.hxx:35
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition tree.py:1