Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROOT Event Recording system

Similar presentations


Presentation on theme: "ROOT Event Recording system"— Presentation transcript:

1 ROOT Event Recording system
Katerina Opocenska, CERN PH-SFT Summer student 2008 [1/7/2008 – 12/9/2008] Supervisor: Bertrand Bellenot 26th August 2008

2 Project motivation & goals
To record and replay events in ROOT Commandline events Commands typed by user ("new TBrowser();") GUI events Window creation, resize, movement Mouse movement, (double)click, drag&drop Why? QA purposes (especially ROOT GUI) Presentations, tutorials To avoid performing the same operations manually again and again Create once and then just replay Like macros in Excel

3 How it works – overview Recorder implemented as standalone ROOT script
recorder.C Only few lines of code added to ROOT sources Interface for recorder: TRecorder.h Using of signal-slot communication mechanism Recorded events stored in TFile All events from 1 recording session stored in 1 TFile Stored in TTree data structure Recorder runs both on Linux and Windows Platform-specific solutions developed for replaying of windows moving

4 Recording Start ROOT Run recorder: .L recorder.C+
Prefarably with no windows Run recorder: .L recorder.C+ recorder(); Push ● button to start recording In "Save As" dialog enter name for log file Work with ROOT freely Issue commandline commands Work with GUI Press stop button on recorder to stop recording Interactive demo

5 Replaying Run recorder: .L recorder.C+ Push ► button to start
In "Open" dialog choose ROOT file with previously recorded events Watch the replaying Mouse cursor is used when replaying When replaying finishes, it is written to the console Interactive demo

6 Recording & replaying - notes
In fact: replaying = state recreation All the objects are created again Replaying events = executing them on real (recreated) objects Same setup needed for recording and replaying Just the execution of static code is recorded, not the code itself If you record command ".x path/script.C" and you want to replay it, this script must be present in the same place also in time of replaying State capturing is part of recording If you want to replay events for some window, creation of this window must be also recorded Create window Start recording Work with window Start recording Create window Work with window

7 C++ (non-GUI) interface for Recorder
class TEventRecorder : public TRecorder { public: // Recording void Start(const char * filename, Option_t * option="RECREATE"); void Stop(); // Replaying bool Replay(const char * filename); void Pause(); void Resume(); void ReplayStop(); // Listing void List(const char * filename); void ListGui(const char * filename); }

8 Conclusion Major part of project has been already done
My plan for the next 2,5 weeks: Implementing additional requests  Testing and fixing minor bugs Developing better GUI for recorder Improving current code smoother cursor and windows movement optimalization of performance Code comments User and programmer documentation


Download ppt "ROOT Event Recording system"

Similar presentations


Ads by Google