Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
fitpanel_playback.C File Reference

Detailed Description

This file will test all the transient frames (aka Dialog windows) displayed in the fitpanel, as the rest of the functionality is tried automatically with the UnitTest.C unit.

This implies trying the Set Parameters dialog and the Advanced one.

At every operation, a png file will be saved. These files will be later on compared with some references values, to have an estimation of the goodness of the test.

#include "TSystem.h"
#include "TSystemFile.h"
#include "TRecorder.h"
#include "Riostream.h"
int file_size(const char *filename)
{
return (int)fs.fSize;
}
void fitpanel_playback()
{
auto * r = new TRecorder();
r->Replay("http://root.cern/files/fitpanel_playback.root");
// wait for the recorder to finish the replay
while (r->GetState() == TRecorder::kReplaying) {
}
int Step_Err = 100;
int Step1_Ref = 15691;
int Step2_Ref = 15691;
int Step3_Ref = 17632;
int Step4_Ref = 12305;
int Step5_Ref = 11668;
int Step1_Size = file_size("Step1.png");
int Step2_Size = file_size("Step2.png");
int Step3_Size = file_size("Step3.png");
int Step4_Size = file_size("Step4.png");
int Step5_Size = file_size("Step5.png");
std::cout << "**********************************************************************" << std::endl;
std::cout << "* Report of fitpanel_playback.C *" << std::endl;
std::cout << "**********************************************************************" << std::endl;
if (TMath::Abs(Step1_Ref-Step1_Size) <= Step_Err) {
std::cout << "Step1: ............................................................ OK" << std::endl;
} else {
std::cout << "Step1: ........................................................ FAILED" << std::endl;
}
if (TMath::Abs(Step2_Ref-Step2_Size) <= Step_Err) {
std::cout << "Step2: ............................................................ OK" << std::endl;
} else {
std::cout << "Step2: ........................................................ FAILED" << std::endl;
}
if (TMath::Abs(Step3_Ref-Step3_Size) <= Step_Err) {
std::cout << "Step3: ............................................................ OK" << std::endl;
} else {
std::cout << "Step3: ........................................................ FAILED" << std::endl;
}
if (TMath::Abs(Step4_Ref-Step4_Size) <= Step_Err) {
std::cout << "Step4: ............................................................ OK" << std::endl;
} else {
std::cout << "Step4: ........................................................ FAILED" << std::endl;
}
if (TMath::Abs(Step5_Ref-Step5_Size) <= Step_Err) {
std::cout << "Step5: ............................................................ OK" << std::endl;
} else {
std::cout << "Step5: ........................................................ FAILED" << std::endl;
}
std::cout << "**********************************************************************" << std::endl;
}
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:561
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:1398
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition TSystem.cxx:437
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:416
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Definition TMathBase.h:123
Author
David Gonzalez Maline

Definition in file fitpanel_playback.C.