User Tools

Site Tools


root:troubleshooting

This is an old revision of the document!


Troubleshooting in ROOT

Empty Files

When you write a ROOT-file in a method with:

file->Write()

and the file exists, but is empty, check the right order of the files: Do

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

but don't

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

as your file will be empty.

root/troubleshooting.1245837292.txt.gz · Last modified: 2009/06/24 11:54 by decianm