ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TAM/interface/TAMTreeBranchLoader.h
Revision: 1.1
Committed: Tue May 27 19:13:21 2008 UTC (16 years, 11 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008, Mit_008pre2, Mit_008pre1, Mit_006b, Mit_006a, Mit_006, Mit_005, Mit_004, MITHEP_2_0_x
Log Message:
TAM trunk 5120

File Contents

# User Rev Content
1 loizides 1.1 //
2     // $Id: TAMTreeBranchLoader.h 5120 2008-05-07 18:17:33Z loizides $
3     //
4    
5     #ifndef ROOT_TAMTreeBranchLoader
6     #define ROOT_TAMTreeBranchLoader
7    
8    
9     #include <typeinfo>
10    
11    
12     #ifndef ROOT_TAMVirtualBranchLoader
13     #include "TAMVirtualBranchLoader.h"
14     #endif
15    
16    
17     class TClass;
18     class TBranch;
19     class TTree;
20    
21    
22     class TAMTreeBranchLoader : public TAMVirtualBranchLoader {
23     protected:
24     BranchAddr_t fBAddr; //branch address for the data
25     Bool_t fIsClass; //if the branch stores a class (as opposed to a struct)
26     Bool_t fLeafSizeConst; //if the size of leaves in this branch is constant
27     TBranch *fBranch; //the branch itself (not owned)
28     TClass *fClass; //class information from dictionary (not owned)
29    
30     void AllocateMemory();
31     Bool_t CheckBrClass(const type_info& ptrtype, const TClass& cls);
32     Bool_t CheckBrStruct(TClass& cls);
33     Bool_t CheckBrType(const type_info& ptrtype);
34     Bool_t CheckBrTypeAllModules();
35     void DeleteMemory();
36     void SetBranchAddress();
37     void SetLeafAddresses();
38    
39     public:
40     TAMTreeBranchLoader(TAMBranchInfo *binfo);
41     virtual ~TAMTreeBranchLoader();
42    
43     void Clear(Option_t *option="");
44     void* GetAddress() const;
45     Int_t GetEntry(Long64_t entry);
46     using TObject::Notify;
47     Bool_t Notify(TTree *tree);
48    
49     ClassDef(TAMTreeBranchLoader,0) // TAM plugin to load data from a single branch
50     };
51    
52    
53     #endif //ROOT_TAMTreeBranchLoader