How to save a projection in a root file in TBrowser

Dear all:

I used TBrowser to open one .root file and show the histograms.

I used the right-click on the plot to select “ProjectionX” and one new TH1D was created and shown in the list of current root file. Yes, this TH1D can be shown correctly.

But when I close the TBrowser and exit root terminal, and reopen this root file in TBrowser, and this projection TH1D was no longer there.

Who knows how to save the TH1D from projection in the .root file?

Thanks a lot.

Fada

Hi,

It is not possible to update a root file from the Browser. The TH1 created when calling ProjectionX is in memory only. To save it in a root file, you have to right-click on it, select “SaveAs” from the context menu, and give any file name (ending with .root)

Cheers, Bertrand.

Thanks very much.

Yes, it’s the only way I can do now in TBrowser.