89 Int_t file_size(
const char *filename)
92 gSystem->GetPathInfo(filename, fs);
93 return (Int_t)fs.fSize;
96 void graph_edit_playback()
98 TRecorder *r =
new TRecorder();
99 r->Replay(
"http://root.cern.ch/files/graphedit_playback.root");
102 while (r->GetState() == TRecorder::kReplaying) {
103 gSystem->ProcessEvents();
107 Int_t c1_ps_Ref = 11592 , c1_ps_Err = 600;
108 Int_t c1_C_Ref = 4729 , c1_C_Err = 200;
109 Int_t c2_gif_Ref = 21184 , c2_gif_Err = 500;
110 Int_t c2_C_Ref = 35471 , c2_C_Err = 1500;
112 Int_t c1_ps = file_size(
"c1.ps");
113 Int_t c1_C = file_size(
"c1.C");
114 Int_t c2_gif = file_size(
"c2.gif");
115 Int_t c2_C = file_size(
"c2.C");
117 cout <<
"**********************************************************************" <<endl;
118 cout <<
"* Report of graph_edit_playback.C *" <<endl;
119 cout <<
"**********************************************************************" <<endl;
121 if (TMath::Abs(c1_ps_Ref-c1_ps) <= c1_ps_Err) {
122 cout <<
"Canvas c1: PS output............................................... OK" <<endl;
124 cout <<
"Canvas c1: PS output........................................... FAILED" <<endl;
126 if (TMath::Abs(c1_C_Ref-c1_C) <= c1_C_Err) {
127 cout <<
" C output................................................ OK" <<endl;
129 cout <<
" C output............................................ FAILED" <<endl;
131 if (TMath::Abs(c2_gif_Ref-c2_gif) <= c2_gif_Err) {
132 cout <<
"Canvas c2: GIF output.............................................. OK" <<endl;
134 cout <<
"Canvas c2: GIF output.......................................... FAILED" <<endl;
136 if (TMath::Abs(c2_C_Ref-c2_C) <= c2_C_Err) {
137 cout <<
" C output................................................ OK" <<endl;
139 cout <<
" C output............................................ FAILED" <<endl;
141 cout <<
"**********************************************************************" <<endl;