#include "TApplication.h"#include "TGraphErrors.h"#include "TF1.h"#include "TRandom3.h"#include "TCanvas.h"#include "TLegend.h"#include "TPaveLabel.h"#include "TStopwatch.h"#include "TVirtualFitter.h"#include "TMath.h"#include "TStyle.h"#include <vector>#include <iterator>#include <cassert>Go to the source code of this file.
Functions | |
| double | fitFunc (double *x, double *p) |
| void | makePoints (Int_t n, std::vector< double > &x, std::vector< double > &y, std::vector< double > &e) |
| void | doFit (int n, const char *fitter) |
| void | testGraph (int n=500) |
| int | main (int argc, char **argv) |
| void doFit | ( | int | n, | |
| const char * | fitter | |||
| ) |
Definition at line 54 of file testGraph.cxx.
References TLegend::AddEntry(), TStopwatch::CpuTime(), TGraph::Draw(), TF1::Draw(), TPaveLabel::Draw(), TLegend::Draw(), TGraph::Fit(), fitFunc, Form(), TVirtualFitter::GetFitter(), TGraph::GetFunction(), i, j, kRed, makePoints(), npass, TStopwatch::RealTime(), TVirtualFitter::SetDefaultFitter(), TAttFill::SetFillColor(), TAttLine::SetLineColor(), TAttLine::SetLineWidth(), TAttMarker::SetMarkerSize(), TAttMarker::SetMarkerStyle(), TStopwatch::Start(), TStopwatch::Stop(), timer, x, and y.
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
| void makePoints | ( | Int_t | n, | |
| std::vector< double > & | x, | |||
| std::vector< double > & | y, | |||
| std::vector< double > & | e | |||
| ) |
Definition at line 36 of file testGraph.cxx.
References A, B, C, i, and TMath::Sin().
Referenced by doFit(), and fitLinear().
| void testGraph | ( | int | n = 500 |
) |
Definition at line 126 of file testGraph.cxx.
References TCanvas::cd(), TPad::Divide(), doFit(), gStyle, n, TAttFill::SetFillColor(), TPad::SetGrid(), TStyle::SetOptFit(), and TCanvas::Update().
Referenced by main().
1.5.1