This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
root:troubleshooting [2010/11/06 15:08] – decianm | root:troubleshooting [2013/06/14 12:11] – nchiap | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | |||
+ | 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, | ||
===== Empty Files ===== | ===== Empty Files ===== | ||
- | When you write a ROOT-file | + | |
- | < | + | When you get an an empty ROOT-file, check the right order of the files. |
- | file-> | + | Don't do |
- | </ | + | < |
- | and the file exists, but is empty, check the right order of the files: Do | + | |
- | < | + | |
- | TFile* inputFile = TFile:: | + | |
TFile* outputFile = new TFile(" | TFile* outputFile = new TFile(" | ||
+ | TFile* inputFile = TFile:: | ||
// your code | // your code | ||
outputFile-> | outputFile-> | ||
</ | </ | ||
- | but don't | + | |
- | < | + | but instead do: |
- | TFile* outputFile = new TFile(" | + | < |
TFile* inputFile = TFile:: | TFile* inputFile = TFile:: | ||
+ | TFile* outputFile = new TFile(" | ||
// your code | // your code | ||
outputFile-> | outputFile-> | ||
</ | </ | ||
- | |||
- | ===== Change Marker Style ===== | ||
- | To change the marker style, you have to do: | ||
- | <code C++> | ||
- | TGraph* myGraph = TGraph(); | ||
- | ... | ||
- | myGraph-> | ||
- | myGraph-> | ||
- | </ | ||
- | but it will not work if the marker style is set before the graph is drawn. | ||
- | as your file will be empty. |