TBranchProxyClassDescriptor.h

Go to the documentation of this file.
00001 // @(#)root/treeplayer:$Id: TBranchProxyClassDescriptor.h 36449 2010-10-28 20:52:17Z pcanal $
00002 // Author: Philippe Canal 06/06/2004
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al.        *
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_TBranchProxyClassDescriptor
00013 #define ROOT_TBranchProxyClassDescriptor
00014 
00015 #ifndef ROOT_TList
00016 #include "TList.h"
00017 #endif
00018 #ifndef ROOT_TNamed
00019 #include "TNamed.h"
00020 #endif
00021 
00022 class TTree;
00023 class TVirtualStreamerInfo;
00024 
00025 namespace ROOT {
00026 
00027    class TBranchProxyDescriptor;
00028 
00029    class TBranchProxyClassDescriptor : public TNamed {
00030 
00031    public:
00032       enum ELocation { kOut=0, kClones, kSTL, kInsideClones, kInsideSTL }; // for IsClones
00033    private:
00034       TList          fListOfSubProxies;
00035       TList          fListOfBaseProxies;
00036       ELocation      fIsClones;      // 0 for the general case, 1 when this a split clases inside a TClonesArray, 2 when this is a split classes inside an STL container.
00037       TString        fContainerName; // Name of the container if any
00038       Bool_t         fIsLeafList;    // true if the branch was constructed from a leaf list.
00039       UInt_t         fSplitLevel;
00040 
00041       TString        fRawSymbol;
00042       TString        fBranchName;
00043       TString        fSubBranchPrefix;
00044       TVirtualStreamerInfo *fInfo;     // TVirtualStreamerInfo describing this class
00045 
00046       UInt_t  fMaxDatamemberType;
00047 
00048       void NameToSymbol();
00049 
00050       TBranchProxyClassDescriptor(const TBranchProxyClassDescriptor &b) :TNamed(b){;}
00051       TBranchProxyClassDescriptor& operator=(const TBranchProxyClassDescriptor&) {return *this;}
00052 
00053    public:
00054 
00055       TBranchProxyClassDescriptor(const char *type, TVirtualStreamerInfo *info, const char *branchname,
00056                                   ELocation isclones, UInt_t splitlevel, const TString &containerName);
00057       TBranchProxyClassDescriptor(const char *branchname);
00058 
00059       TBranchProxyClassDescriptor(const char *type, TVirtualStreamerInfo *info, const char *branchname,
00060                                   const char *branchPrefix, ELocation isclones,
00061                                   UInt_t splitlevel, const TString &containerName);
00062 
00063       const char* GetBranchName() const;
00064       const char* GetSubBranchPrefix() const;
00065 
00066       const char* GetRawSymbol() const;
00067       
00068       TVirtualStreamerInfo *GetInfo() const { return fInfo; }
00069 
00070       UInt_t GetSplitLevel() const;
00071 
00072       virtual Bool_t IsEquivalent(const TBranchProxyClassDescriptor* other);
00073 
00074       void AddDescriptor(TBranchProxyDescriptor *desc, Bool_t isBase);
00075       Bool_t IsLoaded() const;
00076       static Bool_t IsLoaded(const char*);
00077       Bool_t IsClones() const;
00078       Bool_t IsSTL() const;
00079       ELocation GetIsClones() const;
00080       TString GetContainerName() const;
00081 
00082       void OutputDecl(FILE *hf, int offset, UInt_t /* maxVarname */);
00083 
00084       ClassDef(TBranchProxyClassDescriptor,0); // Class to cache the information we gathered about the branch and its content
00085    };
00086 
00087 }
00088 
00089 #endif

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