Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:32

0001 // @(#)root/tree:$Id$
0002 // Author: Rene Brun   19/08/2004
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TBranchRef
0013 #define ROOT_TBranchRef
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TBranchRef                                                           //
0019 //                                                                      //
0020 // A Branch to support referenced objects on other branches             //
0021 //////////////////////////////////////////////////////////////////////////
0022 
0023 
0024 #include "TBranch.h"
0025 
0026 #ifdef R__LESS_INCLUDES
0027 class TRefTable;
0028 #else
0029 #include "TRefTable.h"
0030 #endif
0031 
0032 class TTree;
0033 
0034 class TBranchRef : public TBranch {
0035 private:
0036    Long64_t   fRequestedEntry;  ///<! Cursor indicating which entry is being requested.
0037 
0038 protected:
0039    TRefTable *fRefTable;        ///< pointer to the TRefTable
0040 
0041    void    ReadLeavesImpl(TBuffer &b);
0042    void    FillLeavesImpl(TBuffer &b);
0043 
0044 public:
0045    TBranchRef();
0046    TBranchRef(TTree *tree);
0047    ~TBranchRef() override;
0048            void    Clear(Option_t *option="") override;
0049    TRefTable      *GetRefTable() const {return fRefTable;}
0050            bool    Notify() override;
0051            void    Print(Option_t *option="") const override;
0052            void    Reset(Option_t *option="") override;
0053            void    ResetAfterMerge(TFileMergeInfo *) override;
0054    virtual Int_t   SetParent(const TObject* obj, Int_t branchID);
0055    virtual void    SetRequestedEntry(Long64_t entry) {fRequestedEntry = entry;}
0056 
0057 private:
0058            Int_t   FillImpl(ROOT::Internal::TBranchIMTHelper *) override;
0059 
0060    ClassDefOverride(TBranchRef,1);  //to support referenced objects on other branches
0061 };
0062 
0063 #endif