Fork me on GitHub

source: svn/trunk/Utilities/ExRootAnalysis/interface/TBaseTree.h@ 856

Last change on this file since 856 was 3, checked in by Xavier Rouby, 16 years ago

first commit

File size: 770 bytes
RevLine 
[3]1#ifndef TBaseTree_h
2#define TBaseTree_h
3
4#include "Utilities/ExRootAnalysis/interface/TSimpleBranch.h"
5
6#include "TROOT.h"
7
8#include <set>
9
10class TFile;
11class TTree;
12
13class TBaseTree
14{
15private:
16
17 static const Int_t maxElecEntries = 30;
18 static const Int_t maxGenEntries = 30;
19 static const Int_t maxJetEntries = 30;
20
21public:
22
23 TBaseTree(const TString &name);
24 ~TBaseTree();
25
26 template<typename T>
27 TSimpleBranch<T> *NewBranch(const TString &name, Int_t maxsize)
28 {
29 TSimpleBranch<T> *branch = new TSimpleBranch<T>(name, maxsize, fNewTree);
30 fBranches.insert(branch);
31 return branch;
32 }
33
34 void Clear();
35 void Fill();
36 void Write();
37
38private:
39
40 TFile *fNewFile;
41 TTree *fNewTree;
42
43 std::set<TBaseBranch*> fBranches;
44};
45
46#endif /* TBaseTree */
47
Note: See TracBrowser for help on using the repository browser.