This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
root:pyroot_tfile [2017/06/13 09:39] โ iwn | root:pyroot_tfile [2017/09/05 10:37] (current) โ [Handling TFile files] iwn | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Handling | + | [[root: |
- | ==== Adding a directory to a TFile ==== | + | ====== Handling TFile files ====== |
+ | |||
+ | Class references for: | ||
+ | * '' | ||
+ | * '' | ||
+ | ===== Adding a directory to a TFile ===== | ||
Here is a basic example creating a file with on directory. If you want to create and save an object in this directory, e.g. a tree or histogram, use '' | Here is a basic example creating a file with on directory. If you want to create and save an object in this directory, e.g. a tree or histogram, use '' | ||
Line 26: | Line 31: | ||
- | ==== gDirectory ==== | + | ===== gDirectory |
- | Note that '' | + | Note that '' |
<file python gDirectory.py> | <file python gDirectory.py> | ||
Line 44: | Line 49: | ||
printGDirectory() | printGDirectory() | ||
- | print ">>> | + | print ">>> |
file = TFile(" | file = TFile(" | ||
tree = TTree(" | tree = TTree(" | ||
Line 63: | Line 68: | ||
printGDirectory() | printGDirectory() | ||
</ | </ | ||
- | |||