How to save histogram in filename.C

I’m beginner in ROOT. I want to save hisotogram information in a “filename.C” file by giving commands in macro. To draw canvas, last lines of my macro are,

TCanvas *canvas = new TCanvas(“Distributions”,“angular distn”, 900,500);
canvas → cd();
hist_Dphi → Draw();


Thank you for help. In this manual I found about .root output but not as I want.

May be;


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.