Logo ROOT  
Reference Guide
TRecorder.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Katerina Opocenska 11/09/2008
3 
4 /*************************************************************************
5 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11 
12 #ifndef ROOT_TRecorder
13 #define ROOT_TRecorder
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // ROOT EVENT RECORDING SYSTEM //
18 // ================================================================== //
19 // //
20 // TRecorder class provides interface for recording and replaying //
21 // events in ROOT. //
22 // Recorded events are: //
23 // - Commands typed by user in commandline ('new TCanvas') //
24 // - GUI events (mouse movement, button clicks, ...) //
25 // //
26 // All the recorded events from one session are stored in one TFile //
27 // and can be replayed again anytime. //
28 // //
29 // Recording //
30 // ================================================================== //
31 // //
32 // 1] To start recording //
33 // //
34 // TRecorder r(const char *filename, "NEW") //
35 // TRecorder r(const char *filename, "RECREATE") //
36 // //
37 // or: //
38 // //
39 // TRecorder *recorder = new TRecorder; //
40 // recorder->Start(const char *filename, ...) //
41 // //
42 // -filename Name of ROOT file in which to save //
43 // recorded events. //
44 // //
45 // 2] To stop recording //
46 // //
47 // recorder->Stop() //
48 // //
49 // //
50 // IMPORTANT: //
51 // State capturing is part of recording. It means that if you want to //
52 // record events for some object (window), creation of this object //
53 // must be also recorded. //
54 // //
55 // Example: //
56 // -------- //
57 // t = new TRecorder(); // Create a new recorder //
58 // t->Start("logfile.root"); // ! Start recording first //
59 // //
60 // c = new TCanvas(); // ! Then, create an object //
61 // c->Dump(); // Work with that object //
62 // //
63 // t->Stop(); // Stop recording //
64 // //
65 // It is strongly recommended to start recording with empty ROOT //
66 // environment, at least with no previously created ROOT GUI. //
67 // This ensures that only events for well known windows are stored. //
68 // Events for windows, which were not created during recording, //
69 // cannot be replayed. //
70 // //
71 // Replaying //
72 // =================================================================== //
73 // //
74 // 1] To start replaying //
75 // //
76 // TRecorder r(const char *filename) //
77 // TRecorder r(const char *filename, "READ") //
78 // //
79 // or: //
80 // //
81 // TRecorder *recorder = new TRecorder; //
82 // recorder->Replay(const char *filename, //
83 // Bool_t showMouseCursor = kTRUE); //
84 // //
85 // -filename A name of file with recorded events //
86 // previously created with TRecorder::Start //
87 // //
88 // -showMouseCursor If kTRUE, mouse cursor is replayed as well. //
89 // In that case it is not recommended to use mouse //
90 // during replaying. //
91 // //
92 // In general, it is not recommended to use mouse to change positions //
93 // and states of ROOT windows during replaying. //
94 // //
95 // IMPORTANT: //
96 // The state of ROOT environment before replaying of some events //
97 // must be exactly the same as before recording them. //
98 // Therefore it is strongly recommended to start both recording //
99 // and replaying with empty ROOT environment. //
100 // //
101 // 2] To pause replaying //
102 // //
103 // recorder->Pause() //
104 // //
105 // Replaying is stopped until recorder->Resume() is called. //
106 // //
107 // //
108 // 3] To resume paused replaying //
109 // //
110 // recorder->Resume() //
111 // //
112 // Resumes previously stopped replaying. //
113 // //
114 // //
115 // 4] To stop replaying before its end //
116 // //
117 // recorder->Stop() //
118 // //
119 //////////////////////////////////////////////////////////////////////////
120 
121 #include "TApplication.h"
122 #include "TError.h"
123 #include "TTimer.h"
124 #include "TGClient.h"
125 #include "TGFrame.h"
126 #include "TCanvas.h"
127 #include "THashList.h"
128 
129 #include <ctime>
130 #include <iostream>
131 
132 class TMutex;
133 class TTree;
134 class TFile;
135 class TGPictureButton;
136 class TGCheckButton;
137 class TGLabel;
138 class TRecorderState;
139 
140 //////////////////////////////////////////////////////////////////////////
141 // //
142 // TRecEvent //
143 // //
144 // Abstract class that defines interface for a class storing //
145 // information about 1 ROOT event. //
146 // Time of event is stored and this event can be replayed. //
147 // Classes TRecCmdEvent and TRecGuiEvent implements this interface //
148 // for command line and GUI events respectively. //
149 // //
150 //////////////////////////////////////////////////////////////////////////
151 
152 class TRecEvent : public TObject
153 {
154 private:
155  TTime fEventTime; // Time of original event execution
156 
157 public:
158  //---- Types of events recorded in ROOT.
160  kCmdEvent, // Commandline event
161  kGuiEvent, // GUI event
163  };
164 
165  // Replays (executes) the stored event again
166  virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE) = 0;
167 
168  // Returns what kind of event it stores
169  virtual ERecEventType GetType() const = 0;
170 
171  virtual TTime GetTime() const {
172  // Returns time of original execution of stored event
173  return fEventTime;
174  }
175 
176  virtual void SetTime(TTime t) {
177  // Sets time of event execution
178  fEventTime = t;
179  }
180 
181  ClassDef(TRecEvent,1) // Abstract class. Defines basic interface for storing information about ROOT events
182 };
183 
184 //////////////////////////////////////////////////////////////////////////
185 // //
186 // TRecCmdEvent //
187 // //
188 // Class used for storing information about 1 commandline event. //
189 // It means 1 command typed in by user in the commandline, //
190 // e.g 'new TCanvas'. //
191 // //
192 //////////////////////////////////////////////////////////////////////////
193 
194 class TRecCmdEvent : public TRecEvent
195 {
196 private:
197  TString fText; // Text of stored command
198 
199 public:
201  // Creates new empty TRecCmdEvent
202  }
203 
204  void SetText(const char *text) {
205  // Saves text of a command
206  fText = text;
207  }
208 
209  const char *GetText() const {
210  // Returns stored text of the command
211  return fText.Data();
212  }
213 
214  virtual ERecEventType GetType() const {
215  // Returns what kind of event it stores (commandline event)
216  return TRecEvent::kCmdEvent;
217  }
218 
219  virtual void ReplayEvent(Bool_t) {
220  // Stored command is executed again
221  std::cout << GetText() << std::endl;
223  }
224 
225  ClassDef(TRecCmdEvent,1) // Class stores information about 1 commandline event (= 1 command typed by user in commandline)
226 };
227 
228 //////////////////////////////////////////////////////////////////////////
229 // //
230 // TRecExtraEvent //
231 // //
232 // Class used for storing information about 1 extra event. //
233 // It means 1 TPaveLabel or 1 TLatex event produced in the Canvas //
234 // //
235 //////////////////////////////////////////////////////////////////////////
236 class TRecExtraEvent : public TRecEvent
237 {
238 private:
239  TString fText; // Text of stored command
240 
241 public:
243  // Creates new empty TRecExtraEvent
244  }
245 
247  // Saves text of a command (PaveLabel or Text)
248  fText = text;
249  }
250 
251  TString GetText() const {
252  // Returns stored text of the command
253  return fText;
254  }
255 
256  virtual ERecEventType GetType() const {
257  // Returns what kind of event it stores (Especial event)
258  return TRecEvent::kExtraEvent;
259  }
260 
261  virtual void ReplayEvent(Bool_t) {
262  // Stored event is executed again
263 
265  }
266 
267  ClassDef(TRecExtraEvent,1) // Class stores information about extra events
268 };
269 
270 //////////////////////////////////////////////////////////////////////////
271 // //
272 // TRecGuiEvent //
273 // //
274 // Class used for storing information about 1 GUI event in ROOT. //
275 // For list of possible GUI events see EGEventType. //
276 // //
277 //////////////////////////////////////////////////////////////////////////
278 
279 class TRecGuiEvent : public TRecEvent
280 {
281 protected:
282  friend class TRecorderInactive;
283  friend class TRecorderPaused;
284  friend class TRecorderRecording;
285  friend class TRecorderReplaying;
286 
287  EGEventType fType; // Type of event (see EGEventType)
288  Window_t fWindow; // Window ID which reported event is relative to
289  Time_t fTime; // Time event occured in ms
290  Int_t fX; // Pointer x coordinate in event window
291  Int_t fY; // Pointer y coordinate in event window
292  Int_t fXRoot; // x coordinate relative to root
293  Int_t fYRoot; // y coordinate relative to root
294  UInt_t fCode; // Key or button code
295  UInt_t fState; // Key or button mask
296  UInt_t fWidth; // Width of exposed area
297  UInt_t fHeight; // Height of exposed area
298  Int_t fCount; // If non-zero, at least this many more exposes
299  Bool_t fSendEvent; // True if event came from SendEvent
300  Handle_t fHandle; // General resource handle (used for atoms or windows)
301  Int_t fFormat; // Next fields only used by kClientMessageEvent
302  Long_t fUser[5]; // 5 longs can be used by client message events
303  // NOTE: only [0], [1] and [2] may be used.
304  // [1] and [2] may contain > 32 bit quantities
305  // (i.e. pointers on 64 bit machines)
306  Window_t fMasked; // If non-zero, event recorded in HandleMaskEvent()
307 
308 public:
309  //---- Types of kConfigureNotify GUI event
311  kCNMove = 0, // Movement of a window (Linux)
312  kCNResize = 1, // Resize of a window (Linux)
313  kCNMoveResize = 2, // Movement, resize or both (Windows)
314  kCNFilter = 3 // Not replaybale (filtered event).
315  };
316  //---- Aliases for non cross-platform atoms.
317  enum ERootAtoms {
320  };
321 
322  virtual ERecEventType GetType() const {
323  // Returns what kind of event it stores (GUI event)
324  return TRecEvent::kGuiEvent;
325  }
326 
327  virtual void ReplayEvent(Bool_t showMouseCursor = kTRUE);
328  static Event_t *CreateEvent(TRecGuiEvent *ge);
329 
330  ClassDef(TRecGuiEvent,1) // Class stores information about 1 GUI event in ROOT
331 };
332 
333 //////////////////////////////////////////////////////////////////////////
334 // //
335 // TRecWinPair //
336 // //
337 // Class used for storing of window IDs mapping. //
338 // Remapping of window IDs is needed for replaying events. //
339 // - ID of original window is stored in fKey. //
340 // - ID of a new window is stored in fValue. //
341 // //
342 // Whenever an event is replayed, its referenced window ID is changed //
343 // from original to a new one according to the appropriate mapping. //
344 // //
345 //////////////////////////////////////////////////////////////////////////
346 
347 class TRecWinPair : public TObject
348 {
349 protected:
350  friend class TRecorderReplaying;
351 
352  Window_t fKey; // ID of original window (for which an event was originally recorded)
353  Window_t fValue; // ID of a new window (for which an event is being replayed)
354 
355 public:
356  // Creates a new key-value mapping of window IDs
357  TRecWinPair(Window_t key, Window_t value): fKey(key), fValue(value) {}
358 
359  ClassDef(TRecWinPair,1) // Class used for storing of window IDs mapping. Needed for replaying events.
360 };
361 
362 //////////////////////////////////////////////////////////////////////////
363 // //
364 // TRecorder //
365 // //
366 // Class provides direct recorder/replayer interface for a user. //
367 // See 'ROOT EVENT RECORDING SYSTEM' for more information about usage. //
368 // //
369 // Implementation uses C++ design pattern State. Functionality of //
370 // recorder is divided into 4 classes according to the current //
371 // state of recorder. //
372 // //
373 // Internally, there is a pointer to TRecorderState object. //
374 // This object changes whenever state of recorder is changed. //
375 // States of recorder are the following: //
376 // //
377 // - INACTIVE Implemented in TRecorderInactive class. //
378 // Default state after TRecorder object is created. //
379 // //
380 // - RECORDING Implemented in TRecorderRecording class. //
381 // //
382 // - REPLAYING Implemented in TRecorderReplaying class. //
383 // //
384 // - PAUSED Implemented in TRecorderPause class. //
385 // Pause of replaying. //
386 // //
387 // Every command for TRecorder is just passed //
388 // to TRecordeState object. //
389 // Depending on the current state of recorder, this command is passed //
390 // to some of the above mentioned classes and if valid, handled there. //
391 // //
392 // [TRecorder.JPG] //
393 // //
394 // Switching between states is not possible from outside. States are //
395 // switched directly by state objects via: //
396 // //
397 // ChangeState(TRecorderState* newstate, Bool_t deletePreviousState); //
398 // //
399 // When recorder is switched to a new state, the old state object is //
400 // typically deleted. The only exception is switching from REPLAYING //
401 // state to PAUSED state. The previous state (REPLAYING) is not //
402 // deleted in order to be used again after TRecorder::Resume call. //
403 // //
404 // STATE TRANSITIONS: //
405 // ------------------ //
406 // //
407 // INACTIVE -> RECORDING via TRecorder::Start (Starts recording) //
408 // RECORDING -> INACTIVE via TRecorder::Stop (Stops recording) //
409 // //
410 // INACTIVE -> REPLAYING via TRecorder::Replay (Starts replaying) //
411 // REPLAYING -> INACTIVE via TRecorder::ReplayStop (Stops replaying) //
412 // //
413 // REPLAYING -> PAUSED via TRecorder::Pause (Pause replaying) //
414 // PAUSED -> REPLAYING via TRecorder::Resume (Resumes replaying) //
415 // //
416 // PAUSED -> INACTIVE via TRecorder::ReplayStop (Stops paused //
417 // replaying) //
418 // //
419 // [TRecorderStates.JPG] //
420 // //
421 //////////////////////////////////////////////////////////////////////////
422 class TRecorder : public TObject
423 {
424 private:
425  TRecorderState *fRecorderState; //! Current state of recorder
426 
427  TRecorder(const TRecorder&); // Not implemented.
428  TRecorder &operator=(const TRecorder&); // Not implemented.
429 
430 protected:
431  friend class TRecorderState;
432  friend class TRecorderInactive;
433  friend class TRecorderPaused;
434  friend class TRecorderRecording;
435  friend class TRecorderReplaying;
436 
437  TString fFilename; // Events file name
438  // Changes state to the new one.
439  // See class documentation for information about state changing.
440  void ChangeState(TRecorderState *newstate, Bool_t deletePreviousState = kTRUE);
441 
442 public:
443  //---- Modes of replaying. Only kRealtime implemented so far
446  };
447  //---- States of recorder. In every moment, recorder is in right
448  // one of these states.
454  };
455 
456  // Creates recorder and sets its state as INACTIVE
457  TRecorder();
458  TRecorder(const char *filename, Option_t *option = "READ");
459 
460  // Deletes recorder together with its current state
461  virtual ~TRecorder();
462 
463  void Browse(TBrowser *);
464 
465  // Starts recording of events to the given file
466  void Start(const char *filename, Option_t *option = "RECREATE", Window_t *w = 0, Int_t winCount = 0);
467 
468  // Stops recording of events
469  void Stop(Bool_t guiCommand = kFALSE);
470 
471  // Replays recorded events from given file
472  Bool_t Replay(const char *filename, Bool_t showMouseCursor = kTRUE, TRecorder::EReplayModes mode = kRealtime);
473 
474  // Replays recorded events from current file
475  void Replay() { Replay(fFilename); } // *MENU*
476 
477  // Pauses replaying
478  void Pause();
479 
480  // Resumes paused replaying
481  void Resume();
482 
483  // Stops (cancels) replaying
484  void ReplayStop();
485 
486  // Prints out the list of recorded commandline events
487  void ListCmd(const char *filename);
488 
489  // Prints out the list of recorded GUI events
490  void ListGui(const char *filename);
491 
492  // Gets current state of recorder
493  virtual TRecorder::ERecorderState GetState() const;
494 
495  // Saves all the canvases previous to the TRecorder
496  void PrevCanvases(const char *filename, Option_t *option);
497 
498  ClassDef(TRecorder,2) // Class provides direct recorder/replayer interface for a user.
499 };
500 
501 //////////////////////////////////////////////////////////////////////////
502 // //
503 // TRecorderState //
504 // //
505 // Abstract class that defines interface for a state of recorder. //
506 // Inherited classes are: //
507 // - TRecorderInactive //
508 // - TRecorderRecording //
509 // - TRecorderReplaying //
510 // - TRecorderPaused //
511 // //
512 // See TRecorder for more information about creating, using, //
513 // changing and deleting states. //
514 // //
515 //////////////////////////////////////////////////////////////////////////
517 {
518 protected:
519  friend class TRecorder;
520  void ChangeState(TRecorder *r, TRecorderState *s, Bool_t deletePreviousState) { r->ChangeState(s, deletePreviousState); }
521 
522 public:
523  virtual ~TRecorderState() {}
524  virtual void Start(TRecorder *, const char *, Option_t *, Window_t *, Int_t) {}
525  virtual void Stop(TRecorder *, Bool_t ) {}
526  virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::EReplayModes) { return false; }
527  virtual void Pause(TRecorder *) {}
528  virtual void Resume(TRecorder *) {}
529  virtual void ReplayStop(TRecorder *) {}
530 
531  virtual void ListCmd(const char *) {}
532  virtual void ListGui(const char *) {}
533 
534  virtual void PrevCanvases(const char *, Option_t *) {}
535 
536  virtual TRecorder::ERecorderState GetState() const = 0;
537 
538  ClassDef(TRecorderState, 0) // Abstract class that defines interface for a state of recorder
539 };
540 
541 //////////////////////////////////////////////////////////////////////////
542 // //
543 // TRecorderReplaying //
544 // //
545 // Represents state of TRecorder when replaying previously recorded //
546 // events. //
547 // //
548 // Not intended to be used by a user directly. //
549 // [Replaying.JPG] //
550 // //
551 //////////////////////////////////////////////////////////////////////////
553 {
554 private:
555  virtual ~TRecorderReplaying();
558  Bool_t CanOverlap();
559 
561 
562  TRecorder *fRecorder; // Reference to recorder (owner of this state) is kept in order to switch
563  // recorder to INACTIVE state after replaying is finished
564 
565  TFile *fFile; // ROOT file which the recorded events are being read from
566 
567 
568  TCanvas *fCanv; // Used to record the previous canvases
569 
570 
571  TTimer *fTimer; // Timer used for replaying
572 
573  TTree *fWinTree; // TTree with recorded windows (=registered during recording)
574  TTree *fGuiTree; // TTree with recorded GUI events
575  TTree *fCmdTree; // TTree with recorded commandline events
576  TTree *fExtraTree; // TTree with recorded extra events (PaveLabels and Texts)
577 
578  ULong64_t fWin; // Window ID being currenty mapped
579  TRecGuiEvent *fGuiEvent; // GUI event being currently replayed
580  TRecCmdEvent *fCmdEvent; // Commandline event being currently replayed
581  TRecExtraEvent *fExtraEvent; // Extra event being currently replayed
582 
583  Int_t fRegWinCounter; // Counter of registered windows when replaying
584  Int_t fGuiTreeCounter; // Counter of GUI events that have been replayed
585  Int_t fCmdTreeCounter; // Counter of commandline events that have been replayed
586  Int_t fExtraTreeCounter; // Counter of extra events that have been replayed
587 
588  Int_t fWinTreeEntries; // Number of registered windows during _recording_
589 
591 
592  TList *fWindowList; // List of TRecWinPair objects. Mapping of window IDs is stored here.
593 
594  TRecEvent *fNextEvent; // The next event that is going to be replayed (GUI event or commandline)
595 
596  TTime fPreviousEventTime; // Execution time of the previously replayed event.
597  // It is used for computing time difference between two events.
598 
599  Bool_t fWaitingForWindow; // Signalizes that we wait for a window to be registered in order
600  // to replay the next event fNextEvent.
601  // Registraion of windows can last different time when recording and replaying.
602  // If there is an event ready to be replayed but the corresponding windows has not been yet
603  // registered, we wait (postopone fNextEvent) until it is registered.
604 
605  Bool_t fEventReplayed; // Signalizes that the last event sent to the replaying has been already replayed.
606  // Sometimes an execution of an event can take more time than during recording.
607  // This ensures that the next event is sent to replaying AFTER
608  // the replaying of the previous one finishes and not earlier.
609  // Exceptions: ButtonPress and ButtonRelease events (See TRecorderReplaying::CanBeOverlapped)
610 
611  Bool_t fShowMouseCursor; // Specifies if mouse cursor should be also replayed
612 
613  Bool_t fFilterStatusBar; // Special flag to filter status bar element
614 
615 protected:
616  friend class TRecorderInactive;
617  friend class TRecorderPaused;
618 
619  TRecorderReplaying(const char *filename);
620  Bool_t Initialize(TRecorder *r, Bool_t showMouseCursor, TRecorder::EReplayModes mode);
621 
622 public:
624 
625  virtual void Pause(TRecorder *r);
626  virtual void Continue();
627  virtual void ReplayStop(TRecorder *r);
628 
629  void RegisterWindow(Window_t w); //SLOT
630  void ReplayRealtime(); //SLOT
631 
632  ClassDef(TRecorderReplaying, 0) // Represents state of TRecorder when replaying
633 };
634 
635 //////////////////////////////////////////////////////////////////////////
636 // //
637 // TRecorderRecording //
638 // //
639 // Represents state of TRecorder when recording events. //
640 // //
641 // Not intended to be used by a user directly. //
642 // //
643 //////////////////////////////////////////////////////////////////////////
645 {
646 private:
647  virtual ~TRecorderRecording();
650  void CopyEvent(Event_t *e, Window_t wid);
651 
652  TRecorder *fRecorder; // Reference to recorder (owner of this state) is kept in order to switch
653  // recorder back to INACTIVE state after recording is finished
654 
655  TFile *fFile; // ROOT file to store recorded events in
656  TTimer *fTimer; // Timer used for recording
657  TTimer *fMouseTimer; // Timer used for recording mouse position
658  Long64_t fBeginPave; // TLatex/TPaveLabel edition starting time
659 
660  TTree *fWinTree; // TTree with registered windows
661  TTree *fGuiTree; // TTree with recorded GUI events
662  TTree *fCmdTree; // TTree with recorded commandline events
663  TTree *fExtraTree; // TTree with recorded extra events (PaveLabels and Texts)
664 
665  ULong64_t fWin; // The newest registered window to be stored in TTree
666  TRecGuiEvent *fGuiEvent; // The newest GUI event to be stored in TTree
667  TRecCmdEvent *fCmdEvent; // The newest commandline event to be stored in TTree
668  TRecExtraEvent *fExtraEvent; // The newest extra event to be stored in TTree
669 
670  Bool_t fCmdEventPending; // Indication if there is a still pending commandline event that should be stored.
671  // Commandline events are stored with 1 event delay to ensure skipping
672  // the last event 'TRecorder::Stop' that is not supposed to be recorded
673 
674  Int_t fRegWinCounter; // Counter of registered ROOT windows.
675  // It is increased every time when a new window is registered
676 
677  Int_t fFilteredIdsCount; // Only when GUI for recorder is used: Count of windows in GUI recorder
678  Window_t *fFilteredIds; // Only when GUI for recorer is used: IDs of windows that creates that GUI.
679  // Events for GUI recorder are not recorded.
680  Bool_t fFilterEventPave; // Special flag to filter events during the pave recording
681 
682 protected:
683  friend class TRecorderInactive;
684  TRecorderRecording(TRecorder *r, const char *filename, Option_t *option, Window_t *w, Int_t winCount);
685 
687 
688 public:
690 
691  virtual void Stop(TRecorder *r, Bool_t guiCommand);
692 
693  void RegisterWindow(Window_t w); //SLOT
694  void RecordCmdEvent(const char *line); //SLOT
695  void RecordGuiEvent(Event_t *e, Window_t wid); //SLOT
696  void RecordGuiBldEvent(Event_t *e); //SLOT
697  void RecordGuiCNEvent(Event_t *e); //SLOT
698  void RecordMousePosition();
699  void RecordPave(const TObject *obj); //SLOT
700  void RecordText(const TObject *obj); //SLOT
701  void FilterEventPave(); //SLOT
702  void StartEditing(); //SLOT
703 
704  void RecordExtraEvent(TString line, TTime extTime);
705 
706  ClassDef(TRecorderRecording, 0) // Represents state of TRecorder when recording events
707 };
708 
709 //////////////////////////////////////////////////////////////////////////
710 // //
711 // TRecorderInactive //
712 // //
713 // Represents state of TRecorder just after its creation. //
714 // Nor recording neither replaying is being executed in this state. //
715 // //
716 // Not intended to be used by a user directly. //
717 // //
718 //////////////////////////////////////////////////////////////////////////
720 {
721 
722 private:
724 
725 public:
726  virtual ~TRecorderInactive() {}
728 
729  virtual void ListCmd(const char *filename);
730  virtual void ListGui(const char *filename);
731 
732  virtual void Start(TRecorder *r, const char *filename, Option_t *option, Window_t *w = 0, Int_t winCount = 0);
733  virtual Bool_t Replay(TRecorder *r, const char *filename, Bool_t showMouseCursor, TRecorder::EReplayModes mode);
734 
736 
737  static void DumpRootEvent(TRecGuiEvent *e, Int_t n);
738  static long DisplayValid(Long_t n) { return ( n < 0 ? -1 : n); }
739 
740  void PrevCanvases(const char *filename, Option_t *option);
741 
742  ClassDef(TRecorderInactive, 0) // Represents state of TRecorder after its creation
743 };
744 
745 //////////////////////////////////////////////////////////////////////////
746 // //
747 // TRecorderPaused //
748 // //
749 // Represents state of TRecorder when replaying was paused //
750 // by a user. //
751 // The paused replaying is remembered and after Resume call can //
752 // be continued again. //
753 // //
754 // Not intended to be used by a user directly. //
755 // //
756 //////////////////////////////////////////////////////////////////////////
758 {
759 private:
760  virtual ~TRecorderPaused() {}
761 
762  TRecorderReplaying *fReplayingState; // Replaying that is paused
763 
764 protected:
765  friend class TRecorderReplaying;
767 
768 public:
770 
771  virtual void Resume(TRecorder *r);
772  virtual void ReplayStop(TRecorder *r);
773 
774  ClassDef(TRecorderPaused, 0) // Represents state of TRecorder when paused
775 };
776 
777 
778 //////////////////////////////////////////////////////////////////////////
779 // //
780 // TGRecorder //
781 // //
782 // Provides GUI for TRecorder class. //
783 // //
784 //////////////////////////////////////////////////////////////////////////
785 class TGRecorder : public TGMainFrame
786 {
787 private:
788  TRecorder *fRecorder; // Recorder
789 
790  TGPictureButton *fStartStop; // Button for start and stop of recording
791  TGPictureButton *fReplay; // Button for start of replaying
792 
793  TGLabel *fStatus; // Label with actual status
794  TGLabel *fTimeDisplay; // Label with time counter
795  TGCheckButton *fCursorCheckBox; // Check box "Show mouse cursor" for replaying
796 
797  TTimer *fTimer; // Timer for handling GUI of recorder
798  time_t fStart, fElapsed; // playing/recording time
799 
800  static const Int_t fgWidgetsCount = 12; // Number of windows in GUI recorder
801  Window_t fFilteredIds[fgWidgetsCount]; // IDs of these windows in GUI recorder
802 
803  void SetDefault();
804 
805 public:
806  TGRecorder(const TGWindow *p = 0, UInt_t w = 230, UInt_t h = 150);
807  virtual ~TGRecorder();
808 
809  void StartStop();
810  void Update();
811  void Replay();
812 
813  ClassDef(TGRecorder,0) // GUI class of the event recorder.
814 };
815 
816 #endif // ROOT_TRecorder
TGRecorder
Definition: TRecorder.h:785
TRecCmdEvent::SetText
void SetText(const char *text)
Definition: TRecorder.h:204
TRecExtraEvent::fText
TString fText
Definition: TRecorder.h:239
n
const Int_t n
Definition: legend1.C:16
TRecExtraEvent
Definition: TRecorder.h:236
TRecorderRecording::fFilterEventPave
Bool_t fFilterEventPave
Definition: TRecorder.h:680
TRecEvent
Definition: TRecorder.h:152
TRecorderRecording::RecordGuiBldEvent
void RecordGuiBldEvent(Event_t *e)
Special case for the gui builder, having a timer handling some of the events.
Definition: TRecorder.cxx:1481
TRecorderReplaying::fNextEvent
TRecEvent * fNextEvent
Definition: TRecorder.h:594
TBrowser
Definition: TBrowser.h:37
TGWindow
Definition: TGWindow.h:31
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TRecorderRecording::fBeginPave
Long64_t fBeginPave
Definition: TRecorder.h:658
e
#define e(i)
Definition: RSha256.hxx:121
TRecorderReplaying::~TRecorderReplaying
virtual ~TRecorderReplaying()
Closes all signal-slot connections Frees all memory allocated in contructor.
Definition: TRecorder.cxx:405
TGMainFrame
Definition: TGFrame.h:444
TRecorderState::ReplayStop
virtual void ReplayStop(TRecorder *)
Definition: TRecorder.h:529
TRecorderInactive::TRecorderInactive
TRecorderInactive()
Definition: TRecorder.h:727
TRecGuiEvent::fX
Int_t fX
Definition: TRecorder.h:290
TRecGuiEvent::kROOT_MESSAGE
@ kROOT_MESSAGE
Definition: TRecorder.h:319
TRecCmdEvent::fText
TString fText
Definition: TRecorder.h:197
TGRecorder::fElapsed
time_t fElapsed
Definition: TRecorder.h:798
TRecorderReplaying::fEventReplayed
Bool_t fEventReplayed
Definition: TRecorder.h:605
TRecorderReplaying::Pause
virtual void Pause(TRecorder *r)
Pauses replaying.
Definition: TRecorder.cxx:951
TRecorderRecording::fCmdEventPending
Bool_t fCmdEventPending
Definition: TRecorder.h:670
TRecEvent::SetTime
virtual void SetTime(TTime t)
Definition: TRecorder.h:176
TRecorderPaused
Definition: TRecorder.h:757
TRecExtraEvent::ReplayEvent
virtual void ReplayEvent(Bool_t)
Definition: TRecorder.h:261
TRecorderRecording::fCmdEvent
TRecCmdEvent * fCmdEvent
Definition: TRecorder.h:667
TRecEvent::kCmdEvent
@ kCmdEvent
Definition: TRecorder.h:160
TRecGuiEvent::ReplayEvent
virtual void ReplayEvent(Bool_t showMouseCursor=kTRUE)
Replays stored GUI event.
Definition: TRecorder.cxx:2089
TRecorderRecording::~TRecorderRecording
virtual ~TRecorderRecording()
Freeing of allocated memory.
Definition: TRecorder.cxx:1255
TString::Data
const char * Data() const
Definition: TString.h:369
TRecorderReplaying::CanOverlap
Bool_t CanOverlap()
ButtonPress and ButtonRelease must be sometimes replayed more times Example: pressing of a button ope...
Definition: TRecorder.cxx:830
TRecGuiEvent::kWM_DELETE_WINDOW
@ kWM_DELETE_WINDOW
Definition: TRecorder.h:318
TRecorder::ERecorderState
ERecorderState
Definition: TRecorder.h:449
TRecorderRecording::FilterEventPave
void FilterEventPave()
Change the state of the flag to kTRUE when you are recording a pavelabel.
Definition: TRecorder.cxx:1639
TRecorderReplaying::fCmdEvent
TRecCmdEvent * fCmdEvent
Definition: TRecorder.h:580
r
ROOT::R::TRInterface & r
Definition: Object.C:4
TRecorderPaused::ReplayStop
virtual void ReplayStop(TRecorder *r)
Replaying is cancelled.
Definition: TRecorder.cxx:1189
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TGRecorder::StartStop
void StartStop()
Handles push of the fStartStop button according to the current recorder state.
Definition: TRecorder.cxx:1964
TRecorderReplaying::TRecorderReplaying
TRecorderReplaying(const char *filename)
Allocates all necessary data structures used for replaying What is allocated here is deleted in destr...
Definition: TRecorder.cxx:371
TGLabel
Definition: TGLabel.h:32
TRecorderReplaying::fWin
ULong64_t fWin
Definition: TRecorder.h:578
TTree
Definition: TTree.h:79
TRecorderRecording::RecordCmdEvent
void RecordCmdEvent(const char *line)
Records commandline event (text and time) ans saves the previous commandline event This 1 event delay...
Definition: TRecorder.cxx:1419
TRecExtraEvent::TRecExtraEvent
TRecExtraEvent()
Definition: TRecorder.h:242
TGRecorder::fgWidgetsCount
static const Int_t fgWidgetsCount
Definition: TRecorder.h:800
TRecGuiEvent::fTime
Time_t fTime
Definition: TRecorder.h:289
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:168
TRecorderReplaying::fExtraEvent
TRecExtraEvent * fExtraEvent
Definition: TRecorder.h:581
TGRecorder::SetDefault
void SetDefault()
Sets GUI to the default inactive state.
Definition: TRecorder.cxx:1884
TRecorderState::Replay
virtual Bool_t Replay(TRecorder *, const char *, Bool_t, TRecorder::EReplayModes)
Definition: TRecorder.h:526
TRecorderReplaying::fWaitingForWindow
Bool_t fWaitingForWindow
Definition: TRecorder.h:599
Int_t
int Int_t
Definition: RtypesCore.h:45
TRecorderReplaying::fCmdTreeCounter
Int_t fCmdTreeCounter
Definition: TRecorder.h:585
TGRecorder::fFilteredIds
Window_t fFilteredIds[fgWidgetsCount]
Definition: TRecorder.h:801
TRecEvent::GetTime
virtual TTime GetTime() const
Definition: TRecorder.h:171
TRecorderReplaying::fGuiEvent
TRecGuiEvent * fGuiEvent
Definition: TRecorder.h:579
TRecorderRecording::StartRecording
Bool_t StartRecording()
Connects appropriate signals and slots in order to gain all registered windows and processed events i...
Definition: TRecorder.cxx:1272
TRecorder::ReplayStop
void ReplayStop()
Cancells replaying.
Definition: TRecorder.cxx:312
TRecorderState::ListCmd
virtual void ListCmd(const char *)
Definition: TRecorder.h:531
TRecorderPaused::Resume
virtual void Resume(TRecorder *r)
Continues replaying.
Definition: TRecorder.cxx:1177
TRecorderState::PrevCanvases
virtual void PrevCanvases(const char *, Option_t *)
Definition: TRecorder.h:534
TRecorderInactive::ListGui
virtual void ListGui(const char *filename)
Prints out GUI events recorded in given file.
Definition: TRecorder.cxx:1073
TRecorder::PrevCanvases
void PrevCanvases(const char *filename, Option_t *option)
Save previous canvases in a .root file.
Definition: TRecorder.cxx:357
TRecorderReplaying::GetState
virtual TRecorder::ERecorderState GetState() const
Definition: TRecorder.h:623
TRecGuiEvent::CreateEvent
static Event_t * CreateEvent(TRecGuiEvent *ge)
Converts TRecGuiEvent type to Event_t type.
Definition: TRecorder.cxx:2199
TRecorder::kReplaying
@ kReplaying
Definition: TRecorder.h:453
TRecorderReplaying::Initialize
Bool_t Initialize(TRecorder *r, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
Initialization of data structures for replaying.
Definition: TRecorder.cxx:437
TRecorderState::Resume
virtual void Resume(TRecorder *)
Definition: TRecorder.h:528
TRecEvent::kExtraEvent
@ kExtraEvent
Definition: TRecorder.h:162
TTimer.h
TRecorderRecording::fCmdTree
TTree * fCmdTree
Definition: TRecorder.h:662
TRecGuiEvent::fFormat
Int_t fFormat
Definition: TRecorder.h:301
TCanvas.h
TRecorder::kPaused
@ kPaused
Definition: TRecorder.h:452
TRecWinPair::fKey
Window_t fKey
Definition: TRecorder.h:352
TRecorderReplaying::fTimer
TTimer * fTimer
Definition: TRecorder.h:571
TRecCmdEvent::TRecCmdEvent
TRecCmdEvent()
Definition: TRecorder.h:200
TRecorderRecording::fGuiTree
TTree * fGuiTree
Definition: TRecorder.h:661
TRecorderRecording::fFilteredIds
Window_t * fFilteredIds
Definition: TRecorder.h:678
TRecCmdEvent::ReplayEvent
virtual void ReplayEvent(Bool_t)
Definition: TRecorder.h:219
TString
Definition: TString.h:136
TRecorderRecording::fWin
ULong64_t fWin
Definition: TRecorder.h:665
TRecorder::Start
void Start(const char *filename, Option_t *option="RECREATE", Window_t *w=0, Int_t winCount=0)
Starts recording events.
Definition: TRecorder.cxx:270
TRecorder::operator=
TRecorder & operator=(const TRecorder &)
TRecorderState::ChangeState
void ChangeState(TRecorder *r, TRecorderState *s, Bool_t deletePreviousState)
Definition: TRecorder.h:520
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TRecGuiEvent::fCount
Int_t fCount
Definition: TRecorder.h:298
text
TText * text
Definition: entrylist_figure1.C:10
TRecorderRecording::fFilteredIdsCount
Int_t fFilteredIdsCount
Definition: TRecorder.h:677
TRecorderReplaying::RegisterWindow
void RegisterWindow(Window_t w)
Creates mapping for the newly registered window w and adds this mapping to fWindowList.
Definition: TRecorder.cxx:542
TRecCmdEvent::GetText
const char * GetText() const
Definition: TRecorder.h:209
bool
TRecorderInactive::fCollect
TSeqCollection * fCollect
Definition: TRecorder.h:723
TRecorderRecording::Stop
virtual void Stop(TRecorder *r, Bool_t guiCommand)
Disconnects all slots and stopps recording.
Definition: TRecorder.cxx:1366
TRecorderReplaying::Continue
virtual void Continue()
Continues previously paused replaying.
Definition: TRecorder.cxx:970
TRecorderReplaying::fExtraTreeCounter
Int_t fExtraTreeCounter
Definition: TRecorder.h:586
TRecorderRecording::GetState
virtual TRecorder::ERecorderState GetState() const
Definition: TRecorder.h:689
TRecGuiEvent::fWidth
UInt_t fWidth
Definition: TRecorder.h:296
TRecorderReplaying::FilterEvent
Bool_t FilterEvent(TRecGuiEvent *e)
Definition: TRecorder.cxx:670
TGRecorder::fRecorder
TRecorder * fRecorder
Definition: TRecorder.h:788
TRecorderRecording::fTimer
TTimer * fTimer
Definition: TRecorder.h:656
TRecorderPaused::fReplayingState
TRecorderReplaying * fReplayingState
Definition: TRecorder.h:762
TRecorder::kInactive
@ kInactive
Definition: TRecorder.h:450
TApplication.h
TRecGuiEvent::fType
EGEventType fType
Definition: TRecorder.h:287
TGCheckButton
Definition: TGButton.h:264
TRecorderPaused::~TRecorderPaused
virtual ~TRecorderPaused()
Definition: TRecorder.h:760
TRecWinPair::TRecWinPair
TRecWinPair(Window_t key, Window_t value)
Definition: TRecorder.h:357
TRecExtraEvent::GetText
TString GetText() const
Definition: TRecorder.h:251
TRecGuiEvent::kCNResize
@ kCNResize
Definition: TRecorder.h:312
TRecorderInactive::DumpRootEvent
static void DumpRootEvent(TRecGuiEvent *e, Int_t n)
Prints out attributes of one GUI event TRecGuiEvent *e Int_n n is number of event if called in cycle.
Definition: TRecorder.cxx:1115
TRecGuiEvent::fWindow
Window_t fWindow
Definition: TRecorder.h:288
TRecorderReplaying::ReplayRealtime
void ReplayRealtime()
Replays the next event.
Definition: TRecorder.cxx:874
TRecorderInactive::~TRecorderInactive
virtual ~TRecorderInactive()
Definition: TRecorder.h:726
TTimer
Definition: TTimer.h:51
TRecGuiEvent::kCNMove
@ kCNMove
Definition: TRecorder.h:311
TRecGuiEvent::fUser
Long_t fUser[5]
Definition: TRecorder.h:302
TRecorderReplaying::fPreviousEventTime
TTime fPreviousEventTime
Definition: TRecorder.h:596
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TRecorder::Browse
void Browse(TBrowser *)
Browse the recorder from a ROOT file.
Definition: TRecorder.cxx:262
TRecEvent::ERecEventType
ERecEventType
Definition: TRecorder.h:159
TRecorderRecording::RecordPave
void RecordPave(const TObject *obj)
Records TPaveLabel object created in TCreatePrimitives::Pave()
Definition: TRecorder.cxx:1553
TRecorder::ChangeState
void ChangeState(TRecorderState *newstate, Bool_t deletePreviousState=kTRUE)
Changes state from the current to the passed one (newstate) Deletes the old state if delPreviousState...
Definition: TRecorder.cxx:337
TGRecorder::fReplay
TGPictureButton * fReplay
Definition: TRecorder.h:791
TRecorderInactive::Start
virtual void Start(TRecorder *r, const char *filename, Option_t *option, Window_t *w=0, Int_t winCount=0)
Switches from INACTIVE state to RECORDING and starts recording.
Definition: TRecorder.cxx:984
TRecorderInactive
Definition: TRecorder.h:719
TRecEvent::fEventTime
TTime fEventTime
Definition: TRecorder.h:155
TGRecorder::fStartStop
TGPictureButton * fStartStop
Definition: TRecorder.h:790
TRecorderState::ListGui
virtual void ListGui(const char *)
Definition: TRecorder.h:532
TRecGuiEvent::EConfigureNotifyType
EConfigureNotifyType
Definition: TRecorder.h:310
TRecorderRecording::fMouseTimer
TTimer * fMouseTimer
Definition: TRecorder.h:657
TRecorderReplaying::fMutex
TMutex * fMutex
Definition: TRecorder.h:590
TRecorderRecording::SetTypeOfConfigureNotify
void SetTypeOfConfigureNotify(Event_t *e)
Sets type of kConfigureNotify event to one of EConfigureNotify.
Definition: TRecorder.cxx:1728
TRecorder::Stop
void Stop(Bool_t guiCommand=kFALSE)
Stopps recording events.
Definition: TRecorder.cxx:279
h
#define h(i)
Definition: RSha256.hxx:124
TApplication::ProcessLine
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
TRecorderState::Pause
virtual void Pause(TRecorder *)
Definition: TRecorder.h:527
TRecorderRecording::RecordGuiEvent
void RecordGuiEvent(Event_t *e, Window_t wid)
Records GUI Event_t *e different from kConfigureNotify (they are recorded in TRecorderRecording::Reco...
Definition: TRecorder.cxx:1447
TRecorderReplaying::fWindowList
TList * fWindowList
Definition: TRecorder.h:592
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TRecorderInactive::GetState
virtual TRecorder::ERecorderState GetState() const
Definition: TRecorder.h:735
TGFrame.h
Long_t
long Long_t
Definition: RtypesCore.h:54
TRecorder::ListGui
void ListGui(const char *filename)
Prints out recorded GUI events.
Definition: TRecorder.cxx:328
TTime
Definition: TTime.h:27
TRecGuiEvent::GetType
virtual ERecEventType GetType() const
Definition: TRecorder.h:322
TRecorderReplaying::fCmdTree
TTree * fCmdTree
Definition: TRecorder.h:575
TRecorder::~TRecorder
virtual ~TRecorder()
Destructor.
Definition: TRecorder.cxx:253
TRecorderRecording::fRegWinCounter
Int_t fRegWinCounter
Definition: TRecorder.h:674
TRecExtraEvent::GetType
virtual ERecEventType GetType() const
Definition: TRecorder.h:256
TRecEvent::GetType
virtual ERecEventType GetType() const =0
TRecorderRecording::CopyEvent
void CopyEvent(Event_t *e, Window_t wid)
Copies all items of given event to fGuiEvent.
Definition: TRecorder.cxx:1666
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:166
Window_t
Handle_t Window_t
Definition: GuiTypes.h:28
TRecorderReplaying::fRecorder
TRecorder * fRecorder
Definition: TRecorder.h:562
TRecorder::Resume
void Resume()
Resumes replaying.
Definition: TRecorder.cxx:304
TRecorder::EReplayModes
EReplayModes
Definition: TRecorder.h:444
TRecorderReplaying::fGuiTree
TTree * fGuiTree
Definition: TRecorder.h:574
TRecGuiEvent::fHandle
Handle_t fHandle
Definition: TRecorder.h:300
TRecorder::Replay
void Replay()
Definition: TRecorder.h:475
TRecorderState::Start
virtual void Start(TRecorder *, const char *, Option_t *, Window_t *, Int_t)
Definition: TRecorder.h:524
TGClient.h
TRecGuiEvent::ERootAtoms
ERootAtoms
Definition: TRecorder.h:317
TRecorder::fRecorderState
TRecorderState * fRecorderState
Definition: TRecorder.h:425
TRecorderReplaying::fShowMouseCursor
Bool_t fShowMouseCursor
Definition: TRecorder.h:611
TRecorderRecording::fExtraEvent
TRecExtraEvent * fExtraEvent
Definition: TRecorder.h:668
line
TLine * line
Definition: entrylistblock_figure1.C:235
TRecorderRecording::RecordText
void RecordText(const TObject *obj)
Records TLatex object created in TCreatePrimitives::Text()
Definition: TRecorder.cxx:1597
TRecGuiEvent::kCNMoveResize
@ kCNMoveResize
Definition: TRecorder.h:313
TRecGuiEvent::fY
Int_t fY
Definition: TRecorder.h:291
TFile
Definition: TFile.h:54
TRecorderState::~TRecorderState
virtual ~TRecorderState()
Definition: TRecorder.h:523
TRecorderRecording::fExtraTree
TTree * fExtraTree
Definition: TRecorder.h:663
TRecorder::GetState
virtual TRecorder::ERecorderState GetState() const
Get current state of recorder.
Definition: TRecorder.cxx:348
unsigned int
TRecorder::TRecorder
TRecorder()
Creates initial INACTIVE state for the recorder.
Definition: TRecorder.cxx:228
THashList.h
TRecorderPaused::TRecorderPaused
TRecorderPaused(TRecorderReplaying *state)
Rememeber the recorder state that is paused.
Definition: TRecorder.cxx:1169
TRecorderInactive::Replay
virtual Bool_t Replay(TRecorder *r, const char *filename, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
Switches from INACTIVE state of recorder to REPLAYING Return kTRUE if replaying has started or kFALSE...
Definition: TRecorder.cxx:1007
TRecorderReplaying::fWinTree
TTree * fWinTree
Definition: TRecorder.h:573
TRecorderRecording
Definition: TRecorder.h:644
TRecorderRecording::RecordMousePosition
void RecordMousePosition()
Try to record all mouse moves...
Definition: TRecorder.cxx:1499
TSeqCollection
Definition: TSeqCollection.h:28
TGRecorder::TGRecorder
TGRecorder(const TGWindow *p=0, UInt_t w=230, UInt_t h=150)
The GUI for the recorder.
Definition: TRecorder.cxx:1780
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:74
TGRecorder::fCursorCheckBox
TGCheckButton * fCursorCheckBox
Definition: TRecorder.h:795
TRecCmdEvent::GetType
virtual ERecEventType GetType() const
Definition: TRecorder.h:214
TRecorderReplaying::fFile
TFile * fFile
Definition: TRecorder.h:565
TRecorderRecording::RegisterWindow
void RegisterWindow(Window_t w)
This method is called when RegisteredWindow(Window_t) is emitted from TGClient.
Definition: TRecorder.cxx:1406
TRecorderReplaying::fWinTreeEntries
Int_t fWinTreeEntries
Definition: TRecorder.h:588
TGPictureButton
Definition: TGButton.h:228
TCanvas
Definition: TCanvas.h:23
TRecorderRecording::RecordGuiCNEvent
void RecordGuiCNEvent(Event_t *e)
Records GUI Event_t *e of type kConfigureNotify.
Definition: TRecorder.cxx:1530
TRecorderRecording::IsFiltered
Bool_t IsFiltered(Window_t id)
Returns kTRUE if passed id belongs to window IDs of recorder GUI itself.
Definition: TRecorder.cxx:1710
TRecorderInactive::ListCmd
virtual void ListCmd(const char *filename)
Prints out commandline events recorded in given file.
Definition: TRecorder.cxx:1031
TRecGuiEvent::fMasked
Window_t fMasked
Definition: TRecorder.h:306
TRecGuiEvent::kCNFilter
@ kCNFilter
Definition: TRecorder.h:314
TObject
Definition: TObject.h:37
Handle_t
ULong_t Handle_t
Definition: GuiTypes.h:25
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TRecWinPair::fValue
Window_t fValue
Definition: TRecorder.h:353
TRecorderRecording::fFile
TFile * fFile
Definition: TRecorder.h:655
TRecorderState::GetState
virtual TRecorder::ERecorderState GetState() const =0
TGRecorder::Update
void Update()
Called when fTimer timeouts (every 0.025 second) Updates GUI of recorder.
Definition: TRecorder.cxx:1902
TRecGuiEvent::fState
UInt_t fState
Definition: TRecorder.h:295
TRecGuiEvent::fHeight
UInt_t fHeight
Definition: TRecorder.h:297
Event_t
Definition: GuiTypes.h:173
TRecEvent::ReplayEvent
virtual void ReplayEvent(Bool_t showMouseCursor=kTRUE)=0
TRecorderReplaying
Definition: TRecorder.h:552
TRecorderRecording::fGuiEvent
TRecGuiEvent * fGuiEvent
Definition: TRecorder.h:666
TRecorderReplaying::PrepareNextEvent
Bool_t PrepareNextEvent()
Finds the next event in log file to replay and sets it to fNextEvent.
Definition: TRecorder.cxx:725
TRecorderReplaying::RemapWindowReferences
Bool_t RemapWindowReferences()
All references to the old windows (IDs) in fNextEvent are replaced by new ones according to the mappi...
Definition: TRecorder.cxx:610
TRecorderRecording::fRecorder
TRecorder * fRecorder
Definition: TRecorder.h:652
TRecorder::kRecording
@ kRecording
Definition: TRecorder.h:451
TRecorderInactive::PrevCanvases
void PrevCanvases(const char *filename, Option_t *option)
Save previous canvases in a .root file.
Definition: TRecorder.cxx:1150
TRecExtraEvent::SetText
void SetText(TString text)
Definition: TRecorder.h:246
TRecWinPair
Definition: TRecorder.h:347
TRecorder
Definition: TRecorder.h:422
TRecorderState
Definition: TRecorder.h:516
TRecGuiEvent::fYRoot
Int_t fYRoot
Definition: TRecorder.h:293
TRecorderReplaying::fCanv
TCanvas * fCanv
Definition: TRecorder.h:568
TRecEvent::kGuiEvent
@ kGuiEvent
Definition: TRecorder.h:161
TRecGuiEvent::fSendEvent
Bool_t fSendEvent
Definition: TRecorder.h:299
TRecGuiEvent
Definition: TRecorder.h:279
TGRecorder::fTimer
TTimer * fTimer
Definition: TRecorder.h:797
TRecorderState::Stop
virtual void Stop(TRecorder *, Bool_t)
Definition: TRecorder.h:525
TGRecorder::Replay
void Replay()
Handles push of fReplay button according to the current recorder state.
Definition: TRecorder.cxx:2028
TRecorderRecording::RecordExtraEvent
void RecordExtraEvent(TString line, TTime extTime)
Records TLatex or TPaveLabel object created in TCreatePrimitives, ExtTime is needed for the correct r...
Definition: TRecorder.cxx:1656
TRecorderReplaying::fGuiTreeCounter
Int_t fGuiTreeCounter
Definition: TRecorder.h:584
TGRecorder::fStart
time_t fStart
Definition: TRecorder.h:798
TRecorderReplaying::fRegWinCounter
Int_t fRegWinCounter
Definition: TRecorder.h:583
TMutex
Definition: TMutex.h:30
TRecorderInactive::DisplayValid
static long DisplayValid(Long_t n)
Definition: TRecorder.h:738
TRecorderReplaying::fExtraTree
TTree * fExtraTree
Definition: TRecorder.h:576
TGRecorder::~TGRecorder
virtual ~TGRecorder()
Destructor. Cleanup the GUI.
Definition: TRecorder.cxx:2073
TGRecorder::fTimeDisplay
TGLabel * fTimeDisplay
Definition: TRecorder.h:794
Time_t
ULong_t Time_t
Definition: GuiTypes.h:41
TRecorder::ListCmd
void ListCmd(const char *filename)
Prints out recorded commandline events.
Definition: TRecorder.cxx:320
TRecorder::kRealtime
@ kRealtime
Definition: TRecorder.h:445
TRecorderRecording::StartEditing
void StartEditing()
Memorize the starting time of editinga TLatex or a TPaveLabel.
Definition: TRecorder.cxx:1647
TRecGuiEvent::fCode
UInt_t fCode
Definition: TRecorder.h:294
TRecCmdEvent
Definition: TRecorder.h:194
TRecorder::Pause
void Pause()
Pauses replaying.
Definition: TRecorder.cxx:296
TRecorderRecording::fWinTree
TTree * fWinTree
Definition: TRecorder.h:660
EGEventType
EGEventType
Definition: GuiTypes.h:58
TRecorder::fFilename
TString fFilename
Definition: TRecorder.h:437
TRecorderPaused::GetState
virtual TRecorder::ERecorderState GetState() const
Definition: TRecorder.h:769
TList
Definition: TList.h:44
TGRecorder::fStatus
TGLabel * fStatus
Definition: TRecorder.h:793
TRecGuiEvent::fXRoot
Int_t fXRoot
Definition: TRecorder.h:292
TRecorderReplaying::fFilterStatusBar
Bool_t fFilterStatusBar
Definition: TRecorder.h:613
TRecorderRecording::TRecorderRecording
TRecorderRecording(TRecorder *r, const char *filename, Option_t *option, Window_t *w, Int_t winCount)
Initializes TRecorderRecording for recording What is allocated here is deleted in destructor.
Definition: TRecorder.cxx:1207
TRecorderReplaying::ReplayStop
virtual void ReplayStop(TRecorder *r)
Cancels replaying.
Definition: TRecorder.cxx:961
int
TError.h