Skip to content

Commit dfcb6f7

Browse files
authored
Fixed TFitResultPtr to match develop
Fixed
1 parent d277301 commit dfcb6f7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sbncode/BeamSpillInfoRetriever/getFOM.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,11 @@ namespace sbn {
208208
hProf->SetBinError(i+1,error);
209209
}
210210
if (hProf->GetSumOfWeights()>0) {
211-
TFitResultPtr fitPtr = hProf->Fit("gaus","QN","",-12+first_x*0.5,-12+last_x*0.5);
212-
TFitResult* fit = fitPtr.Get();
211+
TFitResultPtr const fit = hProf->Fit("gaus","QNS","",-12+first_x*0.5,-12+last_x*0.5);
213212
x = fit->Parameter(1);
214213
sx = fit->Parameter(2);
215214
chi2= fit->Chi2() / fit->Ndf();
216-
215+
delete hProf;
217216
} else {
218217
x=99999;
219218
sx=99999;

0 commit comments

Comments
 (0)