00001 // @(#)root/tree:$Id: TBranchRef.h 37275 2010-12-04 21:32:11Z pcanal $ 00002 // Author: Rene Brun 19/08/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TBranchRef 00013 #define ROOT_TBranchRef 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TBranchRef // 00019 // // 00020 // A Branch to support referenced objects on other branches // 00021 ////////////////////////////////////////////////////////////////////////// 00022 00023 00024 #ifndef ROOT_TBranch 00025 #include "TBranch.h" 00026 #endif 00027 #ifndef ROOT_TRefTable 00028 #include "TRefTable.h" 00029 #endif 00030 00031 class TTree; 00032 00033 class TBranchRef : public TBranch { 00034 00035 protected: 00036 TRefTable *fRefTable; // pointer to the TRefTable 00037 00038 void ReadLeavesImpl(TBuffer &b); 00039 00040 public: 00041 TBranchRef(); 00042 TBranchRef(TTree *tree); 00043 virtual ~TBranchRef(); 00044 virtual void Clear(Option_t *option=""); 00045 virtual Int_t Fill(); 00046 virtual void FillLeaves(TBuffer &b); 00047 TRefTable *GetRefTable() const {return fRefTable;} 00048 virtual Bool_t Notify(); 00049 virtual void Print(Option_t *option="") const; 00050 virtual void Reset(Option_t *option=""); 00051 virtual Int_t SetParent(const TObject* obj, Int_t branchID); 00052 virtual void SetReadEntry(Long64_t entry) {fReadEntry = entry;} 00053 00054 ClassDef(TBranchRef,1); //to support referenced objects on other branches 00055 }; 00056 00057 #endif