#include #include #include "TF1.h" #include "TH1.h" #include "TGraph.h" #include "TApplication.h" int main(int argc, char** argv) { std::string chanName = "test"; TApplication theApp("App", &argc, argv); //TGraph* aGraph = fun::namedGraph(chanName,11); TGraph* aGraph = new TGraph(11); //maxFinder* myMaxFinder = new maxFinder(4, 10., 10., 250., 320.); //float maxValue, maxT; double avg[11] = {9.474,7.404,7.99,10.698,9.978,8.93,10.924,10.014,5.118,7.92,7.582}; for(int i =0; i< 11;++i){ aGraph->SetPoint(i,285+i*2,avg[i]); } TF1* fi = new TF1("f1","pol2",290,310); aGraph->Fit(fi, "Q","",290, 310); //myMaxFinder->Eval(maxValue,maxT,aGraph); return 1; }