This is an old revision of the document!
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
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();