GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4AbstractInterface Class Referenceabstract

Generic interface to GUI functionality. More...

#include <TGo4AbstractInterface.h>

+ Inheritance diagram for TGo4AbstractInterface:

Public Member Functions

virtual ~TGo4AbstractInterface ()
 destructor
 
TGo4AnalysisProxyAnalysis ()
 Returns pointer on analysis proxy.
 
virtual void AnalysisAutoSave (const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite)
 Configure autosave properties of analysis.
 
virtual void AnalysisConfigName (const char *filename)
 Configure name of file, where analysis configuration will be saved.
 
TGo4BrowserProxyBrowser () const
 Returns pointer on browser proxy.
 
 ClassDefOverride (TGo4AbstractInterface, 0)
 
virtual void ConfigStep (const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore)
 Set basic step properties.
 
virtual void ConnectAnalysis (const char *ServerNode, Int_t ServerPort, Int_t UserMode, const char *password=nullptr)
 Connect to running analysis server.
 
virtual void ConnectDabc (const char *servername)
 Connect to DABC server.
 
virtual void ConnectHServer (const char *servername, Int_t portnumber, const char *basename, const char *userpass, const char *filter)
 Connect to GSI histogram server.
 
virtual TGo4ServerProxyConnectHttp (const char *servername, const char *account=nullptr, const char *pass=nullptr)
 Connect to HTTP server.
 
virtual Bool_t CopyItem (const char *itemname)
 Copy item to workspace.
 
virtual Bool_t DeleteItem (const char *itemname)
 Delete item (if allowed).
 
virtual void DisconnectAnalysis ()
 Disconnects from running analysis.
 
virtual void DivideViewPanel (ViewPanelHandle panel, Int_t numX, Int_t numY)
 Divide viewpanel on subpads.
 
virtual Bool_t DrawItem (const char *itemname, ViewPanelHandle panel=nullptr, const char *drawopt=nullptr)
 Draw browser item on specified viewpanel.
 
virtual void ExecuteLine (const char *remotecmd)
 Execute one macro line on analysis side.
 
virtual Bool_t ExportToFile (const char *itemname, const char *dirpath, const char *format, const char *filetitle=nullptr)
 Export browser item to different file formats.
 
virtual void FetchItem (const char *itemname, Int_t wait_time=2000)
 Fetch item from data source.
 
virtual TString FindItem (const char *objname)
 Find item with given object name.
 
virtual ViewPanelHandle FindViewPanel (const char *name)
 Return handle on viewpanel with specified name.
 
virtual ViewPanelHandle GetActiveViewPanel ()
 Return handle of last active viewpanel.
 
virtual const char * GetDrawnItemName (ViewPanelHandle panel, int cnt=0)
 Provide item name, drawn in the view panel.
 
virtual TObject * GetObject (const char *itemname, Int_t updatelevel=1)
 Returns object, assigned to specified browser item.
 
virtual TGo4PictureGetPadOptions (ViewPanelHandle panel, Int_t padnumber=0)
 Returns pad options for pad with specified number.
 
virtual TString GetViewPanelName (ViewPanelHandle panel)
 Return name of viewpanel.
 
virtual void HotStart (const char *filename)=0
 Executes hotstart file, generated in go4 GUI.
 
virtual Bool_t IsAnalysisConnected ()
 Indicate, if analysis was successfully connected.
 
virtual void LaunchAnalysis ()
 Launch analysis in client mode, using default configuration.
 
virtual void LaunchAnalysis (const char *ClientName, const char *ClientDir, const char *ClientExec, const char *ClientNode, Int_t ShellMode=2, Int_t TermMode=1, Int_t ExeMode=0, const char *UserArgs=nullptr)
 Launch analysis in client mode.
 
virtual void LoadLibrary (const char *fname)
 Load specified ROOT library.
 
virtual void Message (const char *msg)
 Display message in GUI status line.
 
virtual void MonitorItem (const char *itemname, Bool_t on=kTRUE)
 Enable/disable monitoring of browser item.
 
TGo4ObjectManagerOM () const
 Returns pointer on object manager.
 
virtual void OpenFile (const char *fname)
 Open specified file in read-only mode.
 
virtual void RedrawItem (const char *itemname)
 Redraw item of given name on all viewpanels/editors.
 
virtual void RedrawPanel (ViewPanelHandle panel)
 Forces of panel redraw.
 
virtual void RefreshNamesList (int tmout=10)
 Sends new request to the analysis and waits for new names list.
 
virtual void RequestAnalysisConfig ()
 Requests current analysis configuration.
 
virtual Bool_t SaveToFile (const char *itemname, const char *filename, const char *filetitle=nullptr)
 Save specified browser item to file.
 
virtual TString SaveToMemory (const char *path, TObject *obj, Bool_t ownership=kFALSE)
 Save object in browser workspace.
 
virtual TPad * SelectPad (ViewPanelHandle panel, Int_t number=0)
 Set active pad on viewpanel.
 
TGo4ServerProxyServer ()
 Returns pointer on more generic server proxy.
 
virtual void SetAnalysisConfigMode (int mode)
 Set analysis configuration window mode.
 
virtual void SetAnalysisTerminalMode (int mode)
 Set analysis terminal window mode.
 
virtual void SetApplyToAll (ViewPanelHandle panel, Bool_t on=kTRUE)
 Set apply to all flag for active pad of viewpanel.
 
virtual void SetMainWindowGeometry (int qtversion, const char *val)
 Set geometry of main window.
 
virtual void SetMainWindowState (int qtversion, const char *val)
 Set state of all tool boxes in main window.
 
virtual void SetSuperimpose (ViewPanelHandle panel, Bool_t on=kTRUE)
 Set superimpose flag for active pad of viewpanel.
 
virtual Bool_t SetViewPanelName (ViewPanelHandle panel, const char *newname)
 Change name of viewpanel.
 
virtual void ShutdownAnalysis ()
 Shutdown running analysis.
 
virtual void StartAnalysis ()
 Starts (resume) analysis execution.
 
virtual void StartFitPanel ()
 Starts fit panel.
 
virtual void StartMonitoring (Int_t period=10)
 Start monitoring mode.
 
virtual ViewPanelHandle StartViewPanel ()
 Create new view panel.
 
virtual ViewPanelHandle StartViewPanel (int x, int y, int width, int height, int mode=1, TGo4Picture *pic=nullptr)
 Create new viewpanel with specified parameters.
 
virtual void StepBackStore (const char *stepname, const char *storename, int bufsize, int splitlevel)
 Set back store as step data storage.
 
virtual void StepFileSource (const char *stepname, const char *sourcename, int timeout)
 Set file source as step data source.
 
virtual void StepFileStore (const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=0)
 Set file as step data storage.
 
virtual void StepHDF5Source (const char *stepname, const char *sourcename, int timeout)
 Set hdf5 data source as step data source.
 
virtual void StepHDF5Store (const char *stepname, const char *storename, int flags)
 Set hdf5 data source as step data storage.
 
virtual void StepMbsEventServerSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 Set MBS event server as step data source.
 
virtual void StepMbsFileSource (const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0)
 Set MBS file source as step data source.
 
virtual void StepMbsPort (const char *stepname, int port)
 Set custom port number for MBS source like stream or transport server.
 
virtual void StepMbsRetryCnt (const char *stepname, int cnt)
 Set retry number for MBS source like stream or transport server.
 
virtual void StepMbsRevServSource (const char *stepname, const char *sourcename, int timeout, int port=0, int start=0, int stop=0, int interval=0)
 Set MBS remote event server as step data source.
 
virtual void StepMbsSelection (const char *stepname, int start, int stop, int interval)
 Set event selection for MBS source.
 
virtual void StepMbsStreamSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 Set MBS stream server as step data source.
 
virtual void StepMbsTransportSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 Set MBS transport server as step data source.
 
virtual void StepRandomSource (const char *stepname, const char *sourcename, int timeout)
 Set random generator as step data source.
 
virtual void StepUserSource (const char *stepname, const char *sourcename, int timeout, int port, const char *expr)
 Set user data source as step data source.
 
virtual void StepUserStore (const char *stepname, const char *storename)
 Set user store as step data storage.
 
virtual void StopAnalysis ()
 Stop (suspend) analysis execution.
 
virtual void StopMonitoring ()
 Stop monitoring mode.
 
virtual void SubmitAnalysisConfig (int tmout=20)
 Submit configuration to analysis.
 
virtual void Wait (double tm_sec)
 Wait specified number of seconds.
 
virtual void WaitAnalysis (Int_t delay_sec)
 Waits, until connection to analysis is established.
 

Static Public Member Functions

static Int_t DelayMillisec ()
 Default delay during hotstart file extension.
 
static void DeleteInstance ()
 Delete instance of interface class.
 
static const char * FileExtension ()
 Returns default hotstart file extension.
 
static TGo4AbstractInterfaceInstance ()
 Return pointer on instance of implementation of TGo4AbstractInterface class.
 
static void SetInitSharedLibs (const char *libs=nullptr)
 method to set initial list of shared libraries, which than will not be included in hotstart file
 

Protected Member Functions

 TGo4AbstractInterface ()
 Constructor.
 
void FreeHotStartCmds ()
 
void Initialize (TGo4ObjectManager *om, TGo4BrowserProxy *br)
 list of shared libraries when application is started
 
Bool_t IsHotStart () const
 
Bool_t LoadHotStart (const char *filename)
 
const char * NextHotStartCmd ()
 
virtual void ProcessEvents (Int_t timeout=-1)=0
 

Static Protected Member Functions

static const char * DefaultPicTitle ()
 Returns default hotstart file extension.
 
static void ProduceLoadLibs (std::ostream &fs)
 

Static Protected Attributes

static TGo4AbstractInterfacefgInstance = nullptr
 
static TString fInitSharedLibs = ""
 

Private Attributes

TGo4BrowserProxyfBrowser {nullptr}
 
TGo4ObjectManagerfOM {nullptr}
 
TList fxCommands
 

Detailed Description

Generic interface to GUI functionality.

Provide methods like open file, request object from analysis and so on.

Methods of that class can be used in arbitrary ROOT script inside/outside Go4 GUI. To access these methods, one should use "go4" variable, which is exported to CINT global variable space when instance of implementation of TGo4AbstractInterface class is created. One can also access such instance also via TGo4AbstractInterface::Instance() static method.

There are two implementations of TGo4AbstractInterface class:

  • TGo4Script - used together with Go4 GUI, created automatically when GUI started
  • TGo4Interface - can be used in non GUI mode, must be created once by user As long as these are two implementation of the same interface, macro, which uses internally only go4 instance, should work similarly in both GUI and non GUI mode.

Typically one should use interface, provided by that class, in macro, executed inside GUI. Simple example of such macro:

{
go4->OpenFile("example.root");
go4->DrawItem("example.root/hist1");
}

Here one open file from disk and displays one histogram from that file.

Most of the action with objects are going via object manager, where each object (item) has unique name, which includes full path to that object in objects structures. In our example item name is "example.root/hist1". To locate object of known name in objects structure, one can use FindItem() method. In that case example will look like:

{
go4->OpenFile("example.root");
go4->DrawItem(go4->FindItem("hist1"));
}

There are several examples of GUI macros, which can be found in $GO4SYS/macros directory. Description of each method can be seen further in this document. Hot start feature of go4 was implemented with usage of that class, therefore one can produce hotstart files in Go4 GUI and take some generated code from it directly. For instance, displaying of complex viewpanels or starting and configuring of analysis.

Definition at line 84 of file TGo4AbstractInterface.h.

Constructor & Destructor Documentation

◆ TGo4AbstractInterface()

TGo4AbstractInterface::TGo4AbstractInterface ( )
protected

◆ ~TGo4AbstractInterface()

TGo4AbstractInterface::~TGo4AbstractInterface ( )
virtual

destructor

Definition at line 88 of file TGo4AbstractInterface.cxx.

References fBrowser, fgInstance, fOM, FreeHotStartCmds(), and TGo4Log::subGO4SYS().

Member Function Documentation

◆ Analysis()

TGo4AnalysisProxy * TGo4AbstractInterface::Analysis ( )

Returns pointer on analysis proxy.

TGo4AnalysisProxy class provide access to analysis controlling instance in program. Normally should not be used in GUI script.

Definition at line 102 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::FindAnalysis().

Referenced by TGo4Interface::~TGo4Interface(), TGo4Interface::ConnectAnalysis(), TGo4Interface::DisconnectAnalysis(), TGo4Interface::HandleTimer(), TGo4Interface::ShutdownAnalysis(), and TGo4Interface::WaitAnalysis().

◆ AnalysisAutoSave()

virtual void TGo4AbstractInterface::AnalysisAutoSave ( const char * filename,
Int_t interval,
Int_t compression,
Bool_t enabled,
Bool_t overwrite )
inlinevirtual

Configure autosave properties of analysis.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 393 of file TGo4AbstractInterface.h.

◆ AnalysisConfigName()

virtual void TGo4AbstractInterface::AnalysisConfigName ( const char * filename)
inlinevirtual

Configure name of file, where analysis configuration will be saved.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 400 of file TGo4AbstractInterface.h.

◆ Browser()

TGo4BrowserProxy * TGo4AbstractInterface::Browser ( ) const
inline

Returns pointer on browser proxy.

TGo4BrowserProxy class provides complete interface to Go4 browser functionality. Should only be used when interface does not provide required functionality. Can be accessed directly via "br" variable.

Definition at line 143 of file TGo4AbstractInterface.h.

References fBrowser.

Referenced by TGo4Interface::AddAnalysisProxy(), Analysis(), ConnectDabc(), ConnectHServer(), TGo4Script::ConnectHttp(), CopyItem(), DeleteItem(), TGo4Interface::DisconnectAnalysis(), ExportToFile(), FetchItem(), FindItem(), GetObject(), MonitorItem(), OpenFile(), RedrawItem(), SaveToFile(), SaveToMemory(), Server(), TGo4Interface::ShutdownAnalysis(), StartMonitoring(), and StopMonitoring().

◆ ClassDefOverride()

TGo4AbstractInterface::ClassDefOverride ( TGo4AbstractInterface ,
0  )

◆ ConfigStep()

virtual void TGo4AbstractInterface::ConfigStep ( const char * stepname,
Bool_t enableprocess,
Bool_t enablesource,
Bool_t enablestore )
inlinevirtual

Set basic step properties.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 405 of file TGo4AbstractInterface.h.

◆ ConnectAnalysis()

virtual void TGo4AbstractInterface::ConnectAnalysis ( const char * ServerNode,
Int_t ServerPort,
Int_t UserMode,
const char * password = nullptr )
inlinevirtual

Connect to running analysis server.

Parameters
ServerNode- node to connect to,
ServerPort- connection port number,
UserMode- mode of user operation : 0 - observer, 1 - controller, 2 - administrator
password- access password, which should correspond to specified UserMode

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 299 of file TGo4AbstractInterface.h.

◆ ConnectDabc()

void TGo4AbstractInterface::ConnectDabc ( const char * servername)
virtual

Connect to DABC server.

Address like dabc://host:port

Definition at line 182 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::ConnectDabc().

◆ ConnectHServer()

void TGo4AbstractInterface::ConnectHServer ( const char * servername,
Int_t portnumber,
const char * basename,
const char * userpass,
const char * filter )
virtual

Connect to GSI histogram server.

Creates appropriate entry in browser and provides access to histogram. Several connections to different histogram servers are allowed

Parameters
servername- IP server name
portnumber- socket port number
basename- histogram server base name
userpass- password to access histogram server
filter- filter for histograms names

Definition at line 168 of file TGo4AbstractInterface.cxx.

References Browser(), TGo4BrowserProxy::ConnectHServer(), and ProcessEvents().

◆ ConnectHttp()

virtual TGo4ServerProxy * TGo4AbstractInterface::ConnectHttp ( const char * servername,
const char * account = nullptr,
const char * pass = nullptr )
inlinevirtual

Connect to HTTP server.

Address like http://host:port/subfolder/ authentication may be specified by username account and password pass

Reimplemented in TGo4Script.

Definition at line 260 of file TGo4AbstractInterface.h.

◆ CopyItem()

Bool_t TGo4AbstractInterface::CopyItem ( const char * itemname)
virtual

Copy item to workspace.

If there is subfolders with items, they also will be copied.

Definition at line 233 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::ProduceExplicitCopy().

◆ DefaultPicTitle()

const char * TGo4AbstractInterface::DefaultPicTitle ( )
staticprotected

Returns default hotstart file extension.

Definition at line 52 of file TGo4AbstractInterface.cxx.

Referenced by TGo4Script::ProduceScript(), and TGo4Script::StartViewPanel().

◆ DelayMillisec()

Int_t TGo4AbstractInterface::DelayMillisec ( )
static

◆ DeleteInstance()

void TGo4AbstractInterface::DeleteInstance ( )
static

Delete instance of interface class.

Definition at line 39 of file TGo4AbstractInterface.cxx.

References fgInstance.

Referenced by TGo4MainWindow::~TGo4MainWindow(), and TGo4BrowserItem::DeleteItem().

◆ DeleteItem()

Bool_t TGo4AbstractInterface::DeleteItem ( const char * itemname)
virtual

Delete item (if allowed).

Can be used to close file, delete memory object, close histogram server connection.

Definition at line 238 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::DeleteDataSource().

◆ DisconnectAnalysis()

virtual void TGo4AbstractInterface::DisconnectAnalysis ( )
inlinevirtual

Disconnects from running analysis.

If analysis is running in client mode, analysis will be shutdown.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 316 of file TGo4AbstractInterface.h.

◆ DivideViewPanel()

virtual void TGo4AbstractInterface::DivideViewPanel ( ViewPanelHandle panel,
Int_t numX,
Int_t numY )
inlinevirtual

Divide viewpanel on subpads.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 555 of file TGo4AbstractInterface.h.

◆ DrawItem()

virtual Bool_t TGo4AbstractInterface::DrawItem ( const char * itemname,
ViewPanelHandle panel = nullptr,
const char * drawopt = nullptr )
inlinevirtual

Draw browser item on specified viewpanel.

Parameters
itemname- browser item name,
panel- viewpanel, if panel == nullptr, new viewpanel will be created.
drawopt- draw options, used in obj->Draw() operation

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 576 of file TGo4AbstractInterface.h.

◆ ExecuteLine()

void TGo4AbstractInterface::ExecuteLine ( const char * remotecmd)
virtual

Execute one macro line on analysis side.

This allows to call any action on analysis, including execution scripts with ".x userscript.C". One should not mix scripts, written for analysis and scripts, written for GUI.

Definition at line 192 of file TGo4AbstractInterface.cxx.

References TGo4ServerProxy::ExecuteLine(), TGo4Log::Message(), and Server().

◆ ExportToFile()

Bool_t TGo4AbstractInterface::ExportToFile ( const char * itemname,
const char * dirpath,
const char * format,
const char * filetitle = nullptr )
virtual

Export browser item to different file formats.

One, probably, should use FetchItem() before calling this method. If item is folder and contains sub-items, they also will be exported.

Parameters
itemname- name of browser, which should be exported,
dirpath- directory on disk, where files should be created.
format- export file format, can be:
  • "ASCII" - text format
  • "Radware" - Radware format (Origin)
  • "ROOT" - binary ROOT format
  • "ROOT XML" - xml ROOT format
filetitle- title of create file (only for ROOT formats)

Definition at line 142 of file TGo4AbstractInterface.cxx.

References Browser(), TGo4BrowserProxy::ExportItemsTo(), TGo4Iter::getslot(), TGo4BrowserProxy::ItemSlot(), and TGo4Iter::next().

◆ FetchItem()

void TGo4AbstractInterface::FetchItem ( const char * itemname,
Int_t wait_time = 2000 )
virtual

Fetch item from data source.

Request item from data source, to which item corresponds to. If this is file or histogram server, object will be returned immediately. If this is an item from analysis, first request will be send and then interface will wait "wait_time" milliseconds that object is arrived. If wait_time == 0, no waiting will be done and most probably, new object will be assigned to that item several seconds after method is return

Definition at line 243 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::FetchItem().

◆ FileExtension()

const char * TGo4AbstractInterface::FileExtension ( )
static

Returns default hotstart file extension.

Definition at line 47 of file TGo4AbstractInterface.cxx.

Referenced by TGo4MainWindow::CreateGUIScriptSlot().

◆ FindItem()

TString TGo4AbstractInterface::FindItem ( const char * objname)
virtual

Find item with given object name.

Item name includes object name and name of all parent folders. For instance histogram of name "His1" in analysis will have item name "Analysis/Histograms/His1".

Definition at line 225 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::FindItem().

◆ FindViewPanel()

virtual ViewPanelHandle TGo4AbstractInterface::FindViewPanel ( const char * name)
inlinevirtual

Return handle on viewpanel with specified name.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 543 of file TGo4AbstractInterface.h.

◆ FreeHotStartCmds()

void TGo4AbstractInterface::FreeHotStartCmds ( )
protected

◆ GetActiveViewPanel()

virtual ViewPanelHandle TGo4AbstractInterface::GetActiveViewPanel ( )
inlinevirtual

Return handle of last active viewpanel.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 549 of file TGo4AbstractInterface.h.

◆ GetDrawnItemName()

virtual const char * TGo4AbstractInterface::GetDrawnItemName ( ViewPanelHandle panel,
int cnt = 0 )
inlinevirtual

Provide item name, drawn in the view panel.

Optional cnt parameter could specify sequence number in panel, including all subpads

Reimplemented in TGo4Script.

Definition at line 585 of file TGo4AbstractInterface.h.

◆ GetObject()

TObject * TGo4AbstractInterface::GetObject ( const char * itemname,
Int_t updatelevel = 1 )
virtual

Returns object, assigned to specified browser item.

Parameter updatelevel specifies, how object will be requested from data source, to which item correspond to. Possible values for updatelevel parameter: 0 - no request will be done, return last requested object 1 - request to data source only first time, no waiting 2 - request to data source in any case, no waiting >9 - request to data source and wait as many milliseconds as specified by updatelevel Waiting required, when object requested from the analysis

Definition at line 253 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::GetBrowserObject().

Referenced by TGo4Interface::DrawItem().

◆ GetPadOptions()

virtual TGo4Picture * TGo4AbstractInterface::GetPadOptions ( ViewPanelHandle panel,
Int_t padnumber = 0 )
inlinevirtual

Returns pad options for pad with specified number.

Reimplemented in TGo4Script.

Definition at line 564 of file TGo4AbstractInterface.h.

◆ GetViewPanelName()

virtual TString TGo4AbstractInterface::GetViewPanelName ( ViewPanelHandle panel)
inlinevirtual

Return name of viewpanel.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 540 of file TGo4AbstractInterface.h.

◆ HotStart()

virtual void TGo4AbstractInterface::HotStart ( const char * filename)
pure virtual

Executes hotstart file, generated in go4 GUI.

Hot start files can not be executed as normal CINT scripts, therefore one should use this method to activate them

Implemented in TGo4Interface, and TGo4Script.

◆ Initialize()

void TGo4AbstractInterface::Initialize ( TGo4ObjectManager * om,
TGo4BrowserProxy * br )
protected

list of shared libraries when application is started

Definition at line 76 of file TGo4AbstractInterface.cxx.

References fBrowser, fOM, and TGo4Log::subGO4SYS().

Referenced by TGo4Interface::TGo4Interface(), and TGo4Script::TGo4Script().

◆ Instance()

TGo4AbstractInterface * TGo4AbstractInterface::Instance ( )
static

Return pointer on instance of implementation of TGo4AbstractInterface class.

Normally, inside CINT script one should use "go4" variable, which contains TGo4AbstractInterface::Instance() value.

Definition at line 34 of file TGo4AbstractInterface.cxx.

References TGo4AbstractInterface(), and fgInstance.

Referenced by TGo4Script::ScriptInstance().

◆ IsAnalysisConnected()

Bool_t TGo4AbstractInterface::IsAnalysisConnected ( )
virtual

Indicate, if analysis was successfully connected.

Definition at line 187 of file TGo4AbstractInterface.cxx.

References TGo4ServerProxy::IsConnected(), and Server().

◆ IsHotStart()

Bool_t TGo4AbstractInterface::IsHotStart ( ) const
protected

◆ LaunchAnalysis() [1/2]

virtual void TGo4AbstractInterface::LaunchAnalysis ( )
inlinevirtual

Launch analysis in client mode, using default configuration.

Can only work in standard GUI mode

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 274 of file TGo4AbstractInterface.h.

◆ LaunchAnalysis() [2/2]

virtual void TGo4AbstractInterface::LaunchAnalysis ( const char * ClientName,
const char * ClientDir,
const char * ClientExec,
const char * ClientNode,
Int_t ShellMode = 2,
Int_t TermMode = 1,
Int_t ExeMode = 0,
const char * UserArgs = nullptr )
inlinevirtual

Launch analysis in client mode.

Parameters
ClientName- arbitrary name of analysis, used for display
ClientDir- directory, where analysis should be started
ClientExec- main analysis executable
ClientNode- node name, where analysis should be started
ShellMode- shell, used to launch analysis: 1 - rsh, 2 - ssh [default]
TermMode- terminal program: 1 - internal Qt window, 2 - xterm, 3 - KDE konsole
ExeMode- execution mode: 0 - exe, 1 - library
UserArgs- extra arguments for user analysis

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 285 of file TGo4AbstractInterface.h.

◆ LoadHotStart()

Bool_t TGo4AbstractInterface::LoadHotStart ( const char * filename)
protected

◆ LoadLibrary()

void TGo4AbstractInterface::LoadLibrary ( const char * fname)
virtual

Load specified ROOT library.

Definition at line 112 of file TGo4AbstractInterface.cxx.

◆ Message()

virtual void TGo4AbstractInterface::Message ( const char * msg)
inlinevirtual

Display message in GUI status line.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 268 of file TGo4AbstractInterface.h.

◆ MonitorItem()

void TGo4AbstractInterface::MonitorItem ( const char * itemname,
Bool_t on = kTRUE )
virtual

Enable/disable monitoring of browser item.

In monitoring mode item regularly will be requested from analysis and viewpanels, where item is drawn, will be updated

Definition at line 208 of file TGo4AbstractInterface.cxx.

References Browser(), TGo4BrowserProxy::BrowserSlot(), and TGo4BrowserProxy::SetItemMonitored().

◆ NextHotStartCmd()

const char * TGo4AbstractInterface::NextHotStartCmd ( )
protected

◆ OM()

TGo4ObjectManager * TGo4AbstractInterface::OM ( ) const
inline

Returns pointer on object manager.

TGo4ObjectManager class should only be used when standard interface does not provide required functionality. Can be accessed directly via "om" variable.

Definition at line 137 of file TGo4AbstractInterface.h.

References fOM.

Referenced by TGo4Interface::~TGo4Interface(), and TGo4Interface::AddAnalysisProxy().

◆ OpenFile()

void TGo4AbstractInterface::OpenFile ( const char * fname)
virtual

Open specified file in read-only mode.

File and its structure should appear in browser.

Definition at line 128 of file TGo4AbstractInterface.cxx.

References Browser(), TGo4BrowserProxy::OpenFile(), and ProcessEvents().

◆ ProcessEvents()

virtual void TGo4AbstractInterface::ProcessEvents ( Int_t timeout = -1)
protectedpure virtual

Implemented in TGo4Interface, and TGo4Script.

References TGo4AbstractInterface().

Referenced by ConnectHServer(), OpenFile(), and SaveToMemory().

◆ ProduceLoadLibs()

void TGo4AbstractInterface::ProduceLoadLibs ( std::ostream & fs)
staticprotected

Definition at line 322 of file TGo4AbstractInterface.cxx.

References fInitSharedLibs, and TGo4Log::GO4SYS().

Referenced by TGo4Script::ProduceScript().

◆ RedrawItem()

void TGo4AbstractInterface::RedrawItem ( const char * itemname)
virtual

Redraw item of given name on all viewpanels/editors.

Useful for the case, when content of object (histogram, for example) changed directly in script and after that should be updated in viewpanel.

Reimplemented in TGo4Interface.

Definition at line 248 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::RedrawItem().

Referenced by TGo4Interface::RedrawItem().

◆ RedrawPanel()

virtual void TGo4AbstractInterface::RedrawPanel ( ViewPanelHandle panel)
inlinevirtual

Forces of panel redraw.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 552 of file TGo4AbstractInterface.h.

◆ RefreshNamesList()

virtual void TGo4AbstractInterface::RefreshNamesList ( int tmout = 10)
inlinevirtual

Sends new request to the analysis and waits for new names list.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 363 of file TGo4AbstractInterface.h.

◆ RequestAnalysisConfig()

void TGo4AbstractInterface::RequestAnalysisConfig ( )
virtual

Requests current analysis configuration.

Definition at line 201 of file TGo4AbstractInterface.cxx.

References TGo4ServerProxy::RequestAnalysisSettings(), and Server().

◆ SaveToFile()

Bool_t TGo4AbstractInterface::SaveToFile ( const char * itemname,
const char * filename,
const char * filetitle = nullptr )
virtual

Save specified browser item to file.

Only object, which are already fetched from the data source, will be saved. Therefore, before one call this method, one probably should use FetchItem() method to get objects from file/analysis/histogram server before save them. If item is folder and contains sub-items, they also will be saved. Only binary ROOT files (extension .root) and XML file (extension .xml) are supported.

Definition at line 135 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::SaveBrowserToFile().

◆ SaveToMemory()

TString TGo4AbstractInterface::SaveToMemory ( const char * path,
TObject * obj,
Bool_t ownership = kFALSE )
virtual

Save object in browser workspace.

Object of any type can be saved in browser. It will appear in browser folder "Workspace", where local memory objects are placed. If item of that name exists in browser, it will be overwritten by new object Returns path to stored object in browser workspace.

Parameters
path- subpath in "Workspace" folder, where object should be placed
obj- pointer ob object
ownership- is browser becomes owner of that object

Definition at line 260 of file TGo4AbstractInterface.cxx.

References Browser(), ProcessEvents(), and TGo4BrowserProxy::SaveToMemory().

◆ SelectPad()

virtual TPad * TGo4AbstractInterface::SelectPad ( ViewPanelHandle panel,
Int_t number = 0 )
inlinevirtual

Set active pad on viewpanel.

If number == 0, main pad (canvas) will be set as active, otherwise one of subpads will be activated. Most of methods, working with viewpanel, acting with active pad of this panel.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 561 of file TGo4AbstractInterface.h.

◆ Server()

◆ SetAnalysisConfigMode()

virtual void TGo4AbstractInterface::SetAnalysisConfigMode ( int mode)
inlinevirtual

Set analysis configuration window mode.

Parameters
modeindicate that configuration window:
  • -1 - closed,
  • 0 - minimized,
  • 1 - normal state

Reimplemented in TGo4Script.

Definition at line 377 of file TGo4AbstractInterface.h.

◆ SetAnalysisTerminalMode()

virtual void TGo4AbstractInterface::SetAnalysisTerminalMode ( int mode)
inlinevirtual

Set analysis terminal window mode.

Parameters
modeindicate that terminal window:
  • -1 - closed,
  • 0 - minimized,
  • 1 - normal state

Reimplemented in TGo4Script.

Definition at line 370 of file TGo4AbstractInterface.h.

◆ SetApplyToAll()

virtual void TGo4AbstractInterface::SetApplyToAll ( ViewPanelHandle panel,
Bool_t on = kTRUE )
inlinevirtual

Set apply to all flag for active pad of viewpanel.

Reimplemented in TGo4Script.

Definition at line 570 of file TGo4AbstractInterface.h.

◆ SetInitSharedLibs()

void TGo4AbstractInterface::SetInitSharedLibs ( const char * libs = nullptr)
static

method to set initial list of shared libraries, which than will not be included in hotstart file

Definition at line 62 of file TGo4AbstractInterface.cxx.

References fInitSharedLibs.

Referenced by main().

◆ SetMainWindowGeometry()

virtual void TGo4AbstractInterface::SetMainWindowGeometry ( int qtversion,
const char * val )
inlinevirtual

Set geometry of main window.

Reimplemented in TGo4Script.

Definition at line 518 of file TGo4AbstractInterface.h.

◆ SetMainWindowState()

virtual void TGo4AbstractInterface::SetMainWindowState ( int qtversion,
const char * val )
inlinevirtual

Set state of all tool boxes in main window.

Reimplemented in TGo4Script.

Definition at line 515 of file TGo4AbstractInterface.h.

◆ SetSuperimpose()

virtual void TGo4AbstractInterface::SetSuperimpose ( ViewPanelHandle panel,
Bool_t on = kTRUE )
inlinevirtual

Set superimpose flag for active pad of viewpanel.

Reimplemented in TGo4Script.

Definition at line 567 of file TGo4AbstractInterface.h.

◆ SetViewPanelName()

virtual Bool_t TGo4AbstractInterface::SetViewPanelName ( ViewPanelHandle panel,
const char * newname )
inlinevirtual

Change name of viewpanel.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 546 of file TGo4AbstractInterface.h.

◆ ShutdownAnalysis()

virtual void TGo4AbstractInterface::ShutdownAnalysis ( )
inlinevirtual

Shutdown running analysis.

If analysis is running in server mode, only user with administrator privileges can do this

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 321 of file TGo4AbstractInterface.h.

◆ StartAnalysis()

virtual void TGo4AbstractInterface::StartAnalysis ( )
inlinevirtual

Starts (resume) analysis execution.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 357 of file TGo4AbstractInterface.h.

◆ StartFitPanel()

virtual void TGo4AbstractInterface::StartFitPanel ( )
inlinevirtual

Starts fit panel.

Reimplemented in TGo4Script.

Definition at line 588 of file TGo4AbstractInterface.h.

◆ StartMonitoring()

void TGo4AbstractInterface::StartMonitoring ( Int_t period = 10)
virtual

Start monitoring mode.

Parameter "period" specifies how often (in seconds) each monitored item will be updated.

Definition at line 215 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::ToggleMonitoring().

◆ StartViewPanel() [1/2]

virtual ViewPanelHandle TGo4AbstractInterface::StartViewPanel ( )
inlinevirtual

Create new view panel.

Handle, returned by this method, must be used for other operation, like DivideViewPanel() or SelectPad()

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 523 of file TGo4AbstractInterface.h.

◆ StartViewPanel() [2/2]

virtual ViewPanelHandle TGo4AbstractInterface::StartViewPanel ( int x,
int y,
int width,
int height,
int mode = 1,
TGo4Picture * pic = nullptr )
inlinevirtual

Create new viewpanel with specified parameters.

Returns handle of newly created viewpanel. To understand usage of this method together with TGo4Picture class, one can create and configure viewpanel and then create hotstart file. This file will include complete TGo4Picture configuration, which contains attributes like colors, ranges, pad divisions and so on.

Parameters
x- X coordinate of view panel;
y- Y coordinate of view panel;
width- panel width;
height- panel height;
mode- display mode for view panel (0 - minimized, 1 - normal, 2 - maximized);
pic- TGo4Picture object, which includes configuration of viewpanel.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 537 of file TGo4AbstractInterface.h.

◆ StepBackStore()

virtual void TGo4AbstractInterface::StepBackStore ( const char * stepname,
const char * storename,
int bufsize,
int splitlevel )
inlinevirtual

Set back store as step data storage.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 498 of file TGo4AbstractInterface.h.

◆ StepFileSource()

virtual void TGo4AbstractInterface::StepFileSource ( const char * stepname,
const char * sourcename,
int timeout )
inlinevirtual

Set file source as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 411 of file TGo4AbstractInterface.h.

◆ StepFileStore()

virtual void TGo4AbstractInterface::StepFileStore ( const char * stepname,
const char * storename,
bool overwrite,
int bufsize,
int splitlevel,
int compression,
int autosaveperiod = 0 )
inlinevirtual

Set file as step data storage.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 489 of file TGo4AbstractInterface.h.

◆ StepHDF5Source()

virtual void TGo4AbstractInterface::StepHDF5Source ( const char * stepname,
const char * sourcename,
int timeout )
inlinevirtual

Set hdf5 data source as step data source.

Reimplemented in TGo4Script.

Definition at line 484 of file TGo4AbstractInterface.h.

◆ StepHDF5Store()

virtual void TGo4AbstractInterface::StepHDF5Store ( const char * stepname,
const char * storename,
int flags )
inlinevirtual

Set hdf5 data source as step data storage.

Reimplemented in TGo4Script.

Definition at line 508 of file TGo4AbstractInterface.h.

◆ StepMbsEventServerSource()

virtual void TGo4AbstractInterface::StepMbsEventServerSource ( const char * stepname,
const char * sourcename,
int timeout,
int start = 0,
int stop = 0,
int interval = 0 )
inlinevirtual

Set MBS event server as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 441 of file TGo4AbstractInterface.h.

◆ StepMbsFileSource()

virtual void TGo4AbstractInterface::StepMbsFileSource ( const char * stepname,
const char * sourcename,
int timeout,
const char * TagFile,
int start = 0,
int stop = 0,
int interval = 0 )
inlinevirtual

Set MBS file source as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 416 of file TGo4AbstractInterface.h.

◆ StepMbsPort()

virtual void TGo4AbstractInterface::StepMbsPort ( const char * stepname,
int port )
inlinevirtual

Set custom port number for MBS source like stream or transport server.

Reimplemented in TGo4Script.

Definition at line 469 of file TGo4AbstractInterface.h.

◆ StepMbsRetryCnt()

virtual void TGo4AbstractInterface::StepMbsRetryCnt ( const char * stepname,
int cnt )
inlinevirtual

Set retry number for MBS source like stream or transport server.

Reimplemented in TGo4Script.

Definition at line 473 of file TGo4AbstractInterface.h.

◆ StepMbsRevServSource()

virtual void TGo4AbstractInterface::StepMbsRevServSource ( const char * stepname,
const char * sourcename,
int timeout,
int port = 0,
int start = 0,
int stop = 0,
int interval = 0 )
inlinevirtual

Set MBS remote event server as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 449 of file TGo4AbstractInterface.h.

◆ StepMbsSelection()

virtual void TGo4AbstractInterface::StepMbsSelection ( const char * stepname,
int start,
int stop,
int interval )
inlinevirtual

Set event selection for MBS source.

Reimplemented in TGo4Script.

Definition at line 458 of file TGo4AbstractInterface.h.

◆ StepMbsStreamSource()

virtual void TGo4AbstractInterface::StepMbsStreamSource ( const char * stepname,
const char * sourcename,
int timeout,
int start = 0,
int stop = 0,
int interval = 0 )
inlinevirtual

Set MBS stream server as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 425 of file TGo4AbstractInterface.h.

◆ StepMbsTransportSource()

virtual void TGo4AbstractInterface::StepMbsTransportSource ( const char * stepname,
const char * sourcename,
int timeout,
int start = 0,
int stop = 0,
int interval = 0 )
inlinevirtual

Set MBS transport server as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 433 of file TGo4AbstractInterface.h.

◆ StepRandomSource()

virtual void TGo4AbstractInterface::StepRandomSource ( const char * stepname,
const char * sourcename,
int timeout )
inlinevirtual

Set random generator as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 464 of file TGo4AbstractInterface.h.

◆ StepUserSource()

virtual void TGo4AbstractInterface::StepUserSource ( const char * stepname,
const char * sourcename,
int timeout,
int port,
const char * expr )
inlinevirtual

Set user data source as step data source.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 477 of file TGo4AbstractInterface.h.

◆ StepUserStore()

virtual void TGo4AbstractInterface::StepUserStore ( const char * stepname,
const char * storename )
inlinevirtual

Set user store as step data storage.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 504 of file TGo4AbstractInterface.h.

◆ StopAnalysis()

virtual void TGo4AbstractInterface::StopAnalysis ( )
inlinevirtual

Stop (suspend) analysis execution.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 360 of file TGo4AbstractInterface.h.

◆ StopMonitoring()

void TGo4AbstractInterface::StopMonitoring ( )
virtual

Stop monitoring mode.

Definition at line 220 of file TGo4AbstractInterface.cxx.

References Browser(), and TGo4BrowserProxy::ToggleMonitoring().

◆ SubmitAnalysisConfig()

virtual void TGo4AbstractInterface::SubmitAnalysisConfig ( int tmout = 20)
inlinevirtual

Submit configuration to analysis.

Configurations can be changed with following methods:

To understand more how these methods can be used together, one should launch analysis, configure it and then generate hotstart file. In this file one can find correct sequence and parameters for all these methods. Timeout defines total time which will be required to get response from analysis that operation was completed.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 354 of file TGo4AbstractInterface.h.

◆ Wait()

virtual void TGo4AbstractInterface::Wait ( double tm_sec)
inlinevirtual

Wait specified number of seconds.

Suppress macro execution, but keeps GUI functional, therefore it is different from gSystem->Sleep() call.

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 265 of file TGo4AbstractInterface.h.

◆ WaitAnalysis()

virtual void TGo4AbstractInterface::WaitAnalysis ( Int_t delay_sec)
inlinevirtual

Waits, until connection to analysis is established.

Method must be called before any other action like configuration, start/stop can be done. If analysis is connected, IsAnalysisConnected() return kTRUE. delay_sec specifies, how long one should wait until analysis is connected

Reimplemented in TGo4Interface, and TGo4Script.

Definition at line 309 of file TGo4AbstractInterface.h.

Field Documentation

◆ fBrowser

TGo4BrowserProxy* TGo4AbstractInterface::fBrowser {nullptr}
private

◆ fgInstance

TGo4AbstractInterface * TGo4AbstractInterface::fgInstance = nullptr
staticprotected

◆ fInitSharedLibs

TString TGo4AbstractInterface::fInitSharedLibs = ""
staticprotected

Definition at line 95 of file TGo4AbstractInterface.h.

Referenced by ProduceLoadLibs(), and SetInitSharedLibs().

◆ fOM

TGo4ObjectManager* TGo4AbstractInterface::fOM {nullptr}
private

◆ fxCommands

TList TGo4AbstractInterface::fxCommands
private

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