// Jerzy.Lukasik@ifj.edu.pl { const int NROW = 5; const int NCOL = 7; TCanvas *cf = 0; cf = new TCanvas("cf","FADC",0,0,1200,900); cf->Divide(NCOL,NROW,0.001,0.001,10); cf->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)", 0,0, "ProcEvent(Int_t,Int_t,Int_t,TObject*)"); cf->Draw(); for(int MOD=0;MOD<35;MOD++){ int irow = NROW-MOD/NCOL-1; int icol = MOD%NCOL; int ipad = NCOL*NROW-MOD; TFile *fcut = new TFile(Form("cal_cutgstar2_m%02d_0000-3000.root",MOD),"read"); TCanvas *tc = (TCanvas*)fcut->Get("c1")); TCutG *cutg1 = 0; //cutg1 = (TCutG*)tc->GetPrimitive(Form("CUTGSTAR2_M%02d",MOD));// seg val cutg1 = (TCutG*)tc->FindObject(Form("CUTGSTAR2_M%02d",MOD)); TCutG *tcg = 0; TCutG *cutgstar2[4]; for(int ipar=0;ipar<4;ipar++){ tcg = (TCutG*)tc1->FindObject(Form("CUTGSTAR2Z%d_M%02d",ipar+1,MOD)); cutgstar2[imod][ipar] = (TCutG*)tcg->Clone();//otherwise memory blowup } if(cutg1) printf("%2d %s\n",MOD,cutg1->GetName()); else printf("%2d NOCUT\n",MOD); if(cutg1){ //TH2F *hh = (TH2F*)tc->GetPrimitive(Form("mod%02d",MOD)); TH2F *hh = (TH2F*)tc->FindObject(Form("mod%02d",MOD)); //tc->GetListOfPrimitives()->Print(); cf->cd(ipad); gPad->SetLogz(1); hh->SetMinimum(1); hh->DrawCopy("col"); cutg1->Draw(); } fcut->Close(); } }