This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| root:troubleshooting [2010/11/09 16:02] – nchiap | root:troubleshooting [2013/06/14 12:14] (current) – nchiap | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== Root-files ====== |
| - | <code C> | + | |
| - | TFile* inputFile = TFile:: | + | Root-files can be the source of various problems. |
| - | TFile* outputFile = new TFile(" | + | Usually they are caused by hidden changes in the internal state of ROOT. |
| - | // your code | + | ROOT stores the active directory and uses this to create |
| - | outputFile-> | + | The active directory is changed when a new file is opened. |
| - | </ | + | This can lead to unexpected behaviours and hard to trace bugs. |
| ===== Empty Files ===== | ===== Empty Files ===== | ||
| Line 17: | Line 17: | ||
| outputFile-> | outputFile-> | ||
| </ | </ | ||
| + | |||
| + | but instead do: | ||
| + | <code C> | ||
| + | TFile* inputFile = TFile:: | ||
| + | TFile* outputFile = new TFile(" | ||
| + | // your code | ||
| + | outputFile-> | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||