User Tools

Site Tools


root:troubleshooting

This is an old revision of the document!


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

When you get an an empty ROOT-file, check the right order of the files. Don't do

TFile* outputFile = new TFile("myOutputFile.root", "RECREATE");
TFile* inputFile = TFile::Open("myInputFile.root");
// your code
outputFile->Write();

but instead do:

TFile* inputFile = TFile::Open("myInputFile.root");
TFile* outputFile = new TFile("myOutputFile.root", "RECREATE");
// your code
outputFile->Write();
root/troubleshooting.1371204675.txt.gz · Last modified: 2013/06/14 12:11 by nchiap