ROOT logo
ROOT » GUI » RECORDER » TRecorderReplaying

class TRecorderReplaying: public TRecorderState

 Represents state of TRecorder when replaying

Function Members (Methods)

public:
TRecorderReplaying(const TRecorderReplaying&)
static TClass*Class()
virtual voidContinue()
virtual TRecorder::ERecorderStateGetState() const
virtual TClass*IsA() const
virtual voidTRecorderState::ListCmd(const char*)
virtual voidTRecorderState::ListGui(const char*)
TRecorderReplaying&operator=(const TRecorderReplaying&)
virtual voidPause(TRecorder* r)
virtual voidTRecorderState::PrevCanvases(const char*, Option_t*)
voidRegisterWindow(Window_t w)
virtual Bool_tTRecorderState::Replay(TRecorder*, const char*, Bool_t, TRecorder::EReplayModes)
voidReplayRealtime()
virtual voidReplayStop(TRecorder* r)
virtual voidTRecorderState::Resume(TRecorder*)
virtual voidShowMembers(TMemberInspector&)
virtual voidTRecorderState::Start(TRecorder*, const char*, Option_t*, Window_t*, Int_t)
virtual voidTRecorderState::Stop(TRecorder*, Bool_t)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
protected:
TRecorderReplaying(const char* filename)
voidTRecorderState::ChangeState(TRecorder* r, TRecorderState* s, Bool_t deletePreviousState)
Bool_tInitialize(TRecorder* r, Bool_t showMouseCursor, TRecorder::EReplayModes mode)

Data Members

private:
TCanvas*fCanvUsed to record the previous canvases
TRecCmdEvent*fCmdEventCommandline event being currently replayed
TTree*fCmdTreeTTree with recorded commandline events
Int_tfCmdTreeCounterCounter of commandline events that have been replayed
Bool_tfEventReplayedSignalizes that the last event sent to the replaying has been already replayed.
TRecExtraEvent*fExtraEventExtra event being currently replayed
TTree*fExtraTreeTTree with recorded extra events (PaveLabels and Texts)
Int_tfExtraTreeCounterCounter of extra events that have been replayed
TFile*fFileROOT file which the recorded events are being read from
Bool_tfFilterStatusBarSpecial flag to filter status bar element
TRecGuiEvent*fGuiEventGUI event being currently replayed
TTree*fGuiTreeTTree with recorded GUI events
Int_tfGuiTreeCounterCounter of GUI events that have been replayed
TMutex*fMutex
TRecEvent*fNextEventThe next event that is going to be replayed (GUI event or commandline)
TTimefPreviousEventTimeExecution time of the previously replayed event.
TRecorder*fRecorderReference to recorder (owner of this state) is kept in order to switch
Int_tfRegWinCounterCounter of registered windows when replaying
Bool_tfShowMouseCursorSpecifies if mouse cursor should be also replayed
TTimer*fTimerTimer used for replaying
Bool_tfWaitingForWindowSignalizes that we wait for a window to be registered in order
ULong64_tfWinWindow ID being currenty mapped
TTree*fWinTreeTTree with recorded windows (=registered during recording)
Int_tfWinTreeEntriesNumber of registered windows during _recording_
TList*fWindowListList of TRecWinPair objects. Mapping of window IDs is stored here.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRecorderReplaying(const char* filename)
 Allocates all necessary data structures used for replaying
 What is allocated here is deleted in destructor
Bool_t Initialize(TRecorder* r, Bool_t showMouseCursor, TRecorder::EReplayModes mode)
 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
void 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.
Bool_t RemapWindowReferences()
 All references to the old windows (IDs) in fNextEvent are replaced by
 new ones according to the mappings in fWindowList
Bool_t FilterEvent(TRecGuiEvent* e)
Bool_t PrepareNextEvent()
 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)
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
void 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 excpetions are determined by TRecorderReplaying::CanOverlap()

void Pause(TRecorder* r)
 Pauses replaying
void ReplayStop(TRecorder* r)
 Cancels replaying
void Continue()
 Continues previously paused replaying
TRecorder & operator=(const TRecorderReplaying& )
TRecorder::ERecorderState GetState() const
 Gets current state of recorder
TRecorderReplaying(const char* filename)