Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
fitpanel_playback.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_fit
3/// This file will test all the transient frames (aka Dialog windows)
4/// displayed in the fitpanel, as the rest of the functionality is
5/// tried automatically with the UnitTest.C unit.
6///
7/// This implies trying the Set Parameters dialog and the Advanced one.
8///
9/// At every operation, a png file will be saved. These files will be
10/// later on compared with some references values, to have an estimation
11/// of the goodness of the test.
12///
13/// \macro_code
14///
15/// \author David Gonzalez Maline
16
17#include "TSystem.h"
18#include "TSystemFile.h"
19#include "TRecorder.h"
20
21#include <iostream>
22
23int file_size(const char *filename)
24{
27 return (int)fs.fSize;
28}
29
31{
32 auto * r = new TRecorder();
33 r->Replay("http://root.cern/files/fitpanel_playback.root");
34
35 // wait for the recorder to finish the replay
36 while (r->GetState() == TRecorder::kReplaying) {
38 gSystem->Sleep(1);
39 }
40
41 int Step_Err = 100;
42 int Step1_Ref = 15691;
43 int Step2_Ref = 15691;
44 int Step3_Ref = 17632;
45 int Step4_Ref = 12305;
46 int Step5_Ref = 11668;
47
48 int Step1_Size = file_size("Step1.png");
49 int Step2_Size = file_size("Step2.png");
50 int Step3_Size = file_size("Step3.png");
51 int Step4_Size = file_size("Step4.png");
52 int Step5_Size = file_size("Step5.png");
53
54
55 std::cout << "**********************************************************************" << std::endl;
56 std::cout << "* Report of fitpanel_playback.C *" << std::endl;
57 std::cout << "**********************************************************************" << std::endl;
58
60 std::cout << "Step1: ............................................................ OK" << std::endl;
61 } else {
62 std::cout << "Step1: ........................................................ FAILED" << std::endl;
63 }
64
66 std::cout << "Step2: ............................................................ OK" << std::endl;
67 } else {
68 std::cout << "Step2: ........................................................ FAILED" << std::endl;
69 }
70
72 std::cout << "Step3: ............................................................ OK" << std::endl;
73 } else {
74 std::cout << "Step3: ........................................................ FAILED" << std::endl;
75 }
76
78 std::cout << "Step4: ............................................................ OK" << std::endl;
79 } else {
80 std::cout << "Step4: ........................................................ FAILED" << std::endl;
81 }
82
84 std::cout << "Step5: ............................................................ OK" << std::endl;
85 } else {
86 std::cout << "Step5: ........................................................ FAILED" << std::endl;
87 }
88 std::cout << "**********************************************************************" << std::endl;
89
90}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
Class provides direct recorder/replayer interface for a user.
Definition TRecorder.h:266
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Definition TSystem.cxx:1413
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition TSystem.cxx:439
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:418
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:122