Hello,
when I want to plot quickly an ascii file I am currently using TNtuple.
For example if I have a toto.dat file with 3 columns I am doing :
TNtuple *nt = new TNtuple(“nt”,“nt”,“x1:x2:x3”)
nt->ReadFile(“toto.dat”)
But If I have more columns this could be a little bit boring.
So I decided to make a small program to avoid to type the variables in my TNtuple;
Let say toto.dat has 7 columns.
{
int col=7:
char var[256];
for(int i=0;i<col;i++){
if(i==0) sprintf(var,“var%d”,i);
else sprintf(var,"%s:var%d",var,i);
}
cout << var << endl;
TNtuple *nt = new TNtuple(“nt”,“nt”,var);
int n = nt->ReadFile(“toto.dat”);
}
and I can access to var0 up to var7. The problem is that when my file is to huge var0…var7 seems to be limited.
My question is then what is the type of var0…var7 ? can I modify the type and the size of var ? or it’s a waste of effort
and I need to do by another way ?
by advance thank you
cheers
Olivier