int quit=0; void handler(int){quit=1;} void scan_offset(){ signal(SIGINT,handler); TCanvas c("c1","c1",0,0,1600,800); c.Divide(2,1); for(int i=0; i<=23; i++) { auto c1=c.cd(1); c1->SetGrid(1,1); TFile *f = new TFile(Form("results_run12_anodeoffset%d.root",i)); //TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int")); TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3z")); // TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2")); if(!h2) continue; h2->SetTitle(Form("case%d",i)); h2->Draw("colz"); c1->Modified(); c1->Update(); auto c2=c.cd(2); c2->SetGrid(1,1); TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1")); // TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2")); if(!h3) continue; h3->SetTitle(Form("case%d",i)); h3->Draw("colz"); c2->Modified(); c2->Update(); while(gPad->WaitPrimitive()); f->Close(); if(i==23) i=0; if(quit) break; } }