{ gSystem->Load("/home/dariak/AculUtils/libAculData.so"); AculCalibration cal; cal->SetInputParameters(); cal->SetCalibrationParameters("./run1/SQ22[].cal"); //takes calibration parameters cal->PrintCalibrationParameters(22, 22); TCanvas *c1 = new TCanvas(); cal->CalibrateRawSpectra("clb03_0001.root", "SQ22", 22, "AnalysisxTree", 100, 800, 500); //takes data from raw file and calibrates it with obtained calibration parameters TFile fr("SQ22[]E.root"); cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl; TList *histList = fr.GetListOfKeys(); TH1 *hWork = 0; c1->Clear(); c1->Divide(6, 6); for (Int_t i = 0; i < 32; i++) { fr.GetObject(histList->At(i)->GetName(), hWork); c1->cd(i+1); cal->PeaksFitting(hWork); hWork->Draw(); } /* c1->Divide(2, 2); c1->cd(1); fr.GetObject(histList->At(7)->GetName(), hWork); cal->PeaksFitting(hWork); hWork->Draw(); fr.GetObject(histList->At(8)->GetName(), hWork); c1->cd(2); cal->PeaksFitting(hWork); hWork->Draw(); fr.GetObject(histList->At(23)->GetName(), hWork); c1->cd(3); cal->PeaksFitting(hWork); hWork->Draw(); fr.GetObject(histList->At(24)->GetName(), hWork); c1->cd(4); cal->PeaksFitting(hWork); hWork->Draw(); */ }