Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TTreeProxyGenerator.h
Go to the documentation of this file.
1 // @(#)root/treeplayer:$Id$
2 // Author: Philippe Canal 01/06/2004
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TTreeProxyGenerator
13 #define ROOT_TTreeProxyGenerator
14 
15 #include "TTreeGeneratorBase.h"
16 
17 class TBranch;
18 class TBranchElement;
19 class TLeaf;
20 class TStreamerElement;
21 
22 namespace ROOT {
23 namespace Internal {
24  class TFriendProxyDescriptor;
25  class TBranchProxyDescriptor;
26  class TBranchProxyClassDescriptor;
27 
28  class TTreeProxyGenerator : public TTreeGeneratorBase
29  {
30  public:
31  enum EContainer { kNone, kClones, kSTL };
32  enum EOption { kNoOption, kNoHist };
33  UInt_t fMaxDatamemberType;
34  TString fScript;
35  TString fCutScript;
36  TString fPrefix;
37  TString fHeaderFileName;
38  UInt_t fOptions;
39  UInt_t fMaxUnrolling;
40  TList fListOfClasses;
41  TList fListOfFriends;
42  TList fListOfPragmas;
43  TList fListOfTopProxies;
44  TList *fCurrentListOfTopProxies; //!
45  TList fListOfForwards;
46  TTreeProxyGenerator(TTree* tree, const char *script, const char *fileprefix,
47  const char *option, UInt_t maxUnrolling);
48  TTreeProxyGenerator(TTree* tree, const char *script, const char *cutscript,
49  const char *fileprefix, const char *option, UInt_t maxUnrolling);
50 
51  TBranchProxyClassDescriptor* AddClass(TBranchProxyClassDescriptor *desc);
52  void AddDescriptor(TBranchProxyDescriptor *desc);
53  void AddForward(TClass *cl);
54  void AddForward(const char *classname);
55  void AddFriend(TFriendProxyDescriptor *desc);
56  void AddMissingClassAsEnum(const char *clname, Bool_t isscope);
57  void AddPragma(const char *pragma_text);
58  void CheckForMissingClass(const char *clname);
59 
60  Bool_t NeedToEmulate(TClass *cl, UInt_t level);
61 
62  void ParseOptions();
63 
64  UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TBranchElement *branch, TVirtualStreamerInfo *info = 0);
65  UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TIter &branches, TVirtualStreamerInfo *info);
66  UInt_t AnalyzeOldBranch(TBranch *branch, UInt_t level, TBranchProxyClassDescriptor *desc);
67  UInt_t AnalyzeOldLeaf(TLeaf *leaf, UInt_t level, TBranchProxyClassDescriptor *topdesc);
68  void AnalyzeElement(TBranch *branch, TStreamerElement *element, UInt_t level, TBranchProxyClassDescriptor *desc, const char* path);
69  void AnalyzeTree(TTree *tree);
70  void WriteProxy();
71 
72  const char *GetFileName() { return fHeaderFileName; }
73  };
74 
75 }
76 }
77 
78 #endif