From d02da5faec033d4e8ef9e2a7983616ac118193eb Mon Sep 17 00:00:00 2001
From: Philippe Canal <pcanal@fnal.gov>
Date: Fri, 18 Mar 2011 10:04:01 +0000
Subject: [PATCH] Update GetEntryNumberFriend to retun a Long64_t as needed
 (and as the other methods)

git-svn-id: http://root.cern.ch/svn/root/trunk@38496 27541ba8-7e3a-0410-8455-c3a389f83636
---
 tree/tree/inc/TVirtualIndex.h       | 2 +-
 tree/treeplayer/inc/TChainIndex.h   | 6 +++---
 tree/treeplayer/inc/TTreeIndex.h    | 6 +++---
 tree/treeplayer/src/TChainIndex.cxx | 6 +++---
 tree/treeplayer/src/TTreeIndex.cxx  | 6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tree/tree/inc/TVirtualIndex.h b/tree/tree/inc/TVirtualIndex.h
index 41852c9cff7..513372fb016 100644
--- a/tree/tree/inc/TVirtualIndex.h
+++ b/tree/tree/inc/TVirtualIndex.h
@@ -37,7 +37,7 @@ public:
    TVirtualIndex();
    virtual               ~TVirtualIndex();
    virtual void           Append(const TVirtualIndex *,Bool_t delaySort = kFALSE) = 0;
-   virtual Int_t          GetEntryNumberFriend(const TTree * /*T*/) = 0;
+   virtual Long64_t       GetEntryNumberFriend(const TTree * /*parent*/) = 0;
    virtual Long64_t       GetEntryNumberWithIndex(Int_t major, Int_t minor) const = 0;
    virtual Long64_t       GetEntryNumberWithBestIndex(Int_t major, Int_t minor) const = 0;
    virtual const char    *GetMajorName()    const = 0;
diff --git a/tree/treeplayer/inc/TChainIndex.h b/tree/treeplayer/inc/TChainIndex.h
index 54cbc73dd72..e9fb65b1440 100644
--- a/tree/treeplayer/inc/TChainIndex.h
+++ b/tree/treeplayer/inc/TChainIndex.h
@@ -67,14 +67,14 @@ public:
    TChainIndex(const TTree *T, const char *majorname, const char *minorname);
    virtual               ~TChainIndex();
    virtual void           Append(const TVirtualIndex *, Bool_t delaySort = kFALSE);
-   virtual Int_t          GetEntryNumberFriend(const TTree *T);
+   virtual Long64_t       GetEntryNumberFriend(const TTree *parent);
    virtual Long64_t       GetEntryNumberWithIndex(Int_t major, Int_t minor) const;
    virtual Long64_t       GetEntryNumberWithBestIndex(Int_t major, Int_t minor) const;
    const char            *GetMajorName()    const {return fMajorName.Data();}
    const char            *GetMinorName()    const {return fMinorName.Data();}
    virtual Long64_t       GetN()            const {return fEntries.size();}
-   virtual TTreeFormula  *GetMajorFormulaParent(const TTree *T);
-   virtual TTreeFormula  *GetMinorFormulaParent(const TTree *T);
+   virtual TTreeFormula  *GetMajorFormulaParent(const TTree *parent);
+   virtual TTreeFormula  *GetMinorFormulaParent(const TTree *parent);
    virtual void           UpdateFormulaLeaves(const TTree *parent);
    virtual void           SetTree(const TTree *T);
 
diff --git a/tree/treeplayer/inc/TTreeIndex.h b/tree/treeplayer/inc/TTreeIndex.h
index 2b83de356f9..284a4db7e25 100644
--- a/tree/treeplayer/inc/TTreeIndex.h
+++ b/tree/treeplayer/inc/TTreeIndex.h
@@ -47,7 +47,7 @@ public:
    TTreeIndex(const TTree *T, const char *majorname, const char *minorname);
    virtual               ~TTreeIndex();
    virtual void           Append(const TVirtualIndex *,Bool_t delaySort = kFALSE);
-   virtual Int_t          GetEntryNumberFriend(const TTree *T);
+   virtual Long64_t       GetEntryNumberFriend(const TTree *parent);
    virtual Long64_t       GetEntryNumberWithIndex(Int_t major, Int_t minor) const;
    virtual Long64_t       GetEntryNumberWithBestIndex(Int_t major, Int_t minor) const;
    virtual Long64_t      *GetIndexValues()  const {return fIndexValues;}
@@ -57,8 +57,8 @@ public:
    virtual Long64_t       GetN()            const {return fN;}
    virtual TTreeFormula  *GetMajorFormula();
    virtual TTreeFormula  *GetMinorFormula();
-   virtual TTreeFormula  *GetMajorFormulaParent(const TTree *T);
-   virtual TTreeFormula  *GetMinorFormulaParent(const TTree *T);
+   virtual TTreeFormula  *GetMajorFormulaParent(const TTree *parent);
+   virtual TTreeFormula  *GetMinorFormulaParent(const TTree *parent);
    virtual void           Print(Option_t *option="") const;
    virtual void           UpdateFormulaLeaves(const TTree *parent);
    virtual void           SetTree(const TTree *T);
diff --git a/tree/treeplayer/src/TChainIndex.cxx b/tree/treeplayer/src/TChainIndex.cxx
index 926374d140b..958698adf57 100644
--- a/tree/treeplayer/src/TChainIndex.cxx
+++ b/tree/treeplayer/src/TChainIndex.cxx
@@ -232,7 +232,7 @@ void TChainIndex::ReleaseSubTreeIndex(TVirtualIndex* index, int treeNo) const
 }
 
 //______________________________________________________________________________
-Int_t TChainIndex::GetEntryNumberFriend(const TTree *parent)
+Long64_t TChainIndex::GetEntryNumberFriend(const TTree *parent)
 {
    // see TTreeIndex::GetEntryNumberFriend for description
 
@@ -244,8 +244,8 @@ Int_t TChainIndex::GetEntryNumberFriend(const TTree *parent)
       // The Tree Index in the friend has a pair majorname,minorname
       // not available in the parent Tree T.
       // if the friend Tree has less entries than the parent, this is an error
-      Int_t pentry = parent->GetReadEntry();
-      if (pentry >= (Int_t)fTree->GetEntries()) return -2;
+      Long64_t pentry = parent->GetReadEntry();
+      if (pentry >= fTree->GetEntries()) return -2;
       // otherwise we ignore the Tree Index and return the entry number
       // in the parent Tree.
       return pentry;
diff --git a/tree/treeplayer/src/TTreeIndex.cxx b/tree/treeplayer/src/TTreeIndex.cxx
index b3654fc233d..a3f45da4ef9 100644
--- a/tree/treeplayer/src/TTreeIndex.cxx
+++ b/tree/treeplayer/src/TTreeIndex.cxx
@@ -247,7 +247,7 @@ void TTreeIndex::Append(const TVirtualIndex *add, Bool_t delaySort )
 }
 
 //______________________________________________________________________________
-Int_t TTreeIndex::GetEntryNumberFriend(const TTree *parent)
+Long64_t TTreeIndex::GetEntryNumberFriend(const TTree *parent)
 {
    // Returns the entry number in this (friend) Tree corresponding to entry in
    // the master Tree 'parent'.
@@ -263,8 +263,8 @@ Int_t TTreeIndex::GetEntryNumberFriend(const TTree *parent)
       // The Tree Index in the friend has a pair majorname,minorname
       // not available in the parent Tree T.
       // if the friend Tree has less entries than the parent, this is an error
-      Int_t pentry = parent->GetReadEntry();
-      if (pentry >= (Int_t)fTree->GetEntries()) return -2;
+      Long64_t pentry = parent->GetReadEntry();
+      if (pentry >= fTree->GetEntries()) return -2;
       // otherwise we ignore the Tree Index and return the entry number
       // in the parent Tree.
       return pentry;
-- 
GitLab