Skip to content
Snippets Groups Projects
Commit c63fee4e authored by Anne Meyer's avatar Anne Meyer
Browse files

+ In Fit method, ((TH1*)obj)->GetMaximumBin() returns

  an integer, so a pointer operation can't be applied
parent 122e9a04
No related branches found
No related tags found
No related merge requests found
...@@ -107,9 +107,11 @@ void NPL::OnlineGUI::Fit(){ ...@@ -107,9 +107,11 @@ void NPL::OnlineGUI::Fit(){
if(m_BackgroundFit->IsOn()){ if(m_BackgroundFit->IsOn()){
fit2->SetParameter(0,((TH1*)obj)->GetMaximum()); fit2->SetParameter(0,((TH1*)obj)->GetMaximum());
fit2->SetParameter(1,((TH1*)obj)->GetMaximumBin()->GetBinCenter()); //fit2->SetParameter(1,((TH1*)obj)->GetMaximumBin()->GetBinCenter());
fit2->SetParameter(1,((TH1*)obj)->GetMaximumBin());
fit2->SetParameter(2,5); fit2->SetParameter(2,5);
fit2->SetParameter(3,10);fit2->SetParameters(4,0); fit2->SetParameter(3,10);
fit2->SetParameters(4,0);
((TH1*) obj)->Fit(fit2,"Q"); ((TH1*) obj)->Fit(fit2,"Q");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment