GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TGo4Interface Class Reference

#include <TGo4Interface.h>

+ Inheritance diagram for TGo4Interface:

Public Member Functions

 TGo4Interface ()
 
 TGo4Interface (const TGo4Interface &)
 
virtual ~TGo4Interface ()
 
void Wait (double tm_sec)
 
void HotStart (const char *filename)
 
void Message (const char *msg)
 
void LaunchAnalysis ()
 
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=0)
 
void ConnectAnalysis (const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=0)
 
void WaitAnalysis (Int_t delay_sec)
 
void DisconnectAnalysis ()
 
void ShutdownAnalysis ()
 
void SubmitAnalysisConfig (int tmout=20)
 
void StartAnalysis ()
 
void StopAnalysis ()
 
void RefreshNamesList (int tmout=10)
 
void AnalysisAutoSave (const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite)
 
void AnalysisConfigName (const char *filename)
 
void ConfigStep (const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore)
 
void StepFileSource (const char *stepname, const char *sourcename, int timeout)
 
void StepMbsFileSource (const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0)
 
void StepMbsStreamSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 
void StepMbsTransportSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 
void StepMbsEventServerSource (const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
 
void StepMbsRevServSource (const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0)
 
void StepRandomSource (const char *stepname, const char *sourcename, int timeout)
 
void StepUserSource (const char *stepname, const char *sourcename, int timeout, int port, const char *expr)
 
void StepFileStore (const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000)
 
void StepBackStore (const char *stepname, const char *storename, int bufsize, int splitlevel)
 
void StepUserStore (const char *stepname, const char *storename)
 
ViewPanelHandle StartViewPanel ()
 
ViewPanelHandle StartViewPanel (int x, int y, int width, int height, int mode=1, TGo4Picture *pic=0)
 
TString GetViewPanelName (ViewPanelHandle handle)
 
ViewPanelHandle FindViewPanel (const char *name)
 
Bool_t SetViewPanelName (ViewPanelHandle handle, const char *newname)
 
ViewPanelHandle GetActiveViewPanel ()
 
void RedrawPanel (ViewPanelHandle panel)
 
void DivideViewPanel (ViewPanelHandle panel, Int_t numX, Int_t numY)
 
TPad * SelectPad (ViewPanelHandle panel, Int_t number=0)
 
Bool_t DrawItem (const char *itemname, ViewPanelHandle panel=0, const char *drawopt=0)
 
void RedrawItem (const char *itemname)
 
void ProcessHotStart ()
 
virtual Bool_t HandleTimer (TTimer *timer)
 
- Public Member Functions inherited from TGo4AbstractInterface
virtual ~TGo4AbstractInterface ()
 
TGo4ObjectManagerOM () const
 
TGo4BrowserProxyBrowser () const
 
TGo4AnalysisProxyAnalysis ()
 
TGo4ServerProxyServer ()
 
virtual void LoadLibrary (const char *fname)
 
virtual void OpenFile (const char *fname)
 
virtual TString FindItem (const char *objname)
 
virtual Bool_t CopyItem (const char *itemname)
 
virtual Bool_t DeleteItem (const char *itemname)
 
virtual void FetchItem (const char *itemname, Int_t wait_time=2000)
 
virtual TObject * GetObject (const char *itemname, Int_t updatelevel=1)
 
virtual TString SaveToMemory (const char *path, TObject *obj, Bool_t ownership=kFALSE)
 
virtual Bool_t SaveToFile (const char *itemname, const char *filename, const char *filetitle=0)
 
virtual Bool_t ExportToFile (const char *itemname, const char *dirpath, const char *format, const char *filetitle=0)
 
virtual void ConnectHServer (const char *servername, Int_t portnumber, const char *basename, const char *userpass, const char *filter)
 
virtual void ConnectDabc (const char *servername)
 
virtual TGo4ServerProxyConnectHttp (const char *servername, const char *account=0, const char *pass=0)
 
virtual Bool_t IsAnalysisConnected ()
 
virtual void ExecuteLine (const char *remotecmd)
 
virtual void RequestAnalysisConfig ()
 
virtual void SetAnalysisTerminalMode (int mode)
 
virtual void SetAnalysisConfigMode (int mode)
 
virtual void MonitorItem (const char *itemname, Bool_t on=kTRUE)
 
virtual void StartMonitoring (Int_t period=10)
 
virtual void StopMonitoring ()
 
virtual void StepMbsSelection (const char *stepname, int start, int stop, int interval)
 
virtual void StepMbsPort (const char *stepname, int port)
 
virtual void StepMbsRetryCnt (const char *stepname, int cnt)
 
virtual void StepHDF5Source (const char *stepname, const char *sourcename, int timeout)
 
virtual void StepHDF5Store (const char *stepname, const char *storename, int flags)
 
virtual void SetMainWindowState (int qtversion, const char *val)
 
virtual void SetMainWindowGeometry (int qtversion, const char *val)
 
virtual TGo4PictureGetPadOptions (ViewPanelHandle panel, Int_t padnumber=0)
 
virtual void SetSuperimpose (ViewPanelHandle panel, Bool_t on=kTRUE)
 
virtual void SetApplyToAll (ViewPanelHandle panel, Bool_t on=kTRUE)
 
virtual const char * GetDrawnItemName (ViewPanelHandle panel, int cnt=0)
 
virtual void StartFitPanel ()
 
 ClassDef (TGo4AbstractInterface, 1)
 

Protected Member Functions

void ProcessEvents (Int_t timeout=-1)
 
TGo4AnalysisProxyAddAnalysisProxy (Bool_t isserver)
 
TGo4AnalysisStatusGetAnalStatus ()
 
TGo4AnalysisStepStatusGetStepStatus (const char *stepname)
 
 ClassDef (TGo4Interface, 1)
 
- Protected Member Functions inherited from TGo4AbstractInterface
 TGo4AbstractInterface ()
 
void Initialize (TGo4ObjectManager *om, TGo4BrowserProxy *br)
 list of shared libraries when application is started More...
 
Bool_t LoadHotStart (const char *filename)
 
Bool_t IsHotStart ()
 
const char * NextHotStartCmd ()
 
void FreeHotStartCmds ()
 

Protected Attributes

TGo4RootBrowserProxyfRootBrowser
 
TString fOMDataPath
 
TString fOMBrowserPath
 
TString fOMEditorsPath
 
Bool_t fCmdFinished
 
TTimer * fCmdTimer
 
Int_t fWaitCounter
 

Additional Inherited Members

- Static Public Member Functions inherited from TGo4AbstractInterface
static void SetInitSharedLibs (const char *libs=0)
 
static TGo4AbstractInterfaceInstance ()
 
static void DeleteInstance ()
 
static const char * FileExtension ()
 
static Int_t DelayMillisec ()
 
- Static Protected Member Functions inherited from TGo4AbstractInterface
static void ProduceLoadLibs (std::ostream &fs)
 
static const char * DefaultPicTitle ()
 
- Static Protected Attributes inherited from TGo4AbstractInterface
static TGo4AbstractInterfacefgInstance = 0
 
static TString fInitSharedLibs = ""
 

Detailed Description

Definition at line 25 of file TGo4Interface.h.

Constructor & Destructor Documentation

TGo4Interface::TGo4Interface ( )
TGo4Interface::TGo4Interface ( const TGo4Interface )
inline

Definition at line 31 of file TGo4Interface.h.

TGo4Interface::~TGo4Interface ( )
virtual

Member Function Documentation

TGo4AnalysisProxy * TGo4Interface::AddAnalysisProxy ( Bool_t  isserver)
protected
void TGo4Interface::AnalysisAutoSave ( const char *  filename,
Int_t  interval,
Int_t  compression,
Bool_t  enabled,
Bool_t  overwrite 
)
virtual
void TGo4Interface::AnalysisConfigName ( const char *  filename)
virtual

Configure name of file, where analysis configuration will be saved

Reimplemented from TGo4AbstractInterface.

Definition at line 343 of file TGo4Interface.cxx.

References GetAnalStatus(), and TGo4AnalysisStatus::SetConfigFileName().

TGo4Interface::ClassDef ( TGo4Interface  ,
 
)
protected
void TGo4Interface::ConfigStep ( const char *  stepname,
Bool_t  enableprocess,
Bool_t  enablesource,
Bool_t  enablestore 
)
virtual
void TGo4Interface::ConnectAnalysis ( const char *  ServerNode,
Int_t  ServerPort,
Int_t  UserMode,
const char *  password = 0 
)
virtual

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 from TGo4AbstractInterface.

Definition at line 184 of file TGo4Interface.cxx.

References AddAnalysisProxy(), TGo4AbstractInterface::Analysis(), TGo4AnalysisProxy::ConnectToServer(), ProcessEvents(), and TGo4AnalysisProxy::RequestAnalysisSettings().

void TGo4Interface::DisconnectAnalysis ( )
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 230 of file TGo4Interface.cxx.

References TGo4AbstractInterface::Analysis(), TGo4AbstractInterface::Browser(), TGo4AnalysisProxy::DisconnectAnalysis(), ProcessEvents(), and TGo4BrowserProxy::ToggleMonitoring().

Referenced by ~TGo4Interface().

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

Divide viewpanel on subpads.

Reimplemented from TGo4AbstractInterface.

Definition at line 613 of file TGo4Interface.cxx.

Bool_t TGo4Interface::DrawItem ( const char *  itemname,
ViewPanelHandle  panel = 0,
const char *  drawopt = 0 
)
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 626 of file TGo4Interface.cxx.

References TGo4AbstractInterface::GetObject(), and StartViewPanel().

ViewPanelHandle TGo4Interface::FindViewPanel ( const char *  name)
virtual

Return handle on viewpanel with specified name.

Reimplemented from TGo4AbstractInterface.

Definition at line 576 of file TGo4Interface.cxx.

ViewPanelHandle TGo4Interface::GetActiveViewPanel ( )
virtual

Return handle of last active viewpanel.

Reimplemented from TGo4AbstractInterface.

Definition at line 598 of file TGo4Interface.cxx.

TGo4AnalysisStatus * TGo4Interface::GetAnalStatus ( )
protected
TGo4AnalysisStepStatus * TGo4Interface::GetStepStatus ( const char *  stepname)
protected
TString TGo4Interface::GetViewPanelName ( ViewPanelHandle  panel)
virtual

Return name of viewpanel.

Reimplemented from TGo4AbstractInterface.

Definition at line 570 of file TGo4Interface.cxx.

Bool_t TGo4Interface::HandleTimer ( TTimer *  timer)
virtual
void TGo4Interface::HotStart ( const char *  filename)
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

Implements TGo4AbstractInterface.

Definition at line 680 of file TGo4Interface.cxx.

References fCmdFinished, fCmdTimer, TGo4AbstractInterface::FreeHotStartCmds(), and TGo4AbstractInterface::LoadHotStart().

void TGo4Interface::LaunchAnalysis ( )
virtual

Launch analysis in client mode, using default configuration. Can only work in standard GUI mode

Reimplemented from TGo4AbstractInterface.

Definition at line 121 of file TGo4Interface.cxx.

void TGo4Interface::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 = 0 
)
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 155 of file TGo4Interface.cxx.

References AddAnalysisProxy(), TGo4AnalysisProxy::LaunchAsClient(), and ProcessEvents().

void TGo4Interface::Message ( const char *  msg)
virtual

Display message in GUI status line

Reimplemented from TGo4AbstractInterface.

Definition at line 115 of file TGo4Interface.cxx.

References fRootBrowser, and TGo4RootBrowserProxy::Message().

Referenced by SetViewPanelName().

void TGo4Interface::ProcessEvents ( Int_t  timeout = -1)
protectedvirtual

Implements TGo4AbstractInterface.

Definition at line 93 of file TGo4Interface.cxx.

References Wait().

Referenced by ConnectAnalysis(), DisconnectAnalysis(), and LaunchAnalysis().

void TGo4Interface::ProcessHotStart ( )
void TGo4Interface::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 from TGo4AbstractInterface.

Definition at line 637 of file TGo4Interface.cxx.

References TGo4AbstractInterface::RedrawItem().

void TGo4Interface::RedrawPanel ( ViewPanelHandle  panel)
virtual

Forces of panel redraw.

Reimplemented from TGo4AbstractInterface.

Definition at line 604 of file TGo4Interface.cxx.

void TGo4Interface::RefreshNamesList ( int  tmout = 10)
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 300 of file TGo4Interface.cxx.

References TGo4ServerProxy::NamesListReceived(), TGo4ServerProxy::RefreshNamesList(), and TGo4AbstractInterface::Server().

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

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 from TGo4AbstractInterface.

Definition at line 619 of file TGo4Interface.cxx.

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

Change name of viewpanel.

Reimplemented from TGo4AbstractInterface.

Definition at line 581 of file TGo4Interface.cxx.

References Message().

void TGo4Interface::ShutdownAnalysis ( )
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 242 of file TGo4Interface.cxx.

References TGo4AbstractInterface::Analysis(), TGo4AbstractInterface::Browser(), TGo4AnalysisProxy::DisconnectAnalysis(), TGo4AnalysisProxy::IsAdministrator(), TGo4AnalysisProxy::IsAnalysisServer(), TGo4AnalysisProxy::IsConnected(), and TGo4BrowserProxy::ToggleMonitoring().

void TGo4Interface::StartAnalysis ( )
virtual
ViewPanelHandle TGo4Interface::StartViewPanel ( )
virtual

Create new view panel. Handle, returned by this method, must be used for other operation, like DivideViewPanel() or SelectPad()

Reimplemented from TGo4AbstractInterface.

Definition at line 549 of file TGo4Interface.cxx.

Referenced by DrawItem().

ViewPanelHandle TGo4Interface::StartViewPanel ( int  x,
int  y,
int  width,
int  height,
int  mode = 1,
TGo4Picture pic = 0 
)
virtual

Create new viewpanel with specified parameters. Returns handle of newly created viewpanel. Parameters: x,y - left top corner coordinate of view panel; width, height - panel size; mode - display mode for view panel (0 - minimized, 1 - normal, 2 - maximized); pic - TGo4Picture object, which includes configuration of 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.

Reimplemented from TGo4AbstractInterface.

Definition at line 554 of file TGo4Interface.cxx.

References TGo4RootBrowserProxy::DrawPicture(), and fRootBrowser.

void TGo4Interface::StepBackStore ( const char *  stepname,
const char *  storename,
int  bufsize,
int  splitlevel 
)
virtual
void TGo4Interface::StepFileSource ( const char *  stepname,
const char *  sourcename,
int  timeout 
)
virtual

Set file source as step data source

Reimplemented from TGo4AbstractInterface.

Definition at line 369 of file TGo4Interface.cxx.

References GetStepStatus(), TGo4AnalysisStepStatus::SetSourcePar(), and TGo4EventSourceParameter::SetTimeout().

void TGo4Interface::StepFileStore ( const char *  stepname,
const char *  storename,
bool  overwrite,
int  bufsize,
int  splitlevel,
int  compression,
int  autosaveperiod = 10000 
)
virtual
void TGo4Interface::StepMbsEventServerSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
int  start = 0,
int  stop = 0,
int  interval = 0 
)
virtual
void TGo4Interface::StepMbsFileSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
const char *  TagFile,
int  start = 0,
int  stop = 0,
int  interval = 0 
)
virtual
void TGo4Interface::StepMbsRevServSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
int  port,
int  start = 0,
int  stop = 0,
int  interval = 0 
)
virtual
void TGo4Interface::StepMbsStreamSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
int  start = 0,
int  stop = 0,
int  interval = 0 
)
virtual
void TGo4Interface::StepMbsTransportSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
int  start = 0,
int  stop = 0,
int  interval = 0 
)
virtual
void TGo4Interface::StepRandomSource ( const char *  stepname,
const char *  sourcename,
int  timeout 
)
virtual

Set random generator as step data source

Reimplemented from TGo4AbstractInterface.

Definition at line 477 of file TGo4Interface.cxx.

References GetStepStatus(), TGo4AnalysisStepStatus::SetSourcePar(), and TGo4EventSourceParameter::SetTimeout().

void TGo4Interface::StepUserSource ( const char *  stepname,
const char *  sourcename,
int  timeout,
int  port,
const char *  expr 
)
virtual
void TGo4Interface::StepUserStore ( const char *  stepname,
const char *  storename 
)
virtual

Set user store as step data storage

Reimplemented from TGo4AbstractInterface.

Definition at line 539 of file TGo4Interface.cxx.

References GetStepStatus(), and TGo4AnalysisStepStatus::SetStorePar().

void TGo4Interface::StopAnalysis ( )
virtual

Stop (suspend) analysis execution

Reimplemented from TGo4AbstractInterface.

Definition at line 288 of file TGo4Interface.cxx.

References TGo4AbstractInterface::Server(), and TGo4ServerProxy::StopAnalysis().

void TGo4Interface::SubmitAnalysisConfig ( int  tmout = 20)
virtual

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 from TGo4AbstractInterface.

Definition at line 256 of file TGo4Interface.cxx.

References TGo4ServerProxy::IsAnalysisSettingsReady(), TGo4ServerProxy::NamesListReceived(), TGo4ServerProxy::RefreshNamesList(), TGo4AbstractInterface::Server(), and TGo4ServerProxy::SubmitAnalysisSettings().

void TGo4Interface::Wait ( double  tm_sec)
virtual

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

Reimplemented from TGo4AbstractInterface.

Definition at line 98 of file TGo4Interface.cxx.

Referenced by ProcessEvents().

void TGo4Interface::WaitAnalysis ( Int_t  delay_sec)
virtual

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 from TGo4AbstractInterface.

Definition at line 206 of file TGo4Interface.cxx.

References TGo4AbstractInterface::Analysis(), fWaitCounter, TGo4ServerProxy::IsAnalysisReady(), and TGo4AbstractInterface::IsHotStart().

Member Data Documentation

Bool_t TGo4Interface::fCmdFinished
protected

Definition at line 172 of file TGo4Interface.h.

Referenced by HotStart(), and ProcessHotStart().

TTimer* TGo4Interface::fCmdTimer
protected

Definition at line 173 of file TGo4Interface.h.

Referenced by HandleTimer(), HotStart(), and ~TGo4Interface().

TString TGo4Interface::fOMBrowserPath
protected

Definition at line 170 of file TGo4Interface.h.

Referenced by TGo4Interface().

TString TGo4Interface::fOMDataPath
protected

Definition at line 169 of file TGo4Interface.h.

Referenced by AddAnalysisProxy(), and TGo4Interface().

TString TGo4Interface::fOMEditorsPath
protected

Definition at line 171 of file TGo4Interface.h.

Referenced by AddAnalysisProxy(), and TGo4Interface().

TGo4RootBrowserProxy* TGo4Interface::fRootBrowser
protected

Definition at line 168 of file TGo4Interface.h.

Referenced by AddAnalysisProxy(), Message(), StartViewPanel(), and TGo4Interface().

Int_t TGo4Interface::fWaitCounter
protected

Definition at line 174 of file TGo4Interface.h.

Referenced by HandleTimer(), and WaitAnalysis().


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