Hi,
now I am trying to "printf" or "cout" the variable "timestamp" below
and I
am not getting the correct expected result, of course, always from a
root
script... Is it possible at all to do this?
Thank you and best regards
Livia Ferro
File to be read:
> 25 ext probe 1 21.93 1052989373314
> 26 ext probe 1 19.95 1052989373362
> 27 ext probe 1 20.25 1052989373418
> 28 ext probe 1 20.40 1052989373465
> 29 ext probe 1 20.36 1052989373517
> 30 ext probe 1 19.99 1052989373620
> 31 ext probe 1 21.17 1052989373683
>
{
gROOT->Reset();
int id;
char name1[10];
char name2[10];
int type;
float measure;
Long64_t timestamp;
int time,stamp;
char temp[200];
FILE *apre;
apre = fopen("extprobe.dat","r");
while(fgets(temp, sizeof(temp), apre) !=NULL) {
sscanf(temp, "%d %s %s %d %g %6d%7d",
&id, &name1,&name2, &type, &measure, &time,&stamp);
timestamp = time*100000000LL + stamp;
printf("%d %s %s %d %g %6d%7d\n",
id, name1,name2, type, measure, time,stamp);
}
fclose(apre);
}
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET