Problem in creating root file

I had been having problem in creating root file;
I have been using given code to create tree and root file,
current_ntuple.C (656 Bytes)

Thank You.

And what is the problem?

You macro is:

void current_ntuple()
   TFile *f = new TFile("filt.root","RECREATE"); // create the root file
   TTree *T = new TTree("curr","data from txt file"); //create the tree for current
   Long64_t nlines = T->ReadFile("JanToMar_11am.txt","Current");//read the file, creating names for the branches
   printf(" found %lld points\n", nlines);
   T -> Write(); //write data onto root file
   f -> Close();

To run it we are missing the file JanToMar_11am.txt .

BTW. Instead of “f->Close();”, use: delete f; // automatically deletes T, too