From 4e4e373a899d2e0c787ff7a898357d77f3ac3a4e Mon Sep 17 00:00:00 2001 From: Stefan Wunsch <stefan.wunsch@cern.ch> Date: Fri, 7 Dec 2018 10:52:04 +0100 Subject: [PATCH] [RDF,PyROOT] Rename TTreeAsFlatMatrix header to PyROOTHelpers and change namespace from Detail to Internal --- bindings/pyroot/ROOT.py | 8 ++++---- tree/dataframe/CMakeLists.txt | 2 +- .../ROOT/RDF/{TTreeAsFlatMatrix.hxx => PyROOTHelpers.hxx} | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) rename tree/dataframe/inc/ROOT/RDF/{TTreeAsFlatMatrix.hxx => PyROOTHelpers.hxx} (95%) diff --git a/bindings/pyroot/ROOT.py b/bindings/pyroot/ROOT.py index 26a3da7f3c4..d291a806c4e 100644 --- a/bindings/pyroot/ROOT.py +++ b/bindings/pyroot/ROOT.py @@ -357,10 +357,10 @@ def _TTreeAsMatrix(self, columns=None, exclude=None, dtype="double", return_labe flat_matrix = _root.std.vector(dtype)(self.GetEntries()*len(columns)) # Read the tree as flat std.vector(dtype) - tree_ptr = _root.ROOT.Detail.RDF.GetAddress(self) - columns_vector_ptr = _root.ROOT.Detail.RDF.GetAddress(columns_vector) - flat_matrix_ptr = _root.ROOT.Detail.RDF.GetVectorAddress(dtype)(flat_matrix) - jit_code = "ROOT::Detail::RDF::TTreeAsFlatMatrixHelper<{dtype}, {col_dtypes}>(*reinterpret_cast<TTree*>({tree_ptr}), *reinterpret_cast<std::vector<{dtype}>* >({flat_matrix_ptr}), *reinterpret_cast<std::vector<string>* >({columns_vector_ptr}));".format( + tree_ptr = _root.ROOT.Internal.RDF.GetAddress(self) + columns_vector_ptr = _root.ROOT.Internal.RDF.GetAddress(columns_vector) + flat_matrix_ptr = _root.ROOT.Internal.RDF.GetVectorAddress(dtype)(flat_matrix) + jit_code = "ROOT::Internal::RDF::TTreeAsFlatMatrixHelper<{dtype}, {col_dtypes}>(*reinterpret_cast<TTree*>({tree_ptr}), *reinterpret_cast<std::vector<{dtype}>* >({flat_matrix_ptr}), *reinterpret_cast<std::vector<string>* >({columns_vector_ptr}));".format( col_dtypes = ", ".join(col_dtypes), dtype = dtype, tree_ptr = tree_ptr, diff --git a/tree/dataframe/CMakeLists.txt b/tree/dataframe/CMakeLists.txt index 84c60d3a815..40b2a75400d 100644 --- a/tree/dataframe/CMakeLists.txt +++ b/tree/dataframe/CMakeLists.txt @@ -55,7 +55,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTDataFrame ROOT/RDF/RRange.hxx ROOT/RDF/RSlotStack.hxx ROOT/RDF/Utils.hxx - ROOT/RDF/TTreeAsFlatMatrix.hxx + ROOT/RDF/PyROOTHelpers.hxx ${RDATAFRAME_EXTRA_HEADERS} SOURCES src/RActionBase.cxx diff --git a/tree/dataframe/inc/ROOT/RDF/TTreeAsFlatMatrix.hxx b/tree/dataframe/inc/ROOT/RDF/PyROOTHelpers.hxx similarity index 95% rename from tree/dataframe/inc/ROOT/RDF/TTreeAsFlatMatrix.hxx rename to tree/dataframe/inc/ROOT/RDF/PyROOTHelpers.hxx index f307ca3fedd..5a90fa79fe7 100644 --- a/tree/dataframe/inc/ROOT/RDF/TTreeAsFlatMatrix.hxx +++ b/tree/dataframe/inc/ROOT/RDF/PyROOTHelpers.hxx @@ -8,8 +8,8 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ -#ifndef ROOT_TTreeAsFlatMatrix -#define ROOT_TTreeAsFlatMatrix +#ifndef ROOT_PyROOTHelpers +#define ROOT_PyROOTHelpers #include "ROOT/RDataFrame.hxx" @@ -18,7 +18,7 @@ #include <utility> namespace ROOT { -namespace Detail { +namespace Internal { namespace RDF { template <typename dtype> @@ -61,7 +61,7 @@ void TTreeAsFlatMatrixHelper(TTree &tree, std::vector<BufType> &matrix, std::vec } } // namespace RDF -} // namespace Detail +} // namespace Internal } // namespace ROOT #endif -- GitLab