v2.10-0 (21000JUN2005)

Go4GUIRegistry
Class TGo4GUIRegistry


class TGo4GUIRegistry

A static Singleton which acts as a registry for all GUIs in the Go4 Project. Each GUI Window will register its slot and Status objects by this Registry when created.

If the Widget window where deleted with out unregistering the slot and the status objects, it will get the pointer to them from this registry when created (Widget) again.
It also serves as command an object dispatcher, which is responsible for delivering objects coming from the analysis to the recievers on the GUI side

Author:
Mohammad Al-Turany
Since: 10.04.2001

Field Summary
 private TObjArrayDependenceList
           
 private Bool_tfbAnalysisReady
          This flag indicates if analysis client is connected and ready.
 private Bool_tfbAnaSettingsReady
          This flag indicates if analysis settings were initialized.
 private Int_tfiClientRole
          Set the role of last login.
 private QWidget*fxCentralWindow
           
 private TStringfxClientHost
          remember nodename of the started analysis client
 private TStringfxClientPassword
          remember password of last login to nalysis client
 private TStringfxClientProgram
          remember program name of analysis client
 private TStringfxClientShell
          remember shell command used for starting analysis client
 private TGo4SlotsBaseClass*fxDisplayAnalysisConfig
           
 private TGo4SlotsBaseClass*fxDisplayStatusMonitor
           
 private static TGo4GUIRegistry*fxInstance
           
 private TGo4SlotsBaseClass*fxLogInfo
           
 private QWidget*fxMainWindow
           
 private TGo4SlotsBaseClass*fxMemBrowser
           
 private TGo4Display*fxTGo4Display
           
 private TObjArraySlotClassList
           
 private TObjArraySubmittedCommandsList
           

Constructor Summary
 protected TGo4GUIRegistry()
           

Destructor Summary
 virtual synchronized ~TGo4GUIRegistry()
           

Method Summary
 voidDisplayData(TNamed* )
           
 voidDisplayLog(TGo4Status* )
           
 private TGo4SubmittedCommandsEntry*FindCmdEntry(const char * name, Bool_t force)
           
 QWidget*GetCentralWindow()
           
 const const char *GetClientNode()
           
 const const char *GetClientPassword()
           
 const const char *GetClientProgram()
           
 Int_tGetClientRole()
           
 const const char *GetClientShell()
           
 const TGo4Display*GetDisplay()
           
 QWidget*GetGUIClass(TGo4SlotsBaseClass* SlotClass)
           
 QWidget*GetMainWindow()
           
 TGo4SlotsBaseClass*GetSlotClass(const char * name)
           
 TGo4SlotsBaseClass*GetSlotClass(TGo4SlotsBaseClass* SlotClass)
           
 TGo4Status*GetStatus(const char * name)
           
 voidGuiIsChanged(TGo4SlotsBaseClass* SlotClass, QWidget* GUI)
           
 static TGo4GUIRegistry*Instance()
           
 const Bool_tIsAnalysisReady()
           
 const Bool_tIsAnaSettingsReady()
           
 TGo4Command*MakeCommand(const char * name)
          Method using internal command prototype list to produce a clone
of the specified command
 voidReDirectObject(const char * ObjectName, TGo4SlotsBaseClass* p, bool Monitor, TQRootCanvas* c, TPad* pad)
          This can be used to redirect any object send from the analysis to the GUI,

if this method is called more than once with the same object name but different

receivers or canvases, then new entries will be generated in the registry and the

remote object will be delivered to the different receivers or canvases.
 voidRegisterDependentClass(TGo4SlotsBaseClass* , const char * )
           
 voidRegisterSlotClass(TGo4SlotsBaseClass* p, TGo4Status* s, QWidget* GUI)
           
 voidRemoveFromSubmittedList(const char * Name)
          this will remove the all entries of submitted commands of the Object "Name" from the registry
 voidRemoveFromSubmittedList(const char * Name, TGo4SlotsBaseClass* p)
          this will remove the all entries of submitted commands of the Object "Name" having "p" as reciver
from the registry
 voidRemoveFromSubmittedList(const char * Name, TQRootCanvas* c)
          this will remove the all entries of submitted commands of the Object "Name" having "c" as reciver
from the registry
 private voidRemoveFromSubmittedList(TGo4SubmittedCommandsEntry* Entry)
           
 voidRemoveRedirectEntry(const char * Name)
          this will remove the all redirections of the Object "Name" from the registry
 voidRemoveRedirectEntry(const char * Name, TGo4SlotsBaseClass* p)
          this will remove the all redirections to the receiver "p"
 voidRemoveRedirectEntry(const char * Name, TQRootCanvas* c)
          this will remove the all redirections to the receiver "c"
 voidSetAnalysisReady(Bool_t on)
           
 voidSetAnaSettingsReady(Bool_t on)
           
 voidSetCentralWindow(QWidget* widget)
           
 voidSetClientNode(const char * host)
           
 voidSetClientPassword(const Text_t* passwd)
           
 voidSetClientProgram(const Text_t* exec)
           
 voidSetClientRole(Int_t role)
           
 voidSetClientShell(const Text_t* txt)
           
 voidSetDisplay(TGo4Display* )
           
 voidSetDisplayAnalysisConfig(TGo4SlotsBaseClass* p)
           
 voidSetDisplayStatusMonitor(TGo4SlotsBaseClass* )
           
 voidSetLogInfo(TGo4SlotsBaseClass* )
           
 voidSetMainWindow(QWidget* widget)
           
 voidSetMasterMode(Int_t role)
          Change appereance of gui according to role
 voidSetMemoryBrowser(TGo4SlotsBaseClass* browser)
           
 voidStartAnalysisWindow(const char * text)
           
 voidStopMonitoring()
          Stop monitoring list and clear remote browser.
 voidSubmitCommand(const char * name)
          send command specified by name to the current client task
 voidSubmitCommand(TGo4Command* com, const char * ObjectName, TGo4SlotsBaseClass* p, Bool_t Monitor, TQRootCanvas* c, TPad* pad)
          send given command to the current client task

TGo4Command* com: The Command to be Submitted

const char * ObjectName=0 : Name of this Command

TGo4SlotsBaseClass *p=0: Slots Class which will recieve the result of this command

bool Monitor=kFALSE : flag t indicate if this command should be send once or continously

TQRootCanvas *c=0 : The canvas which will be used to draw the results of this command (if any)

TPad *pad=0 : The Pad which will be used to draw the results of this command (if any)
 voidSubmitCommand(const char * name, TGo4SlotsBaseClass* p)
           
 voidSubmitEmergencyCommand(Int_t val)
           
 voidUnRegisterClass(TGo4SlotsBaseClass* p, TGo4Status* s)
           
 voidUnRegisterDependentClass(TGo4SlotsBaseClass* p, const char * name)
           
 voidUpdateDependents(TGo4Status* s)
           

Field Detail

DependenceList

private TObjArray DependenceList

fbAnalysisReady

private Bool_t fbAnalysisReady
This flag indicates if analysis client is connected and ready.

fbAnaSettingsReady

private Bool_t fbAnaSettingsReady
This flag indicates if analysis settings were initialized.

fiClientRole

private Int_t fiClientRole
Set the role of last login.

fxCentralWindow

private QWidget* fxCentralWindow

fxClientHost

private TString fxClientHost
remember nodename of the started analysis client

fxClientPassword

private TString fxClientPassword
remember password of last login to nalysis client

fxClientProgram

private TString fxClientProgram
remember program name of analysis client

fxClientShell

private TString fxClientShell
remember shell command used for starting analysis client

fxDisplayAnalysisConfig

private TGo4SlotsBaseClass* fxDisplayAnalysisConfig

fxDisplayStatusMonitor

private TGo4SlotsBaseClass* fxDisplayStatusMonitor

fxInstance

private static TGo4GUIRegistry* fxInstance

fxLogInfo

private TGo4SlotsBaseClass* fxLogInfo

fxMainWindow

private QWidget* fxMainWindow

fxMemBrowser

private TGo4SlotsBaseClass* fxMemBrowser

fxTGo4Display

private TGo4Display* fxTGo4Display

SlotClassList

private TObjArray SlotClassList

SubmittedCommandsList

private TObjArray SubmittedCommandsList
Constructor Detail

TGo4GUIRegistry

protected TGo4GUIRegistry()
Method Detail

~TGo4GUIRegistry

public virtual synchronized ~TGo4GUIRegistry()
Method Detail

DisplayData

public void DisplayData(TNamed* )

DisplayLog

public void DisplayLog(TGo4Status* )

FindCmdEntry

private TGo4SubmittedCommandsEntry* FindCmdEntry(const char * name, Bool_t force)

GetCentralWindow

public QWidget* GetCentralWindow()

GetClientNode

public const const char * GetClientNode()

GetClientPassword

public const const char * GetClientPassword()

GetClientProgram

public const const char * GetClientProgram()

GetClientRole

public Int_t GetClientRole()

GetClientShell

public const const char * GetClientShell()

GetDisplay

public const TGo4Display* GetDisplay()

GetGUIClass

public QWidget* GetGUIClass(TGo4SlotsBaseClass* SlotClass)

GetMainWindow

public QWidget* GetMainWindow()

GetSlotClass

public TGo4SlotsBaseClass* GetSlotClass(const char * name)

GetSlotClass

public TGo4SlotsBaseClass* GetSlotClass(TGo4SlotsBaseClass* SlotClass)

GetStatus

public TGo4Status* GetStatus(const char * name)

GuiIsChanged

public void GuiIsChanged(TGo4SlotsBaseClass* SlotClass, QWidget* GUI)

Instance

public static TGo4GUIRegistry* Instance()

IsAnalysisReady

public const Bool_t IsAnalysisReady()

IsAnaSettingsReady

public const Bool_t IsAnaSettingsReady()

MakeCommand

public TGo4Command* MakeCommand(const char * name)
Method using internal command prototype list to produce a clone
of the specified command

ReDirectObject

public void ReDirectObject(const char * ObjectName, TGo4SlotsBaseClass* p, bool Monitor, TQRootCanvas* c, TPad* pad)
This can be used to redirect any object send from the analysis to the GUI,

if this method is called more than once with the same object name but different

receivers or canvases, then new entries will be generated in the registry and the

remote object will be delivered to the different receivers or canvases.

RegisterDependentClass

public void RegisterDependentClass(TGo4SlotsBaseClass* , const char * )

RegisterSlotClass

public void RegisterSlotClass(TGo4SlotsBaseClass* p, TGo4Status* s, QWidget* GUI)

RemoveFromSubmittedList

public void RemoveFromSubmittedList(const char * Name)
this will remove the all entries of submitted commands of the Object "Name" from the registry

RemoveFromSubmittedList

public void RemoveFromSubmittedList(const char * Name, TGo4SlotsBaseClass* p)
this will remove the all entries of submitted commands of the Object "Name" having "p" as reciver
from the registry

RemoveFromSubmittedList

public void RemoveFromSubmittedList(const char * Name, TQRootCanvas* c)
this will remove the all entries of submitted commands of the Object "Name" having "c" as reciver
from the registry

RemoveFromSubmittedList

private void RemoveFromSubmittedList(TGo4SubmittedCommandsEntry* Entry)

RemoveRedirectEntry

public void RemoveRedirectEntry(const char * Name)
this will remove the all redirections of the Object "Name" from the registry

RemoveRedirectEntry

public void RemoveRedirectEntry(const char * Name, TGo4SlotsBaseClass* p)
this will remove the all redirections to the receiver "p"

RemoveRedirectEntry

public void RemoveRedirectEntry(const char * Name, TQRootCanvas* c)
this will remove the all redirections to the receiver "c"

SetAnalysisReady

public void SetAnalysisReady(Bool_t on)

SetAnaSettingsReady

public void SetAnaSettingsReady(Bool_t on)

SetCentralWindow

public void SetCentralWindow(QWidget* widget)

SetClientNode

public void SetClientNode(const char * host)

SetClientPassword

public void SetClientPassword(const Text_t* passwd)

SetClientProgram

public void SetClientProgram(const Text_t* exec)

SetClientRole

public void SetClientRole(Int_t role)

SetClientShell

public void SetClientShell(const Text_t* txt)

SetDisplay

public void SetDisplay(TGo4Display* )

SetDisplayAnalysisConfig

public void SetDisplayAnalysisConfig(TGo4SlotsBaseClass* p)

SetDisplayStatusMonitor

public void SetDisplayStatusMonitor(TGo4SlotsBaseClass* )

SetLogInfo

public void SetLogInfo(TGo4SlotsBaseClass* )

SetMainWindow

public void SetMainWindow(QWidget* widget)

SetMasterMode

public void SetMasterMode(Int_t role)
Change appereance of gui according to role

SetMemoryBrowser

public void SetMemoryBrowser(TGo4SlotsBaseClass* browser)

StartAnalysisWindow

public void StartAnalysisWindow(const char * text)

StopMonitoring

public void StopMonitoring()
Stop monitoring list and clear remote browser. Needed
to reset gui in case of disconnect.

SubmitCommand

public void SubmitCommand(const char * name)
send command specified by name to the current client task

SubmitCommand

public void SubmitCommand(TGo4Command* com, const char * ObjectName, TGo4SlotsBaseClass* p, Bool_t Monitor, TQRootCanvas* c, TPad* pad)
send given command to the current client task

TGo4Command* com: The Command to be Submitted

const char * ObjectName=0 : Name of this Command

TGo4SlotsBaseClass *p=0: Slots Class which will recieve the result of this command

bool Monitor=kFALSE : flag t indicate if this command should be send once or continously

TQRootCanvas *c=0 : The canvas which will be used to draw the results of this command (if any)

TPad *pad=0 : The Pad which will be used to draw the results of this command (if any)

SubmitCommand

public void SubmitCommand(const char * name, TGo4SlotsBaseClass* p)

SubmitEmergencyCommand

public void SubmitEmergencyCommand(Int_t val)

UnRegisterClass

public void UnRegisterClass(TGo4SlotsBaseClass* p, TGo4Status* s)

UnRegisterDependentClass

public void UnRegisterDependentClass(TGo4SlotsBaseClass* p, const char * name)

UpdateDependents

public void UpdateDependents(TGo4Status* s)

Association Links

to Class TGo4GUIRegistry

to Class TObjArray

to Class TObjArray

to Class TObjArray

to Class TGo4SlotsBaseClass

to Class TGo4SlotsBaseClass

to Class TGo4SlotsBaseClass

to Class TGo4SlotsBaseClass

to Class TGo4Display

PatternLink_Detail

to Class TGo4GUIRegistry

shapeType PatternLink
link
pattern Singleton
supplierRole Singleton factory

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005