void calibration2() { gSystem->Load("/home/dariak/AculUtils/libAculData.so"); AculCalibration cal; cal.SetInputParameters("/home/dariak/AculUtils/parforcal.par"); //takes !only! a number of peaks from .par cal.SetCalibrationParameters("/home/dariak/AculUtils/SQ22[].cal"); //takes calibration parameters cal.PrintCalibrationParameters(); TCanvas *c2 = new TCanvas(); cal.CalibrateRawSpectra("/home/dariak/AculUtils/exp1016/clb_raw_files/sq22/clb09_0001.root", "SQ22", "AnalysisxTree", 100, 1500, 500); //takes data from raw file and calibrates it with obtained calibration parameters, void CalibrateRawSpectra(const char* inputfile, const char* block, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1); TFile fr("/home/dariak/AculUtils/SQ22[]E.root"); cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl; cal.FindEnergyPeaks(c2,"SQ22[]E.root","outputenergrun09.txt"); /* 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(); */ }