{ TFile f("working_dir_KpKm_invMass_mixedEvents_63GeV/mixedEvents.root"); f.ls(); TCanvas *c1 = new TCanvas("c1","c1",400,250,899,699); c1->Range(-12, -12, 12, 12); c1->SetBorderSize(2); c1->SetFrameFillColor(0); TTree* t = (TTree*) f.Get("invMass"); //t->StartViewer(); char str[200]; Int_t filterNumber; TNtuple* ntpl = new TNtuple(); t->SetBranchAddress("FilterNumberBranch", &filterNumber); t->SetBranchAddress("InvMassNTupleBranch", &ntpl); Int_t numberOfFilters = TMath::Nint(t->GetEntries()); cout<>htemp%i",fn), "", ""); TH1F* htemp = (TH1F*) gDirectory->Get(Form("htemp%i",fn)); cout<<"htemp = "<SetNameTitle(str, "K^{+}K^{-} invariant mass: Phobos PR04 (63 GeV mixed events)"); htemp->SetFillColor(5); // yellow c1->Update(); sprintf(str, "KpKmInvMass_mixedEvents_63GeV_filter%06i.gif", fn); c1->SaveAs(str); sprintf(str, "KpKmInvMass_mixedEvents_63GeV_filter%06i.root", fn); c1->SaveAs(str); }// end of for delete ntpl; }