TBranchClones.h

Go to the documentation of this file.
00001 // @(#)root/tree:$Id: TBranchClones.h 33097 2010-04-19 21:47:55Z 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_TBranchClones
00013 #define ROOT_TBranchClones
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TBranchClones                                                        //
00019 //                                                                      //
00020 // A Branch for the case of an array of clone objects.                  //
00021 //////////////////////////////////////////////////////////////////////////
00022 
00023 
00024 #ifndef ROOT_TBranch
00025 #include "TBranch.h"
00026 #endif
00027 
00028 class TClonesArray;
00029 class TTreeCloner;
00030 
00031 class TBranchClones : public TBranch {
00032 
00033 protected:
00034    TClonesArray     *fList;           //!Pointer to the clonesarray
00035    Int_t            fRead;            //!flag = 1 if clonesarray has been read
00036    Int_t            fN;               //!Number of elements in ClonesArray
00037    Int_t            fNdataMax;        //!Maximum value of fN
00038    TString          fClassName;       //name of the class of the objets in the ClonesArray
00039    TBranch          *fBranchCount;    //Branch with clones count
00040 
00041    friend class TTreeCloner;
00042 
00043    void Init(TTree *tree, TBranch *parent, const char *name, void *clonesaddress, Int_t basketsize=32000,Int_t compress=-1, Int_t splitlevel=1);
00044 
00045 public:
00046    TBranchClones();
00047    TBranchClones(TTree *tree, const char *name, void *clonesaddress, Int_t basketsize=32000,Int_t compress=-1, Int_t splitlevel=1);
00048    TBranchClones(TBranch *parent, const char *name, void *clonesaddress, Int_t basketsize=32000,Int_t compress=-1, Int_t splitlevel=1);
00049    virtual ~TBranchClones();
00050    
00051    virtual void    Browse(TBrowser *b);
00052    virtual Int_t   Fill();
00053    virtual Int_t   GetEntry(Long64_t entry=0, Int_t getall = 0);
00054    virtual Int_t   GetN() const {return fN;}
00055    TClonesArray    *GetList() const {return fList;}
00056    Bool_t          IsFolder() const {return kTRUE;}
00057    virtual void    Print(Option_t *option="") const;
00058    virtual void    Reset(Option_t *option="");
00059    virtual void    SetAddress(void *add);
00060    virtual void    SetBasketSize(Int_t buffsize);
00061    virtual void    UpdateFile();
00062 
00063    ClassDef(TBranchClones,2);  //Branch in case of an array of clone objects
00064 };
00065 
00066 #endif

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