Main Page | Namespace List | Class List | Directories | File List | Class Members | File Members

readpdf.C

Go to the documentation of this file.
00001 #include <fstream>
00002 
00003 void readpdf(char * filename)
00004 {
00005   ifstream file(filename);
00006   
00007   double x,Q2,xF;
00008 
00009   TGraph * PDF = new TGraph;
00010   PDF->SetName("PDF");
00011   int i =0;
00012   while (!file.eof())
00013     {
00014       file >> x;
00015       file >> Q2;
00016       file >> xF;
00017       PDF->SetPoint(i++,x,xF);
00018     }
00019 
00020   TCanvas * c = new TCanvas("c","pdf dictribution of gluon",400,400);
00021 
00022   c->cd()->SetGrid();
00023   PDF->Draw("apl");
00024 
00025   TFile *f =TFile::Open("gluonpdf.root","recreate");
00026   f->cd();
00027   PDF->Write();
00028 
00029   f->Close();
00030 }

Generated on Thu Jul 12 14:04:54 2007 for RebassooAnalysis by  doxygen 1.3.9.1