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();

Change Marker Style

To change the marker style, you have to do:

TGraph* myGraph = TGraph();
...
myGraph->Draw();
myGraph->SetMarkerStyle(20);

but it will not work if the marker style is set before the graph is drawn. as your file will be empty.

root/troubleshooting.1289052489.txt.gz · Last modified: 2010/11/06 15:08 by decianm