User Tools

Site Tools


root:pyroot_tfile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
root:pyroot_tfile [2017/07/11 11:28] โ€“ iwnroot:pyroot_tfile [2017/09/05 10:37] (current) โ€“ [Handling TFile files] iwn
Line 1: Line 1:
 +[[root:root|Getting started with ROOT]] -> [[root:pyroot|Useful pyROOT snippets]] โ†’ [[root:pyroot_tfile|Handling TFile files]]
 +
 ====== Handling TFile files ====== ====== Handling TFile files ======
  
 +Class references for:
 +  * ''[[https://root.cern.ch/doc/master/classTDirectory.html|TDirectory]]'',
 +  * ''[[https://root.cern.ch/doc/master/classTFile.html|TFile]]''.
 ===== Adding a directory to a TFile ===== ===== Adding a directory to a TFile =====
  
Line 28: Line 33:
 ===== gDirectory ===== ===== gDirectory =====
  
-Note that ''gDirectory'' is the current directory containing all newly created saved objects, or those saved to this directory. If you just opened a file, this will be your current directory until you close it or use ''cd()'' on some ''TDirectory'' or other ''TFile''. Test the behavior:+Note that ''gDirectory'' is the current directory containing all newly created saved objects, or those saved to this directory. If you just opened a file, this will be your current directory until you close it or use ''cd()'' on some ''TDirectory'' or other ''TFile''. Test the behavior with this macro:
  
 <file python gDirectory.py> <file python gDirectory.py>
Line 63: Line 68:
 printGDirectory() printGDirectory()
 </file> </file>
- 
  
root/pyroot_tfile.1499765335.txt.gz ยท Last modified: 2017/07/11 11:28 by iwn