This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
root:ttreedraw [2012/07/13 11:09] – bursche | root:ttreedraw [2013/06/14 11:10] – [Basic Usage] nchiap | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | To apply a function in TTree::Draw it must be known to CINT. | + | ====== TTree:: |
+ | |||
+ | ===== Basic Usage ===== | ||
+ | |||
+ | The '' | ||
+ | The following code creates a histogram with the default settings. | ||
+ | <code c++> | ||
+ | TFile file(" | ||
+ | TTree *tree = file.Get(" | ||
+ | tree-> | ||
+ | </ | ||
+ | |||
+ | Alternatively the name of the histogram to be created can be given or the data can be added to an existing histogram. | ||
+ | <code c++> | ||
+ | tree-> | ||
+ | TH1F *hist = gPad-> | ||
+ | tree-> | ||
+ | </ | ||
+ | |||
+ | For more information have a look at [[http:// | ||
+ | |||
+ | ===== Useful Tricks ===== | ||
+ | |||
+ | ==== Using a Custom Function in TTree::Draw ==== | ||
+ | You can define a custom | ||
+ | |||
+ | To apply such a function | ||
This can be done with ProcessLineSync | This can be done with ProcessLineSync | ||