User Tools

Site Tools


root:troubleshooting

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
Last revisionBoth sides next revision
root:troubleshooting [2009/06/24 11:54] decianmroot:troubleshooting [2013/06/14 12:11] nchiap
Line 1: Line 1:
-====== Troubleshooting in ROOT ======+====== Root-files ====== 
 + 
 +Root-files can be the source of various problems. 
 +Usually they are caused by hidden changes in the internal state of ROOT. 
 +ROOT stores the active directory. 
 +When a new histograms is created,  in the active directoy, existing histograms are looked for in 
 ===== Empty Files ===== ===== Empty Files =====
-When you write a ROOT-file in a method with: + 
-<code> +When you get an an empty ROOT-file, check the right order of the files
-file->Write() +Don't do  
-</code> +<code C> 
-and the file exists, but is empty, check the right order of the files: Do +TFile* outputFile = new TFile("myOutputFile.root", "RECREATE");
-<code>+
 TFile* inputFile = TFile::Open("myInputFile.root"); TFile* inputFile = TFile::Open("myInputFile.root");
-TFile* outputFile = new TFile("myOutputFile.root", "RECREATE"); 
 // your code // your code
 outputFile->Write(); outputFile->Write();
 </code> </code>
-but don't + 
-<code>+but instead do: 
 +<code C> 
 +TFile* inputFile = TFile::Open("myInputFile.root");
 TFile* outputFile = new TFile("myOutputFile.root", "RECREATE"); TFile* outputFile = new TFile("myOutputFile.root", "RECREATE");
-TFile* inputFile = TFile::Open("myInputFile.root"); 
 // your code // your code
 outputFile->Write(); outputFile->Write();
 </code> </code>
-as your file will be empty. 
root/troubleshooting.txt · Last modified: 2013/06/14 12:14 by nchiap