// @(#)root/tree:$Id$
// Author: Rene Brun   19/08/2004

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TBranchRef
#define ROOT_TBranchRef


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TBranchRef                                                           //
//                                                                      //
// A Branch to support referenced objects on other branches             //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TBranch
#include "TBranch.h"
#endif
#ifndef ROOT_TRefTable
#include "TRefTable.h"
#endif

class TTree;

class TBranchRef : public TBranch {
private:
   Long64_t   fRequestedEntry;  //! Cursor indicating which entry is being requested.

protected:
   TRefTable *fRefTable;        // pointer to the TRefTable

   void    ReadLeavesImpl(TBuffer &b);
   void    FillLeavesImpl(TBuffer &b);

public:
   TBranchRef();
   TBranchRef(TTree *tree);
   virtual ~TBranchRef();
   virtual void    Clear(Option_t *option="");
   virtual Int_t   Fill();
   TRefTable      *GetRefTable() const {return fRefTable;}
   virtual Bool_t  Notify();
   virtual void    Print(Option_t *option="") const;
   virtual void    Reset(Option_t *option="");
   virtual void    ResetAfterMerge(TFileMergeInfo *);
   virtual Int_t   SetParent(const TObject* obj, Int_t branchID);
   virtual void    SetRequestedEntry(Long64_t entry) {fRequestedEntry = entry;}

   ClassDef(TBranchRef,1);  //to support referenced objects on other branches
};

#endif
 TBranchRef.h:1
 TBranchRef.h:2
 TBranchRef.h:3
 TBranchRef.h:4
 TBranchRef.h:5
 TBranchRef.h:6
 TBranchRef.h:7
 TBranchRef.h:8
 TBranchRef.h:9
 TBranchRef.h:10
 TBranchRef.h:11
 TBranchRef.h:12
 TBranchRef.h:13
 TBranchRef.h:14
 TBranchRef.h:15
 TBranchRef.h:16
 TBranchRef.h:17
 TBranchRef.h:18
 TBranchRef.h:19
 TBranchRef.h:20
 TBranchRef.h:21
 TBranchRef.h:22
 TBranchRef.h:23
 TBranchRef.h:24
 TBranchRef.h:25
 TBranchRef.h:26
 TBranchRef.h:27
 TBranchRef.h:28
 TBranchRef.h:29
 TBranchRef.h:30
 TBranchRef.h:31
 TBranchRef.h:32
 TBranchRef.h:33
 TBranchRef.h:34
 TBranchRef.h:35
 TBranchRef.h:36
 TBranchRef.h:37
 TBranchRef.h:38
 TBranchRef.h:39
 TBranchRef.h:40
 TBranchRef.h:41
 TBranchRef.h:42
 TBranchRef.h:43
 TBranchRef.h:44
 TBranchRef.h:45
 TBranchRef.h:46
 TBranchRef.h:47
 TBranchRef.h:48
 TBranchRef.h:49
 TBranchRef.h:50
 TBranchRef.h:51
 TBranchRef.h:52
 TBranchRef.h:53
 TBranchRef.h:54
 TBranchRef.h:55
 TBranchRef.h:56
 TBranchRef.h:57
 TBranchRef.h:58
 TBranchRef.h:59
 TBranchRef.h:60