ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TAM/src/TAMTreeLoader.cxx
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

# Content
1 //
2 // $Id: TAMTreeLoader.cxx 5120 2008-05-07 18:17:33Z loizides $
3 //
4
5 #include "TAMTreeLoader.h"
6
7
8 #ifndef ROOT_TTree
9 #include "TTree.h"
10 #endif
11 #ifndef ROOT_TAMTreeBranchLoader
12 #include "TAMTreeBranchLoader.h"
13 #endif
14
15
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TAMTreeLoader //
19 // //
20 // This plugin loader loads the tree branch loader plugin into TAM. //
21 // //
22 // Author : Maarten Ballintijn 12/06/2005 //
23 // Constantin Loizides 12/06/2005 //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26
27 ClassImp(TAMTreeLoader)
28
29
30 //______________________________________________________________________________
31 TAMTreeLoader::TAMTreeLoader()
32 {
33 // Default constructor.
34 }
35
36
37 //______________________________________________________________________________
38 TAMVirtualBranchLoader *TAMTreeLoader::CreateBranchLoader(TTree *tree, TAMBranchInfo* brInfo)
39 {
40 // Create branch loader if the requested branch name is found in the tree.
41
42 TString brname(tree->GetAlias(brInfo->GetName()));
43 if(brname.IsNull()) {
44 brname=brInfo->GetName();
45 }
46
47 if(tree->GetBranch(brname.Data()) == 0) {
48 Warning("CreateBranchLoader","Could not find branch with name [%s] in tree [%s].",
49 (brInfo->GetName()!=0) ? (brInfo->GetName()) : "null", tree->GetName());
50
51 return 0;
52 }
53
54 return new TAMTreeBranchLoader(brInfo);
55 }