Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TRecorderReplaying Class Reference

Represents state of TRecorder when replaying previously recorded events.

Not intended to be used by a user directly.

Definition at line 395 of file TRecorder.h.

Public Member Functions

virtual void Continue ()
 Continues previously paused replaying.
TRecorder::ERecorderState GetState () const override
TClassIsA () const override
virtual void ListCmd (const char *)
virtual void ListGui (const char *)
void Pause (TRecorder *r) override
 Pauses replaying.
virtual void PrevCanvases (const char *, Option_t *)
void RegisterWindow (Window_t w)
 Creates mapping for the newly registered window w and adds this mapping to fWindowList.
virtual Bool_t Replay (TRecorder *, const char *, Bool_t, TRecorder::EReplayModes)
void ReplayRealtime ()
 Replays the next event.
void ReplayStop (TRecorder *r) override
 Cancels replaying.
virtual void Resume (TRecorder *)
virtual void Start (TRecorder *, const char *, Option_t *, Window_t *, Int_t)
virtual void Stop (TRecorder *, Bool_t)
void Streamer (TBuffer &) override
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()

Protected Member Functions

 TRecorderReplaying (const char *filename)
 Allocates all necessary data structures used for replaying What is allocated here is deleted in destructor.
void ChangeState (TRecorder *r, TRecorderState *s, Bool_t deletePreviousState)
Bool_t Initialize (TRecorder *r, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
 Initialization of data structures for replaying.

Private Member Functions

 ~TRecorderReplaying () override
 Closes all signal-slot connections Frees all memory allocated in constructor.
Bool_t CanOverlap ()
 ButtonPress and ButtonRelease must be sometimes replayed more times Example: pressing of a button opens small window and user chooses something from that window (color) Window must be opened while user is choosing.
Bool_t FilterEvent (TRecGuiEvent *e)
Bool_t PrepareNextEvent ()
 Finds the next event in log file to replay and sets it to fNextEvent.
Bool_t RemapWindowReferences ()
 All references to the old windows (IDs) in fNextEvent are replaced by new ones according to the mappings in fWindowList.

Private Attributes

TCanvasfCanv
TRecCmdEventfCmdEvent
TTreefCmdTree
Int_t fCmdTreeCounter
Bool_t fEventReplayed
TRecExtraEventfExtraEvent
TTreefExtraTree
Int_t fExtraTreeCounter
TFilefFile
Bool_t fFilterStatusBar
TRecGuiEventfGuiEvent
TTreefGuiTree
Int_t fGuiTreeCounter
TMutexfMutex
TRecEventfNextEvent
TTime fPreviousEventTime
TRecorderfRecorder
Int_t fRegWinCounter
Bool_t fShowMouseCursor
TTimerfTimer
Bool_t fWaitingForWindow
ULong64_t fWin
TListfWindowList
TTreefWinTree
Int_t fWinTreeEntries

Friends

class TRecorderInactive
class TRecorderPaused

#include <TRecorder.h>

Inheritance diagram for TRecorderReplaying:
TRecorderState

Constructor & Destructor Documentation

◆ ~TRecorderReplaying()

TRecorderReplaying::~TRecorderReplaying ( )
overrideprivate

Closes all signal-slot connections Frees all memory allocated in constructor.

Definition at line 354 of file TRecorder.cxx.

◆ TRecorderReplaying()

TRecorderReplaying::TRecorderReplaying ( const char * filename)
protected

Allocates all necessary data structures used for replaying What is allocated here is deleted in destructor.

Definition at line 320 of file TRecorder.cxx.

Member Function Documentation

◆ CanOverlap()

Bool_t TRecorderReplaying::CanOverlap ( )
private

ButtonPress and ButtonRelease must be sometimes replayed more times Example: pressing of a button opens small window and user chooses something from that window (color) Window must be opened while user is choosing.

Definition at line 779 of file TRecorder.cxx.

◆ ChangeState()

void TRecorderState::ChangeState ( TRecorder * r,
TRecorderState * s,
Bool_t deletePreviousState )
inlineprotectedinherited

Definition at line 364 of file TRecorder.h.

◆ Class()

TClass * TRecorderReplaying::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

const char * TRecorderReplaying::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

constexpr Version_t TRecorderReplaying::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 475 of file TRecorder.h.

◆ Continue()

void TRecorderReplaying::Continue ( )
virtual

Continues previously paused replaying.

Definition at line 919 of file TRecorder.cxx.

◆ DeclFileName()

const char * TRecorderReplaying::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 475 of file TRecorder.h.

◆ FilterEvent()

Bool_t TRecorderReplaying::FilterEvent ( TRecGuiEvent * e)
private

Definition at line 619 of file TRecorder.cxx.

◆ GetState()

TRecorder::ERecorderState TRecorderReplaying::GetState ( ) const
inlineoverridevirtual

Implements TRecorderState.

Definition at line 466 of file TRecorder.h.

◆ Initialize()

Bool_t TRecorderReplaying::Initialize ( TRecorder * r,
Bool_t showMouseCursor,
TRecorder::EReplayModes mode )
protected

Initialization of data structures for replaying.

Start of replaying.

Return value:

  • kTRUE = everything is OK and replaying has begun
  • kFALSE = non existing or invalid log file, replaying has not started

Definition at line 386 of file TRecorder.cxx.

◆ IsA()

TClass * TRecorderReplaying::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TRecorderState.

Definition at line 475 of file TRecorder.h.

◆ ListCmd()

virtual void TRecorderState::ListCmd ( const char * )
inlinevirtualinherited

Reimplemented in TRecorderInactive.

Definition at line 375 of file TRecorder.h.

◆ ListGui()

virtual void TRecorderState::ListGui ( const char * )
inlinevirtualinherited

Reimplemented in TRecorderInactive.

Definition at line 376 of file TRecorder.h.

◆ Pause()

void TRecorderReplaying::Pause ( TRecorder * r)
overridevirtual

Pauses replaying.

Reimplemented from TRecorderState.

Definition at line 900 of file TRecorder.cxx.

◆ PrepareNextEvent()

Bool_t TRecorderReplaying::PrepareNextEvent ( )
private

Finds the next event in log file to replay and sets it to fNextEvent.

Reads both from CmdTree and GuiTree and chooses that event that becomes earlier

  • fCmdTreeCounter determines actual position in fCmdTree
  • fGuiTreeCounter determines actual position in fCmdTree

If GUI event should be replayed, we must first make sure that there is appropriate mapping for this event

RETURN VALUE: kFALSE = there is no event to be replayed kTRUE = there is still at least one event to be replayed. Cases:

  • fNextEvent = 0 => We are waiting for the appropriate window to be registered
  • fNextEvent != 0 => fNextEvent can be replayed (windows are ready)

Definition at line 674 of file TRecorder.cxx.

◆ PrevCanvases()

virtual void TRecorderState::PrevCanvases ( const char * ,
Option_t *  )
inlinevirtualinherited

Reimplemented in TRecorderInactive.

Definition at line 378 of file TRecorder.h.

◆ RegisterWindow()

void TRecorderReplaying::RegisterWindow ( Window_t w)

Creates mapping for the newly registered window w and adds this mapping to fWindowList.

Called by signal whenever a new window is registered during replaying.

The new window ID is mapped to the old one with the same number in the list of registered windows. It means that 1st new window is mapped to the 1st original, 2nd to the 2nd, Nth new to the Nth original.

Definition at line 491 of file TRecorder.cxx.

◆ RemapWindowReferences()

Bool_t TRecorderReplaying::RemapWindowReferences ( )
private

All references to the old windows (IDs) in fNextEvent are replaced by new ones according to the mappings in fWindowList.

Definition at line 559 of file TRecorder.cxx.

◆ Replay()

virtual Bool_t TRecorderState::Replay ( TRecorder * ,
const char * ,
Bool_t ,
TRecorder::EReplayModes  )
inlinevirtualinherited

Reimplemented in TRecorderInactive.

Definition at line 370 of file TRecorder.h.

◆ ReplayRealtime()

void TRecorderReplaying::ReplayRealtime ( )

Replays the next event.

It is called when fTimer times out. Every time fTimer is set again to time equal to time difference between current two events being replayed.

It can happen that execution of an event lasts different time during the recording and during the replaying. If fTimer times out too early and the previous event has not been yet replayed, it is usually postponed in order to keep events execution in the right order. The exceptions are determined by TRecorderReplaying::CanOverlap()

Definition at line 823 of file TRecorder.cxx.

◆ ReplayStop()

void TRecorderReplaying::ReplayStop ( TRecorder * r)
overridevirtual

Cancels replaying.

Reimplemented from TRecorderState.

Definition at line 910 of file TRecorder.cxx.

◆ Resume()

virtual void TRecorderState::Resume ( TRecorder * )
inlinevirtualinherited

Reimplemented in TRecorderPaused.

Definition at line 372 of file TRecorder.h.

◆ Start()

virtual void TRecorderState::Start ( TRecorder * ,
const char * ,
Option_t * ,
Window_t * ,
Int_t  )
inlinevirtualinherited

Reimplemented in TRecorderInactive.

Definition at line 368 of file TRecorder.h.

◆ Stop()

virtual void TRecorderState::Stop ( TRecorder * ,
Bool_t  )
inlinevirtualinherited

Reimplemented in TRecorderRecording.

Definition at line 369 of file TRecorder.h.

◆ Streamer()

void TRecorderReplaying::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TRecorderState.

◆ StreamerNVirtual()

void TRecorderReplaying::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 475 of file TRecorder.h.

◆ TRecorderInactive

friend class TRecorderInactive
friend

Definition at line 459 of file TRecorder.h.

◆ TRecorderPaused

friend class TRecorderPaused
friend

Definition at line 460 of file TRecorder.h.

Member Data Documentation

◆ fCanv

TCanvas* TRecorderReplaying::fCanv
private

Definition at line 411 of file TRecorder.h.

◆ fCmdEvent

TRecCmdEvent* TRecorderReplaying::fCmdEvent
private

Definition at line 423 of file TRecorder.h.

◆ fCmdTree

TTree* TRecorderReplaying::fCmdTree
private

Definition at line 418 of file TRecorder.h.

◆ fCmdTreeCounter

Int_t TRecorderReplaying::fCmdTreeCounter
private

Definition at line 428 of file TRecorder.h.

◆ fEventReplayed

Bool_t TRecorderReplaying::fEventReplayed
private

Definition at line 448 of file TRecorder.h.

◆ fExtraEvent

TRecExtraEvent* TRecorderReplaying::fExtraEvent
private

Definition at line 424 of file TRecorder.h.

◆ fExtraTree

TTree* TRecorderReplaying::fExtraTree
private

Definition at line 419 of file TRecorder.h.

◆ fExtraTreeCounter

Int_t TRecorderReplaying::fExtraTreeCounter
private

Definition at line 429 of file TRecorder.h.

◆ fFile

TFile* TRecorderReplaying::fFile
private

Definition at line 408 of file TRecorder.h.

◆ fFilterStatusBar

Bool_t TRecorderReplaying::fFilterStatusBar
private

Definition at line 456 of file TRecorder.h.

◆ fGuiEvent

TRecGuiEvent* TRecorderReplaying::fGuiEvent
private

Definition at line 422 of file TRecorder.h.

◆ fGuiTree

TTree* TRecorderReplaying::fGuiTree
private

Definition at line 417 of file TRecorder.h.

◆ fGuiTreeCounter

Int_t TRecorderReplaying::fGuiTreeCounter
private

Definition at line 427 of file TRecorder.h.

◆ fMutex

TMutex* TRecorderReplaying::fMutex
private

Definition at line 433 of file TRecorder.h.

◆ fNextEvent

TRecEvent* TRecorderReplaying::fNextEvent
private

Definition at line 437 of file TRecorder.h.

◆ fPreviousEventTime

TTime TRecorderReplaying::fPreviousEventTime
private

Definition at line 439 of file TRecorder.h.

◆ fRecorder

TRecorder* TRecorderReplaying::fRecorder
private

Definition at line 405 of file TRecorder.h.

◆ fRegWinCounter

Int_t TRecorderReplaying::fRegWinCounter
private

Definition at line 426 of file TRecorder.h.

◆ fShowMouseCursor

Bool_t TRecorderReplaying::fShowMouseCursor
private

Definition at line 454 of file TRecorder.h.

◆ fTimer

TTimer* TRecorderReplaying::fTimer
private

Definition at line 414 of file TRecorder.h.

◆ fWaitingForWindow

Bool_t TRecorderReplaying::fWaitingForWindow
private

Definition at line 442 of file TRecorder.h.

◆ fWin

ULong64_t TRecorderReplaying::fWin
private

Definition at line 421 of file TRecorder.h.

◆ fWindowList

TList* TRecorderReplaying::fWindowList
private

Definition at line 435 of file TRecorder.h.

◆ fWinTree

TTree* TRecorderReplaying::fWinTree
private

Definition at line 416 of file TRecorder.h.

◆ fWinTreeEntries

Int_t TRecorderReplaying::fWinTreeEntries
private

Definition at line 431 of file TRecorder.h.


The documentation for this class was generated from the following files: