/* This is a simple program to convert normal .txt/dat file to a ROOT file. */ /* #include #include #include #include //ROOT Libraries #include #include #include //#include "TFile.h" */ 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(); }