This macro plays a recorded ROOT session showing how to perform various interactive GUI operations with the guitest.C macro While replaying the session, several temporary macros (guitest0xx.C) macros will be saved.
These files will be later on compared with some reference values to verify the validity of different parts of the test.
Int_t file_size(
const char *filename)
{
FILE *lunin;
lunin = fopen(filename, "rb");
if (lunin == 0) return -1;
while (!feof(lunin)) {
c = fgetc(lunin);
if (c != 0x0d && c != 0x0a)
wc++;
}
fclose(lunin);
return wc;
}
void guitest_playback()
{
Int_t guitest_ref[11], guitest_err[11], guitest_size[11];
for (i=0;i<11;++i) {
}
TRecorder r(
"http://root.cern.ch/files/guitest_playback.root");
}
for (i=0;i<11;++i) {
guitest_ref[i] = 0;
guitest_err[i] = 100;
}
guitest_ref[0] = 23319;
guitest_ref[1] = 5633;
guitest_ref[2] = 14939;
guitest_ref[3] = 9459;
guitest_ref[4] = 5351;
guitest_ref[5] = 22982;
guitest_ref[6] = 23812;
guitest_ref[7] = 23869;
guitest_ref[8] = 23918;
guitest_ref[9] = 24067;
guitest_ref[10] = 65517;
printf("**********************************************************************\n");
printf("* Results of guitest_playback.C *\n");
printf("**********************************************************************\n");
for (i=0;i<11;++i) {
printf("guitest %02d: output............................................", i+1);
if (
TMath::Abs(guitest_ref[i] - guitest_size[i]) <= guitest_err[i]) {
printf("..... OK\n");
}
else {
printf(". FAILED\n");
}
}
printf("**********************************************************************\n");
}
- Author
- Bertrand Bellenot
Definition in file guitest_playback.C.