// @(#)root/tree:$Id$
// Author: Rene Brun   11/02/96

/*************************************************************************
 * Copyright (C) 1995-2000, 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_TBranchObject
#define ROOT_TBranchObject


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TBranchObject                                                        //
//                                                                      //
// A Branch for the case of an object.                                  //
//////////////////////////////////////////////////////////////////////////


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

class TBranchObject : public TBranch {

protected:
   enum { kWarn = BIT(12) };

   TString     fClassName;        //Class name of referenced object
   TObject     *fOldObject;       //!Pointer to old object

   void Init(TTree *tree, TBranch *parent, const char *name, const char *classname, void *addobj, Int_t basketsize, Int_t splitlevel, Int_t compress, Bool_t isptrptr);

public:
   TBranchObject();
   TBranchObject(TBranch *parent, const char *name, const char *classname, void *addobj, Int_t basketsize=32000, Int_t splitlevel = 0, Int_t compress=-1, Bool_t isptrptr = kTRUE);
   TBranchObject(TTree *tree, const char *name, const char *classname, void *addobj, Int_t basketsize=32000, Int_t splitlevel = 0, Int_t compress=-1, Bool_t isptrptr = kTRUE);
   virtual ~TBranchObject();

   virtual void        Browse(TBrowser *b);
   virtual Int_t       Fill();
   virtual const char* GetClassName() const { return fClassName.Data(); };
   virtual const char* GetObjClassName() { return fClassName.Data(); };
   virtual Int_t       GetEntry(Long64_t entry=0, Int_t getall = 0);
   virtual Int_t       GetExpectedType(TClass *&clptr,EDataType &type);
   Bool_t              IsFolder() const;
   virtual void        Print(Option_t *option="") const;
   virtual void        Reset(Option_t *option="");
   virtual void        ResetAfterMerge(TFileMergeInfo *);
   virtual void        SetAddress(void *addobj);
   virtual void        SetAutoDelete(Bool_t autodel=kTRUE);
   virtual void        SetBasketSize(Int_t buffsize);
   virtual void        SetupAddresses();
   virtual void        UpdateAddress();

   ClassDef(TBranchObject,1);  //Branch in case of an object
};

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