TBranchObject.h

Go to the documentation of this file.
00001 // @(#)root/tree:$Id: TBranchObject.h 38060 2011-02-13 21:17:54Z pcanal $
00002 // Author: Rene Brun   11/02/96
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, 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_TBranchObject
00013 #define ROOT_TBranchObject
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TBranchObject                                                        //
00019 //                                                                      //
00020 // A Branch for the case of an object.                                  //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 
00024 #ifndef ROOT_TBranch
00025 #include "TBranch.h"
00026 #endif
00027 
00028 class TBranchObject : public TBranch {
00029 
00030 protected:
00031    enum { kWarn = BIT(12) };
00032    
00033    TString     fClassName;        //Class name of referenced object
00034    TObject     *fOldObject;       //!Pointer to old object
00035 
00036    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);   
00037 
00038 public:
00039    TBranchObject();
00040    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);
00041    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);
00042    virtual ~TBranchObject();
00043    
00044    virtual void        Browse(TBrowser *b);
00045    virtual Int_t       Fill();
00046    virtual const char* GetClassName() const { return fClassName.Data(); };
00047    virtual const char* GetObjClassName() { return fClassName.Data(); };
00048    virtual Int_t       GetEntry(Long64_t entry=0, Int_t getall = 0);
00049    virtual Int_t       GetExpectedType(TClass *&clptr,EDataType &type);
00050    Bool_t              IsFolder() const;
00051    virtual void        Print(Option_t *option="") const;
00052    virtual void        Reset(Option_t *option="");
00053    virtual void        SetAddress(void *addobj);
00054    virtual void        SetAutoDelete(Bool_t autodel=kTRUE);
00055    virtual void        SetBasketSize(Int_t buffsize);
00056    virtual void        SetupAddresses();
00057    virtual void        UpdateAddress();
00058    
00059    ClassDef(TBranchObject,1);  //Branch in case of an object
00060 };
00061 
00062 #endif

Generated on Tue Jul 5 14:26:34 2011 for ROOT_528-00b_version by  doxygen 1.5.1