This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
root:loadtext [2010/11/10 12:17] – nchiap | root:loadtext [2010/11/12 15:09] – nchiap | ||
---|---|---|---|
Line 6: | Line 6: | ||
</ | </ | ||
+ | |||
+ | === Dynamic Branche Names === | ||
If you do not give the structure, the first line of your file must contain the tree definition | If you do not give the structure, the first line of your file must contain the tree definition | ||
Line 15: | Line 17: | ||
To use this tree you then need to get the branch names | To use this tree you then need to get the branch names | ||
- | < | + | < |
TTree *myTree = new TTree(" | TTree *myTree = new TTree(" | ||
Long64_t nlines = myTree-> | Long64_t nlines = myTree-> | ||
Line 27: | Line 29: | ||
T-> | T-> | ||
T-> | T-> | ||
+ | </ | ||
+ | |||
+ | === Dynamic Tree Structure === | ||
+ | You can extend this idea to plot all histograms in an unknown tree. | ||
+ | The following code reads a tree form a datafile with a arbitrary number of columns | ||
+ | and creats a histogram for each of them. | ||
+ | |||
+ | <code C++> | ||
</ | </ |