testGraph.cxx File Reference

#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)


Function Documentation

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.

double fitFunc ( double x,
double p 
)

Definition at line 26 of file testGraph.cxx.

References A, B, C, and TMath::Sin().

int main ( int  argc,
char **  argv 
)

Definition at line 144 of file testGraph.cxx.

References TApplication::Run(), and testGraph().

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().


Generated on Tue Jul 5 16:07:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1