From 07401bdde4faacab0f38ec86a2afa6ea644a69fe Mon Sep 17 00:00:00 2001
From: Danilo Piparo <danilo.piparo@cern.ch>
Date: Mon, 15 Oct 2018 10:35:03 +0200
Subject: [PATCH] [TTreeProcessorMT] Make helper functions in implementation
 file static

in addition, remove the MakeClusters helper function from the header file.
---
 tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx | 4 ----
 tree/treeplayer/src/TTreeProcessorMT.cxx      | 9 +++++----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx b/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx
index 4ac58dc44cd..d35921c8a58 100644
--- a/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx
+++ b/tree/treeplayer/inc/ROOT/TTreeProcessorMT.hxx
@@ -64,10 +64,6 @@ namespace ROOT {
          std::vector<std::vector<std::string>> fFriendFileNames;
       };
 
-      // EntryClusters and number of entries per file
-      using ClustersAndEntries = std::pair<std::vector<std::vector<EntryCluster>>, std::vector<Long64_t>>;
-      ClustersAndEntries MakeClusters(const std::string &treename, const std::vector<std::string> &filenames);
-
       class TTreeView {
       private:
          using TreeReaderEntryListPair = std::pair<std::unique_ptr<TTreeReader>, std::unique_ptr<TEntryList>>;
diff --git a/tree/treeplayer/src/TTreeProcessorMT.cxx b/tree/treeplayer/src/TTreeProcessorMT.cxx
index 0e9d5dcd02b..b9221a23cdc 100644
--- a/tree/treeplayer/src/TTreeProcessorMT.cxx
+++ b/tree/treeplayer/src/TTreeProcessorMT.cxx
@@ -34,8 +34,9 @@ namespace ROOT {
 namespace Internal {
 ////////////////////////////////////////////////////////////////////////
 /// Return a vector of cluster boundaries for the given tree and files.
-ClustersAndEntries
-MakeClusters(const std::string &treeName, const std::vector<std::string> &fileNames)
+// EntryClusters and number of entries per file
+using ClustersAndEntries = std::pair<std::vector<std::vector<EntryCluster>>, std::vector<Long64_t>>;
+static ClustersAndEntries MakeClusters(const std::string &treeName, const std::vector<std::string> &fileNames)
 {
    // Note that as a side-effect of opening all files that are going to be used in the
    // analysis once, all necessary streamers will be loaded into memory.
@@ -87,7 +88,7 @@ MakeClusters(const std::string &treeName, const std::vector<std::string> &fileNa
 
 ////////////////////////////////////////////////////////////////////////
 /// Return a vector containing the number of entries of each file of each friend TChain
-std::vector<std::vector<Long64_t>> GetFriendEntries(const std::vector<std::pair<std::string, std::string>> &friendNames,
+static std::vector<std::vector<Long64_t>> GetFriendEntries(const std::vector<std::pair<std::string, std::string>> &friendNames,
                                                     const std::vector<std::vector<std::string>> &friendFileNames)
 {
    std::vector<std::vector<Long64_t>> friendEntries;
@@ -138,7 +139,7 @@ static std::string GetTreeFullPath(const TTree &tree)
 
 ////////////////////////////////////////////////////////////////////////////////
 /// Get and store the names, aliases and file names of the friends of the tree.
-/// \param[in] tree The main tree whose friends to 
+/// \param[in] tree The main tree whose friends to
 ///
 /// Note that "friends of friends" and circular references in the lists of friends are not supported.
 Internal::FriendInfo TTreeProcessorMT::GetFriendInfo(TTree &tree)
-- 
GitLab