Line | |
---|
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 |
|
---|
10 | class TFile;
|
---|
11 | class TTree;
|
---|
12 |
|
---|
13 | class TBaseTree
|
---|
14 | {
|
---|
15 | private:
|
---|
16 |
|
---|
17 | static const Int_t maxElecEntries = 30;
|
---|
18 | static const Int_t maxGenEntries = 30;
|
---|
19 | static const Int_t maxJetEntries = 30;
|
---|
20 |
|
---|
21 | public:
|
---|
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 |
|
---|
38 | private:
|
---|
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.