Reading ascii file and making Graph by TTree

Dear, I want to draw few graphs (column 8 Vs column 9, column 11 Vs column 12, then 1D histogram of area (= 3.1416column 11 column 12) from an ascii file (attached below). I stuck in first stage, reading ascii file accurately by TTree and Ntuple. Here I attach the code. So the problems are how can I read all column accurately , then perform mathematical equation for area and then fill column for graph (TGraph or TH1D). I tried this code from User Guide and some examples.

gROOT->Reset(); struct staff_t { Double_t a; Double_t b; Double_t c; Double_t d; Double_t e; Double_t f; Double_t g; Double_t h; Double_t k; Double_t l; Double_t m; }; staff_t staff; FILE *fp = fopen("Image_146.pft","r"); char line[650]; TFile *i = new TFile("staff.root","RECREATE"); TTree *tree = new TTree("T","pit data from ascii file"); tree->Branch("staff",&staff.a,"a/D:b/D:c/D:d/D:e/D:f/D:g/D:h/D:k/D:l/D:m/D"); while (fgets(&line,650,fp)) { sscanf(&line[0],"%f%f%f%f",&staff.a,&staff.b,&staff.c,&staff.d,); sscanf(&line[13],"%f%f%f%f",&staff.e,&staff.f,&staff.g,&staff.h); sscanf(&line[24],"%f%f%f",&staff.k,&staff.l,&staff.m); tree->Fill(); } tree.Scan("a:b:c:d:e:f:g:h:k:l:m");

Your kind help will be appreciated. It can be mention that I am a new user of ROOT.
ascii file (Image_146.pft):

Looking into your data file I can see that you need to skip the first 19 lines then fill your tree with lines 20 to 611 and then again skip the remaining 5 lines.

You could also try to use xml classes built into ROOT: … Index.html

Thanks for your kind cooperation. I can solve the problem. The code is

[code]#include “Riostream.h”
#include “TString.h”
#include “TFile.h”
#include “TTree.h”
#include “TSystem.h”

TString dir = gSystem->UnixPathName(FILE);
Float_t c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13;
int i =0;
TFile f = new TFile(“USPopDens.root”,“RECREATE”);
TTree tree = new TTree(“ntuple”,“data from csv file”);