char rootfile[32]; int eta[56] = {-30,-30,-30,-30,-32,-32,-32,-32,-34,-34,-34,-34,-36,-36,-36,-36,-38,-38,-38,-38,-40,-40,-40,-40,-41,-41,-41,-41, 30, 30, 30, 30, 32, 32, 32, 32, 34, 34, 34, 34,36, 36, 36, 36, 38, 38, 38, 38, 40, 40, 40, 40, 41, 41, 41, 41}; int phi[56] = {15,35,51,71,15,35,51,71,15,35,51,71,15,35,51,71,15,35,51,71,15,35,51,71,15,35,51,71, 1,21,37,57, 1,21,37,57, 1,21,37,57, 1,21,37,57,1,21,37,57,19,35,55,71,19,35,55,71}; int depth[56] = {2,1,2,1,1,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,2,1,2,1,1,2,1,2,2,1,2,1,1,2,1,2,2,1,2,1,2,1,2,1,1,2,1,2}; void test2(int runNo){ sprintf(rootfile,"calibPulseShapes_%d.root",runNo); TFile *f = new TFile(rootfile); TString name = "Run-"; name+=runNo; name+=".root"; TFile *h = new TFile(name,"RECREATE"); for(int i=0;i==55;i++){ TH1F *hHFR = (TH1F*)f->Get("calibPulseShapes/HF_eta%d_phi%d_depth%d_chanNo=32767",eta[i],phi[i],depth[i]); hHFR->Write("Chan_%d",i); }