17 Int_t file_size(
const char *filename)
22 lunin = fopen(filename,
"rb");
23 if (lunin == 0)
return -1;
24 while (!feof(lunin)) {
26 if (c != 0x0d && c != 0x0a)
34 void guitest_playback()
37 Int_t guitest_ref[11], guitest_err[11], guitest_size[11];
39 gBenchmark->Start(
"guitest_playback");
43 gSystem->Unlink(TString::Format(
"guitest%03d.C", i+1));
46 TRecorder r(
"http://root.cern.ch/files/guitest_playback.root");
49 while (r.GetState() == TRecorder::kReplaying) {
50 gSystem->ProcessEvents();
57 guitest_size[i] = file_size(TString::Format(
"guitest%03d.C", i+1));
60 guitest_ref[0] = 23319;
61 guitest_ref[1] = 5633;
62 guitest_ref[2] = 14939;
63 guitest_ref[3] = 9459;
64 guitest_ref[4] = 5351;
65 guitest_ref[5] = 22982;
66 guitest_ref[6] = 23812;
67 guitest_ref[7] = 23869;
68 guitest_ref[8] = 23918;
69 guitest_ref[9] = 24067;
70 guitest_ref[10] = 65517;
72 printf(
"**********************************************************************\n");
73 printf(
"* Results of guitest_playback.C *\n");
74 printf(
"**********************************************************************\n");
77 printf(
"guitest %02d: output............................................", i+1);
78 if (TMath::Abs(guitest_ref[i] - guitest_size[i]) <= guitest_err[i]) {
81 gSystem->Unlink(TString::Format(
"guitest%03d.C", i+1));
87 printf(
"**********************************************************************\n");
88 gBenchmark->Show(
"guitest_playback");