too much colum how to fill tree
i have data that is made of 131 column, the first column is time,the other is data.So i want to draw each of the data vs time. I want to use tree.
while(!feof(fp))
{
fscanf(fp,"%f %f %f……“,&column[0],&column[1],……,&column[130]);
tree->Fill();
}
it is so diffcult to write 130 branch and fscanf(fp,"%f %f %f……“,&column[0],&column[1],……,&column[130]);
please tell me if there is a easy way ?
for example loop?
What is the problem? What are the error messages? Which version of ROOT are you using? Did you try compiling your code (with ACLiC for example)?
Did you try TTree::ReadFile?
[quote=“pcanal”]What is the problem? What are the error messages? Which version of ROOT are you using? Did you try compiling your code (with ACLiC for example)?
Did you try TTree::ReadFile?
Cheers,
Philippe[/quote]
130 Column,I must write 130 branches,it is so diffcult.
LOOP ?
for(i=0;i<130>Branch(“column[i]”,&column[i],“column[i]/F”);
ok?
Thanks!
TTree::ReadFile?
It must write 130 variables .I can’t bear.
Loop can do it?