00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 Int_t file_size(char *filename)
00088 {
00089 FileStat_t fs;
00090 gSystem->GetPathInfo(filename, fs);
00091 return (Int_t)fs.fSize;
00092 }
00093
00094 void graph_edit_playback()
00095 {
00096 r = new TRecorder();
00097 r->Replay("http://root.cern.ch/files/graphedit_playback.root");
00098
00099
00100 while (r->GetState() == TRecorder::kReplaying) {
00101 gSystem->ProcessEvents();
00102 gSystem->Sleep(1);
00103 }
00104
00105 Int_t c1_ps_Ref = 11592 , c1_ps_Err = 600;
00106 Int_t c1_C_Ref = 4729 , c1_C_Err = 200;
00107 Int_t c2_gif_Ref = 21184 , c2_gif_Err = 500;
00108 Int_t c2_C_Ref = 35471 , c2_C_Err = 1500;
00109
00110 Int_t c1_ps = file_size("c1.ps");
00111 Int_t c1_C = file_size("c1.C");
00112 Int_t c2_gif = file_size("c2.gif");
00113 Int_t c2_C = file_size("c2.C");
00114
00115 cout << "**********************************************************************" <<endl;
00116 cout << "* Report of graph_edit_playback.C *" <<endl;
00117 cout << "**********************************************************************" <<endl;
00118
00119 if (TMath::Abs(c1_ps_Ref-c1_ps) <= c1_ps_Err) {
00120 cout << "Canvas c1: PS output............................................... OK" <<endl;
00121 } else {
00122 cout << "Canvas c1: PS output........................................... FAILED" <<endl;
00123 }
00124 if (TMath::Abs(c1_C_Ref-c1_C) <= c1_C_Err) {
00125 cout << " C output................................................ OK" <<endl;
00126 } else {
00127 cout << " C output............................................ FAILED" <<endl;
00128 }
00129 if (TMath::Abs(c2_gif_Ref-c2_gif) <= c2_gif_Err) {
00130 cout << "Canvas c2: GIF output.............................................. OK" <<endl;
00131 } else {
00132 cout << "Canvas c2: GIF output.......................................... FAILED" <<endl;
00133 }
00134 if (TMath::Abs(c2_C_Ref-c2_C) <= c2_C_Err) {
00135 cout << " C output................................................ OK" <<endl;
00136 } else {
00137 cout << " C output............................................ FAILED" <<endl;
00138 }
00139 cout << "**********************************************************************" <<endl;
00140
00141 }