00001 {
00002 TCanvas *c1 = new TCanvas("c1", "c1");
00003 gStyle->SetOptTitle(false);
00004 TFile *inFile = TFile::Open("ECM.root");
00005 TIter iter(inFile->GetListOfKeys());
00006 TKey *key;
00007 while(key = (TKey*)iter.Next()) {
00008 TObject *obj = key->ReadObj();
00009 if(obj->InheritsFrom(TH1::Class())) {
00010 TString outFile = obj->GetName();
00011 outFile += ".gif";
00012
00013 obj->Draw();
00014 c1->Print(outFile);
00015 }//if
00016 }//while
00017 }
1.3.9.1