Hi, Rooter,
I’m using a tree to do a cut then save the histogram in jpeg and eps formats.
Here is my script[1].
It works well however, this script has to open a canvas and display it on a screen.
From ROOT manual, I know one can use the class of project of a Tree without displaying.
Like, hitSumm->project(“E1”, “E1 cut condition”);
But, I’d like to save this histogram into jpeg and eps files.
I tried this [2] but failed.
Could you please tell me how to do it?
Thanks a lot in advance !
Best regards,
Junhui
[1]
hitSumm->Draw(“E1”, " E1 cut condition");
c1->Print(“E1-smallhits.jpeg”);
c1->Print(“E1-smallhits.eps”);//Print() works either
[2]
hitSumm->Project(“E1”, “E1 cut condition”);
hname->Print(“E1-smallhits.jpeg”);
hname->Print(“E1-smallhits.eps”);