Saving multiple histograms as .gif from a TFile

hello…im new to the root board so i think this is where my question goes. i have an output TFile (*.root) with multiple histograms in it. i would like to read these from an other macro, and save them all in a common folder as .gif. does anyone know how to do this? if would also be interested in saving them directly from the macro that fills them if the above method is not possible. thanks.

scott field

Draw each histogram to a canvas and save the canvas as a gif file

TCanvas canvas;
//loop on all your histograms
TH1 *h = my histo
h->Draw();
canvas.Print(Form("%s.gif",h->GetName());

For each histogram, you will get a gif file being
histogram_name.gif

The lines above assume that you have a canvas on the screen.

Rene

There are several method to do this.
Please read:

root.bnl.gov/QtRoot/QtRoot.html#gifbatch