00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TTreeProxyGenerator
00013 #define ROOT_TTreeProxyGenerator
00014
00015 #ifndef ROOT_Tlist
00016 #include "TList.h"
00017 #endif
00018 #ifndef ROOT_TString
00019 #include "TString.h"
00020 #endif
00021
00022 class TBranch;
00023 class TBranchElement;
00024 class TLeaf;
00025 class TTree;
00026 class TStreamerElement;
00027
00028 namespace ROOT {
00029 class TBranchProxy;
00030 class TFriendProxyDescriptor;
00031 class TBranchProxyDescriptor;
00032 class TBranchProxyClassDescriptor;
00033
00034 class TTreeProxyGenerator
00035 {
00036 public:
00037 enum EContainer { kNone, kClones, kSTL };
00038 enum EOption { kNoOption, kNoHist };
00039 UInt_t fMaxDatamemberType;
00040 TString fScript;
00041 TString fCutScript;
00042 TString fPrefix;
00043 TString fHeaderFileName;
00044 TString fOptionStr;
00045 UInt_t fOptions;
00046 UInt_t fMaxUnrolling;
00047 TTree *fTree;
00048 TList fListOfHeaders;
00049 TList fListOfClasses;
00050 TList fListOfFriends;
00051 TList fListOfPragmas;
00052 TList fListOfTopProxies;
00053 TList *fCurrentListOfTopProxies;
00054 TList fListOfForwards;
00055 TTreeProxyGenerator(TTree* tree, const char *script, const char *fileprefix,
00056 const char *option, UInt_t maxUnrolling);
00057 TTreeProxyGenerator(TTree* tree, const char *script, const char *cutscript,
00058 const char *fileprefix, const char *option, UInt_t maxUnrolling);
00059
00060 TBranchProxyClassDescriptor* AddClass(TBranchProxyClassDescriptor *desc);
00061 void AddDescriptor(TBranchProxyDescriptor *desc);
00062 void AddForward(TClass *cl);
00063 void AddForward(const char *classname);
00064 void AddFriend(TFriendProxyDescriptor *desc);
00065 void AddHeader(TClass *cl);
00066 void AddHeader(const char *classname);
00067 void AddPragma(const char *pragma_text);
00068
00069 bool NeedToEmulate(TClass *cl, UInt_t level);
00070
00071 void ParseOptions();
00072
00073 UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TBranchElement *branch, TVirtualStreamerInfo *info = 0);
00074 UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TIter &branches, TVirtualStreamerInfo *info);
00075 UInt_t AnalyzeOldBranch(TBranch *branch, UInt_t level, TBranchProxyClassDescriptor *desc);
00076 UInt_t AnalyzeOldLeaf(TLeaf *leaf, UInt_t level, TBranchProxyClassDescriptor *topdesc);
00077 void AnalyzeElement(TBranch *branch, TStreamerElement *element, UInt_t level, TBranchProxyClassDescriptor *desc, const char* path);
00078 void AnalyzeTree(TTree *tree);
00079 void WriteProxy();
00080
00081 const char *GetFileName() { return fHeaderFileName; }
00082 };
00083
00084 }
00085
00086 using ROOT::TTreeProxyGenerator;
00087
00088 #endif