v2.10-0 (21000JUN2005)

Go4GUI
Class TGo4PreviewPanelSlots


class TGo4PreviewPanelSlots
derived from TGo4SlotsBaseClass

Author:
Mohammad Al-Turany, J.Adamczewski

Field Summary
 private Bool_tfbCreateNewMarker
          if true, each mouse pick will create new marker (window, respectively).
otherwise move last marker to new pick location
 private Bool_tfbPickAgain
          if true, continue with previous mouse mode. otherwise reset to root mode
 private Bool_tfbTwoDimRegion
          true if next window region to create is 2 dimensional
 private Go4MouseMode_tfiMouseMode
          This switches mouse modes:
see Go4MouseModes.h
 private UInt_tfuPickCounter
          number of clicks for multipick (regions)
 private TList*fxArrowCleanups
          cleanup list of arrow objects
 private TList*fxArrowList
          list of temporary arrow objects
 private TList*fxLateXCleanups
          cleanup list of latex objects
 private TList*fxLateXList
          list of temporary latex objects (text markers)
 private TList*fxLegendCleanups
          cleanup list of legend objects
 private TList*fxMarkerList
          list of temporary markers set
 private TVirtualPadEditor*fxPeditor
          root pad editor for this viewpanel
 private TList*fxPolygonList
          list of temporary polygons (poly conditions)
 private TList*fxRegionList
          list of temporary regions (window conditions)
 private TStringfxSelectedName
          keep name of last selected object.
 private TGo4GUIRegistry*fxTGo4GUIRegistry
           
 private TGo4PreviewPanel*fxTGo4PreviewPanel
           
 private TGo4PreviewPanelStatus*fxTGo4PreviewPanelStatus
           

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
TGo4PreviewPanelSlots(const char * name, const char * title, TGo4PreviewPanel* p)
           

Destructor Summary
 virtual synchronized ~TGo4PreviewPanelSlots()
           

Method Summary
 voidActivateSelectedObject(TVirtualPad* pad)
          Scan pad for selected object and activate it in
the corresponding list of markers,windows,latexes
 Bool_tAddArrow(TArrow* arr, TVirtualPad* pad, Bool_t clone)
          register arrrow object of current pad into list of arrow labels.
 Bool_tAddLatex(TLatex* lax, TVirtualPad* pad, Bool_t clone)
          register latex object of current pad into list of latex labels.
 Bool_tAddMarker(TGo4Marker* mk, TVirtualPad* pad, Bool_t clone)
          register marker object of current pad into list of crossmarkers.
 virtual voidAddObject(TNamed* , TQRootCanvas* c, TPad* p)
           
 Bool_tAddPolygon(TGo4PolyCond* con, TVirtualPad* pad, Bool_t clone)
          register polygon condition object of current pad into list of regions.
 Bool_tAddRegion(TGo4WinCond* con, TVirtualPad* pad, Bool_t clone)
          register window condition object of current pad into list of regions.
 voidBuildPadEditor(TQRootWindow* parent)
          build the root pad editor inside Qt parent frame
 voidCleanupPadEditor()
          remove subeditors in root cache for this viewpanel.
 voidClearAllLabels(TVirtualPad* pad)
          In case of pad clear, delete all
markers and region labels from viewpanel list
that are assigned to pad.
 voidClearLegend(TVirtualPad* pad, Bool_t del)
          Remove any Legend on pad.
 private TGo4MarkerSetup*CreateMarkerSetup(TVirtualPad* pad)
          Create status of current viewpanel markers.
 voidDivideCanvas(int X, int Y)
           
 voidDrawLegend(TVirtualPad* pad, TObject* ob)
          Draw a new Legend for object ob on pad.
 TLatex*GetActiveLatex(TVirtualPad* pad)
          Get latex object in list which is active for edit on the pad
 const const Text_t*GetActiveLatexName(TVirtualPad* pad)
          Name of active latex for gui display
 TGo4Marker*GetActiveMarker(TVirtualPad* pad)
          Get marker in list which is active for edit
 const const Text_t*GetActiveMarkerName(TVirtualPad* pad)
          Name of active marker for gui display
 TGo4PolyCond*GetActivePolygon(TVirtualPad* pad)
          Get polygon in list which is active for edit
 const const Text_t*GetActivePolygonName(TVirtualPad* pad)
          Name of active polygon for gui display
 TGo4WinCond*GetActiveRegion(TVirtualPad* pad)
          Get region in list which is active for edit
 const const Text_t*GetActiveRegionName(TVirtualPad* pad)
          Name of active region for gui display
 TCanvas*GetCanvas()
           
 Go4MouseMode_tGetMouseMode()
           
 const const Text_t*GetSelectedName()
          Name of last mouse selected object.
 TGo4Status*GetStatus()
           
 voidInformUpdatePad(TPad* Pad)
          Inform other widgets (like fitpanel)
that something change in the pad
 Bool_tIsCreateNewMarker()
           
 Bool_tIsPickAgain()
           
 voidLoadMarkerSetup(const Text_t* filename, const Text_t* statusname, TVirtualPad* pad)
          Load status of current viewpanel markers from root file filename
and draw them into destination pad pad.
 voidLogMarkers(Option_t* opt)
          Log values of all markers to terminal or logfile
 voidMouseClick(TPad* pad)
          called when mouse clicks on pad (left button press)
 voidRedrawAllLabels(TVirtualPad* pad)
          In case of histogram redraw, restore all
markers and region labels for pad
 voidResetFillColors(TVirtualPad* pad, Color_t col)
          For canvas saving: reset all fill colors of pad to existing root color
number.
 voidResetPickCounter()
           
 voidSaveMarkerSetup(const Text_t* filename, const Text_t* statusname, TVirtualPad* pad)
          Save status of current viewpanel markers to root file filename.
optionally, name of setup statusname may be defined
 voidScanCutG(TVirtualPad* pad, TGo4PolyCond* toupdate)
          Scan pad for a newly created CutG and put it into
a polygon condition toupdate.
 voidScanMarkers(TVirtualPad* pad)
          Scan all Markers in pad and add new ones to lists.
 voidSetCreateNewMarker(Bool_t on)
           
 voidSetGUI(TGo4PreviewPanel* GUI)
           
 private voidSetMarkerSetup(TGo4MarkerSetup* state, TVirtualPad* pad)
          Arrange markers of current viewpanel from external setup.
currently, all markers are put into destination pad pad.
 voidSetMarkersHistogram()
          Update histogram reference for all markers
 voidSetMouseMode(Go4MouseMode_t mode)
           
 voidSetPickAgain(Bool_t on)
           
 voidSetPolygonsHistogram()
          Update histogram reference for all polygon regions
 voidSetRegionsHistogram()
          Update histogram reference for all window regions
 voidUpdatePad(TPad* Pad, TH1* h1, Bool_t updatemarkers, Bool_t updateoptions)
          Synchronize padoptions of pad with setup of root histogram h1.
if updatemarkers is true, also do scan graph markers and assign
their work histogram.
 voidUpdatePad(TPad* Pad, THStack* h1, Bool_t updatemarkers)
           

Methods inherited from class Go4GUIBase.TGo4SlotsBaseClass
AddObject, AddObjectToLocalList, AddObjectToRemoteList, StatusChanged

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Print, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbCreateNewMarker

private Bool_t fbCreateNewMarker
if true, each mouse pick will create new marker (window, respectively).
otherwise move last marker to new pick location

fbPickAgain

private Bool_t fbPickAgain
if true, continue with previous mouse mode. otherwise reset to root mode

fbTwoDimRegion

private Bool_t fbTwoDimRegion
true if next window region to create is 2 dimensional

fiMouseMode

private Go4MouseMode_t fiMouseMode
This switches mouse modes:
see Go4MouseModes.h

fuPickCounter

private UInt_t fuPickCounter
number of clicks for multipick (regions)

fxArrowCleanups

private TList* fxArrowCleanups
cleanup list of arrow objects

fxArrowList

private TList* fxArrowList
list of temporary arrow objects

fxLateXCleanups

private TList* fxLateXCleanups
cleanup list of latex objects

fxLateXList

private TList* fxLateXList
list of temporary latex objects (text markers)

fxLegendCleanups

private TList* fxLegendCleanups
cleanup list of legend objects

fxMarkerList

private TList* fxMarkerList
list of temporary markers set

fxPeditor

private TVirtualPadEditor* fxPeditor
root pad editor for this viewpanel

fxPolygonList

private TList* fxPolygonList
list of temporary polygons (poly conditions)

fxRegionList

private TList* fxRegionList
list of temporary regions (window conditions)

fxSelectedName

private TString fxSelectedName
keep name of last selected object.

fxTGo4GUIRegistry

private TGo4GUIRegistry* fxTGo4GUIRegistry
supplierCardinality 1

fxTGo4PreviewPanel

private TGo4PreviewPanel* fxTGo4PreviewPanel

fxTGo4PreviewPanelStatus

private TGo4PreviewPanelStatus* fxTGo4PreviewPanelStatus
Constructor Detail

TGo4PreviewPanelSlots

public TGo4PreviewPanelSlots(const char * name, const char * title, TGo4PreviewPanel* p)
Method Detail

~TGo4PreviewPanelSlots

public virtual synchronized ~TGo4PreviewPanelSlots()
Method Detail

ActivateSelectedObject

public void ActivateSelectedObject(TVirtualPad* pad)
Scan pad for selected object and activate it in
the corresponding list of markers,windows,latexes

AddArrow

public Bool_t AddArrow(TArrow* arr, TVirtualPad* pad, Bool_t clone)
register arrrow object of current pad into list of arrow labels.
If option clone is true, register a clone of arr
Return value is true if object was already in registry before

AddLatex

public Bool_t AddLatex(TLatex* lax, TVirtualPad* pad, Bool_t clone)
register latex object of current pad into list of latex labels.
If option clone is true, register a clone of lax
(for TLatex labels created with mouse popup menu)
Return value is true if object was already in registry before

AddMarker

public Bool_t AddMarker(TGo4Marker* mk, TVirtualPad* pad, Bool_t clone)
register marker object of current pad into list of crossmarkers.
If option clone is true, register a clone of arr
Return value is true if object was already in registry before

AddObject

public virtual void AddObject(TNamed* , TQRootCanvas* c, TPad* p)

AddPolygon

public Bool_t AddPolygon(TGo4PolyCond* con, TVirtualPad* pad, Bool_t clone)
register polygon condition object of current pad into list of regions.
If option clone is true, register a clone of arr
Return value is true if object was already in registry before

AddRegion

public Bool_t AddRegion(TGo4WinCond* con, TVirtualPad* pad, Bool_t clone)
register window condition object of current pad into list of regions.
If option clone is true, register a clone of arr
Return value is true if object was already in registry before

BuildPadEditor

public void BuildPadEditor(TQRootWindow* parent)
build the root pad editor inside Qt parent frame

CleanupPadEditor

public void CleanupPadEditor()
remove subeditors in root cache for this viewpanel.
Should be done when leaving the viewpanel on leaveEvent

ClearAllLabels

public void ClearAllLabels(TVirtualPad* pad)
In case of pad clear, delete all
markers and region labels from viewpanel list
that are assigned to pad. If pad=0, clear everything

ClearLegend

public void ClearLegend(TVirtualPad* pad, Bool_t del)
Remove any Legend on pad. If del is true, also delete
legend in pad options

CreateMarkerSetup

private TGo4MarkerSetup* CreateMarkerSetup(TVirtualPad* pad)
Create status of current viewpanel markers.

DivideCanvas

public void DivideCanvas(int X, int Y)

DrawLegend

public void DrawLegend(TVirtualPad* pad, TObject* ob)
Draw a new Legend for object ob on pad. If ob is a THStack,
legend includes all histograms.

GetActiveLatex

public TLatex* GetActiveLatex(TVirtualPad* pad)
Get latex object in list which is active for edit on the pad

GetActiveLatexName

public const const Text_t* GetActiveLatexName(TVirtualPad* pad)
Name of active latex for gui display

GetActiveMarker

public TGo4Marker* GetActiveMarker(TVirtualPad* pad)
Get marker in list which is active for edit

GetActiveMarkerName

public const const Text_t* GetActiveMarkerName(TVirtualPad* pad)
Name of active marker for gui display

GetActivePolygon

public TGo4PolyCond* GetActivePolygon(TVirtualPad* pad)
Get polygon in list which is active for edit

GetActivePolygonName

public const const Text_t* GetActivePolygonName(TVirtualPad* pad)
Name of active polygon for gui display

GetActiveRegion

public TGo4WinCond* GetActiveRegion(TVirtualPad* pad)
Get region in list which is active for edit

GetActiveRegionName

public const const Text_t* GetActiveRegionName(TVirtualPad* pad)
Name of active region for gui display

GetCanvas

public TCanvas* GetCanvas()

GetMouseMode

public Go4MouseMode_t GetMouseMode()

GetSelectedName

public const const Text_t* GetSelectedName()
Name of last mouse selected object.

GetStatus

public TGo4Status* GetStatus()

InformUpdatePad

public void InformUpdatePad(TPad* Pad)
Inform other widgets (like fitpanel)
that something change in the pad

IsCreateNewMarker

public Bool_t IsCreateNewMarker()

IsPickAgain

public Bool_t IsPickAgain()

LoadMarkerSetup

public void LoadMarkerSetup(const Text_t* filename, const Text_t* statusname, TVirtualPad* pad)
Load status of current viewpanel markers from root file filename
and draw them into destination pad pad.
Optionally, name of setup statusname may be defined. If destination pad
is not specified, the active pad is chosen.

LogMarkers

public void LogMarkers(Option_t* opt)
Log values of all markers to terminal or logfile

MouseClick

public void MouseClick(TPad* pad)
called when mouse clicks on pad (left button press)

RedrawAllLabels

public void RedrawAllLabels(TVirtualPad* pad)
In case of histogram redraw, restore all
markers and region labels for pad

ResetFillColors

public void ResetFillColors(TVirtualPad* pad, Color_t col)
For canvas saving: reset all fill colors of pad to existing root color
number. With go4 defined color palette, there are problems
restoring the canvas from an ordinary root file. Later,
we might store custom go4 palette somewhere.

ResetPickCounter

public void ResetPickCounter()

SaveMarkerSetup

public void SaveMarkerSetup(const Text_t* filename, const Text_t* statusname, TVirtualPad* pad)
Save status of current viewpanel markers to root file filename.
optionally, name of setup statusname may be defined

ScanCutG

public void ScanCutG(TVirtualPad* pad, TGo4PolyCond* toupdate)
Scan pad for a newly created CutG and put it into
a polygon condition toupdate. If no polygonconditon is
specified, create new condition and add it to our list.

ScanMarkers

public void ScanMarkers(TVirtualPad* pad)
Scan all Markers in pad and add new ones to lists.
To handle latex objects created by mouse button popups.
arrow objects by root editor mode, and go4 markers/conditions
imported by canvas loading

SetCreateNewMarker

public void SetCreateNewMarker(Bool_t on)

SetGUI

public void SetGUI(TGo4PreviewPanel* GUI)

SetMarkerSetup

private void SetMarkerSetup(TGo4MarkerSetup* state, TVirtualPad* pad)
Arrange markers of current viewpanel from external setup.
currently, all markers are put into destination pad pad.
If destination pad is not specified, the active pad is chosen.
Later on, we might identify subpads of canvas by id?

SetMarkersHistogram

public void SetMarkersHistogram()
Update histogram reference for all markers

SetMouseMode

public void SetMouseMode(Go4MouseMode_t mode)

SetPickAgain

public void SetPickAgain(Bool_t on)

SetPolygonsHistogram

public void SetPolygonsHistogram()
Update histogram reference for all polygon regions

SetRegionsHistogram

public void SetRegionsHistogram()
Update histogram reference for all window regions

UpdatePad

public void UpdatePad(TPad* Pad, TH1* h1, Bool_t updatemarkers, Bool_t updateoptions)
Synchronize padoptions of pad with setup of root histogram h1.
if updatemarkers is true, also do scan graph markers and assign
their work histogram. Should be disabled in some cases to avoid
recursive loop

UpdatePad

public void UpdatePad(TPad* Pad, THStack* h1, Bool_t updatemarkers)

Association Links

to Class TGo4GUIRegistry

Supplier Cardinality 1

to Class TGo4PreviewPanelStatus

to Class Go4MouseMode_t

This switches mouse modes:
see Go4MouseModes.h

to Class TList

list of temporary markers set

to Class TList

list of temporary regions (window conditions)

to Class TList

list of temporary polygons (poly conditions)

to Class TList

cleanup list of latex objects

to Class TList

list of temporary latex objects (text markers)

to Class TList

cleanup list of arrow objects

to Class TList

list of temporary arrow objects

to Class TList

cleanup list of legend objects

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

30-06-2005