16
13 June 2001 M.Al-Turany/Root2001 1 Mohammad Al- Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

Embed Size (px)

Citation preview

Page 1: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 1

Mohammad Al-Turany

Go4 GSI Darmstadt

13 June 2001

Page 2: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 2

Go4 Project

GSI object-oriented online-offline system

Go4

Requ

irem

en

ts

• GSI: Heavy Ion and Atomic Physics• various (~40) DAQ systems installed• small to medium sized experiments• on-line analysis required (Non-Blocking GUI)• GUI shall control running analysis

» Tasks and Threads• selected ROOT as framework

Page 3: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 3

Task Handler

Thread Manager

GUIEvent

Analysis

Display

Go4 package Overview

Page 4: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 4

CommandThread

StatusThread

DataThread

CommandThread

StatusThread

DataThread

WorkThread

WatcherThread

LoggingThread

ConnectorThread

LaunchThread

GUICallback

DataLoop

qu

eu

e

qu

eu

e

qu

eu

e

qu

eu

e

qu

eu

e

qu

eu

e

IP Network

DrawingThread

Display Task (Server)

Analysis Tasks (Client 1,2,...)

Ta

sk H

an

dle

rT

ask

Ha

nd

ler

Functional overview of the Go4

Page 5: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 5

• Analysis and GUI in separate tasks

• Multi-threading

• Communication through socket threads

• Object streaming by ROOT

• Use of ROOT native GUIs as well as Qt GUIs

Go4 features

Page 6: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 6

First Experiance with GUIGo4 Viewer

Features:

1. Remote: • Histogram API client for LEA, GOOSY and MBS servers at the GSI• Auto preview of histograms header data • Histograms can be directly imported into ROOT

2. Local:• Full functional file browser • Direct conversion of Ntuple and Hbook files to ROOT files

3. Archive:• API client for mass storage at the GSI

http://www-aix.gsi.de/~turany/Go4Viewer.htm

Page 7: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 7

First Experiance with GUIGo4 Viewer (Remote)

Page 8: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 8

First Experiance with GUIGo4 Viewer (Local)

Page 9: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 9

First Experiance with GUIGo4 Viewer (Archive)

Page 10: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 10

Go4 GUI Requirements

• Non Blocking GUI

• Dynamical exchange of data

between different windows

• Updating the status of a GUI window

even if it is not being displayed

• Possibility to restore the status

of a closed windowat any time

Page 11: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 11

Design of the Go4 GUI

0..1

0..10..1

0..1

0..1

0..1

0..1

0..1

0..n

0..n

0..1

0..1

0..1

TGo4QtGuiImp1

+TGo4QtGuiImp1(parent:QWidget *,name:const char *,modal:bool,fl:WFlags)

+~TGo4QtGuiImp1()

+DoTextButtom():void

+DoTextButtom2():void

+DoTextEntry():void

+DoTextButtom3():void

+textChangedStatus(:const QString &):void

TGo4Status

TGo4GUI1 STATUS

+~TGo4GUI1_STATUS()

+SetTextEntryStatus(text:Text_t *):void

+TGo4GUI1_STATUS(name:Text_t *,title:Text_t *)

+GetTextEntryStatus():Text_t *

TGo4SlotsBaseClass

TGo4GUI1 SLOTS

+CloseWidget():void

+TGo4GUI1_SLOTS(name:Text_t *,status_name:Text_t *,title:Text_t *,p:TGo4GUI1 *)

+~TGo4GUI1_SLOTS()

+SetGUIClass(GUI:TGo4GUIBaseClass *):void

+StatusChanged(s:TGo4Status *):void

+DoListBox():void

+DoRadioButton1():void

+DoRadioButton2():void

+DoTextEntry(text:char *):void

+DoTextButton():void

+GetStatusClass():TGo4Status *

TGo4Status

TGo4QtGuiImp1 STATUS

+~TGo4QtGuiImp1_STATUS()

+SetTextEntryStatus(text:Text_t *):void

+TGo4QtGuiImp1_STATUS(name:Text_t *,title:Text_t *)

+GetTextEntryStatus():Text_t *

TGo4SlotsBaseClass

TGo4QtGuiImp1 SLOTS

+CloseWidget():void

+TGo4QtGuiImp1_SLOTS(name:const char *,title:const char *,p:TGo4QtGuiImp1 *)

+~TGo4QtGuiImp1_SLOTS()

+StatusChanged(s:TGo4Status *):void

+SetGUIClass(GUI:QDialog *):void

+DoListBox():void

+DoRadioButton1():void

+DoRadioButton2():void

+DoTextEntry(text:char *):void

+DoTextButton():void

+GetStatusClass():TGo4Status *

QDialog

TGo4QtGui1

-~TGo4QtGui1()

+DoTextButtom():void

+DoTextButtom2():void

+DoTextEntry():void

+DoTextButtom3():void

+textChangedStatus(:const QString &):void

TGo4GUISingleton

#TGo4GUISingleton()

+RegisterDependentClass(p:TGo4SlotsBaseClass *,s:Text_t *):void

+RegisterSlotClass(p:TGo4SlotsBaseClass *,s:TGo4Status *):void

+GetSlotClass(name:const char *):TGo4SlotsBaseClass *

+GetStatusClass(name:const char *):TGo4Status *

+UnRegisterDependentClass(p:TGo4SlotsBaseClass *,name:Text_t *):void

+UpdateDependents(s:TGo4Status *):void

+UnRegisterClass(p:TGo4SlotsBaseClass *,s:TGo4Status *):void

+Instance():TGo4GUISingleton *

TObject

TGo4DependentList

+TGo4DependentList(name:Text_t *,p:TGo4SlotsBaseClass *,s:TGo4Status *)

+~TGo4DependentList()

TObject

TGo4RegisteredWindows

+TGo4RegisteredWindows(p:TGo4SlotsBaseClass *,s:TGo4Status *)

+~TGo4RegisteredWindows()

TGo4GUIBaseClass

TGo4GUI1

+TGo4GUI1(p:const TGWindow *,owner:TGo4DisplayBaseClass *,name:const Text_t *,w:UInt_t,h:UInt_t)

+GetTextEntryBuffer():const char *

+SetTextEntryBuffer(text:const char *):void

+Close():void

+~TGo4GUI1()

Root GUI

Qt

GU

I

Page 12: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 12

Registering a slot objects

Page 13: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 13

fxTGo4GUISingleton

TGo4GUISingleton

fxTGo4GUI2_SLOTS

TGo4GUI2_SLOTS

Object1 initial

TGo4GUI2

if(fxTGo4GUI2_SLOTS !=0)

else

if(fxTGo4GUI2_SLOTS !=0)

else

GetSlotClass(const char *):TGo4SlotsBaseClass *

GetStatusClass(const char *):TGo4Status *

GetStatusClass():TGo4Status *

<constructor>("TGo4GUI2_SLOTS", "Gui No. 2", this)

SetGUIClass(this):void

<constructor>

Getting a registered slot objects pointer

Page 14: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 14

Object1

initial

TGo4GUI4_SLOTS

fxTGo4GUISingleton

TGo4GUISingleton

for(i=0i<= DependanceList->GetLast();i++)

if(fxElement->fxRegisteredStatusClass == s)

DependanceList

TObjArray

anonymous

TGo4SlotsBaseClass

for(i=0i<= DependanceList->GetLast();i++)

if(fxElement->fxRegisteredStatusClass == s)

StatusChanged(s):void

At(i):TObject *

UpdateDependents(fxTGo4GUI4_STATUS):void

DoListBox():void

Updating dependents objects

Page 15: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 15

Object1

initial

TGo4GUISingleton

for(i=0i<= SlotClassList->GetLast();i++)

if(!strcmp(name ,fxTGo4RegisteredWindows->fxRegisteredStatusClass->GetName()))

SlotClassList

TObjArray

p

TGo4SlotsBaseClass

fName

TString

DependanceList

TObjArray

for(i=0i<= SlotClassList->GetLast();i++)

if(!strcmp(name ,fxTGo4RegisteredWindows->fxRegisteredStatusClass->GetName()))

Data():const char *

Add(new TGo4DependentList (name,p,fxStatus)):void

GetName():const char *

At(i):TObject *

RegisterDependentClass(TGo4SlotsBaseClass *,Text_t *):void

AddLast(obj):void

Register a dependent object

Page 16: 13 June 2001M.Al-Turany/Root20011 Mohammad Al-Turany Go4 GSI Darmstadt 13 June 2001

13 June 2001 M.Al-Turany/Root2001 16

Conclusions

• This Design was implemented and tested with ROOT widgets and/or Qt widgets successfully

• The Qt-ROOT interface was tested successfully in the multi-tasking and multi-threading environment of the Go4

• Base Classes for building GUIs were designed and implemented

go4.gsi.de