void write_to_file ( ) { // I s t a n c e o f our hi s togram TH1F h("my_histogram","My Title;X;# of entries",100,-5,5); // Let's fill it randomly h.FillRandom( "gaus" ); // Let's open a TFile TFile out_file("my_rootfile.root","RECREATE"); // Write the hi s togram in the f i l e h.Write(); // Close the file out_file.Close(); }