{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters(); //from .par
cal.CalculateCalibParameters("clb08_0001.root", "SQ22", 22, "AnalysisxTree", 100, 4095);
// CalculateCalibParameters(const char* inputfile, const char* block, const Int_t address, 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("SQ22[]E.root"); cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl; TList *histList = fr.GetListOfKeys(); TH1 *hWork = 0; for (Int_t i = 0; i < 32; i++) { fr.GetObject(histList->At(i)->GetName(), hWork); cal->PeaksFitting(hWork); }
}