19#include "TStopwatch.h"
85 gSystem->ProcessEvents();
95 Wait(timeout <= 0 ? 0 : timeout*0.001);
102 Double_t spenttime = 0.;
103 Bool_t first = kTRUE;
107 if (first) first = kFALSE;
108 else gSystem->Sleep(50);
109 gSystem->ProcessEvents();
111 spenttime += watch.RealTime();
112 }
while (spenttime <= tm_sec);
129 const char *analisysitem =
"Analysis";
156 const char *ClientDir,
157 const char *ClientExec,
158 const char *ClientNode,
162 const char *UserArgs)
164 TString launchcmd, killcmd;
179 gSystem->ProcessEvents();
186 Int_t ControllerMode,
187 const char *password)
199 if (ControllerMode>0)
215 Error(
"WaitAnalysis",
"Analysis not found");
221 while (delay_sec-->0) {
222 gSystem->ProcessEvents();
224 gSystem->ProcessEvents();
264 Int_t delay_sec = tmout > 0 ? tmout : 20;
265 while (delay_sec-->0) {
266 gSystem->ProcessEvents();
267 gSystem->Sleep(1000);
268 gSystem->ProcessEvents();
283 gSystem->ProcessEvents();
285 gSystem->ProcessEvents();
295 gSystem->ProcessEvents();
296 gSystem->Sleep(1000);
297 gSystem->ProcessEvents();
307 Int_t delay_sec = tmout > 0 ? tmout : 10;
308 while (delay_sec-->0) {
309 gSystem->ProcessEvents();
310 gSystem->Sleep(1000);
311 gSystem->ProcessEvents();
320 if (!anal)
return nullptr;
357 Bool_t enableprocess,
370 const char *sourcename,
382 const char *sourcename,
404 const char *sourcename,
422 const char *sourcename,
440 const char *sourcename,
458 const char *sourcename,
478 const char *sourcename,
490 const char *sourcename,
506 const char *storename,
526 const char *storename,
540 const char *storename)
556 static Int_t cancounter = 0;
558 TString cname =
"Panel";
561 TCanvas *c =
new TCanvas(cname.Data(), TString(
"Drawing of ") + cname, width, height);
572 TCanvas *c = (TCanvas *) handle;
573 return TString(c ? c->GetName() :
"");
583 TCanvas *c = (TCanvas *) handle;
584 if (!c || !newname || (strlen(newname) == 0))
return kFALSE;
586 if (gROOT->GetListOfCanvases()->FindObject(newname)) {
587 Message(TString::Format(
"Canvas with name %s already exists",newname).Data());
605 TCanvas *c = (TCanvas *) handle;
614 TCanvas *c = (TCanvas *) handle;
615 if (c) c->Divide(numX, numY);
620 TCanvas *c = (TCanvas *) handle;
621 if (c)
return (TPad *) c->cd(number);
629 TObject *obj =
GetObject(itemname, 5000);
631 if (obj) obj->Draw(drawopt);
633 return obj !=
nullptr;
640 TIter next(gROOT->GetListOfCanvases());
641 while (
auto pad = (TPad *) next()) {
645 while (
auto subpad = pad->GetPad(number++))
679 if (!filename || (strlen(filename) == 0))
return;
696 Error(
"ProcessHotStart",
"Internal problem");
706 gROOT->ProcessLineSync(nextcmd, &error);
710 Error(
"ProcessHotStart",
"ProcessLine(\"%s\") error %d", nextcmd, error);
Bool_t IsHotStart() const
TGo4AnalysisProxy * Analysis()
Returns pointer on analysis proxy.
virtual void RedrawItem(const char *itemname)
Redraw item of given name on all viewpanels/editors.
TGo4BrowserProxy * Browser() const
Returns pointer on browser proxy.
TGo4AbstractInterface()
Constructor.
TGo4ObjectManager * OM() const
Returns pointer on object manager.
const char * NextHotStartCmd()
TGo4ServerProxy * Server()
Returns pointer on more generic server proxy.
void Initialize(TGo4ObjectManager *om, TGo4BrowserProxy *br)
list of shared libraries when application is started
Bool_t LoadHotStart(const char *filename)
virtual TObject * GetObject(const char *itemname, Int_t updatelevel=1)
Returns object, assigned to specified browser item.
Bool_t IsAdministrator() const override
Bool_t IsConnected() const override
void RequestAnalysisSettings() override
Bool_t ConnectToServer(const char *remotehost, Int_t remoteport, Int_t ascontroller, const char *accesspass)
Bool_t IsAnalysisServer() const override
void DisconnectAnalysis(Int_t waittime=30, Bool_t servershutdown=kFALSE) override
Close connection to analysis and destroys proxy with correspondent slot.
Bool_t LaunchAsClient(TString &launchcmd, TString &killcmd, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, const char *remotedir, const char *remoteexe, Int_t exe_kind=0, const char *exeargs=nullptr)
void SetDefaultReceiver(TGo4ObjectManager *rcv, const char *path)
Set receiver for object envelopes, which coming from analysis without request.
Status of the analysis instance.
void SetAutoSaveInterval(Int_t i)
void SetConfigFileName(const char *name)
void SetAutoSaveCompression(Int_t i=5)
void SetAutoSaveOverwrite(Bool_t over=kTRUE)
TGo4AnalysisStepStatus * GetStepStatus(const char *name)
Access to certain analysis step status by name.
void SetAutoFileName(const char *name)
void SetAutoSaveOn(Bool_t on=kTRUE)
Status object of one analysis step.
void SetSourceEnabled(Bool_t on=kTRUE)
Enables or disables the event source.
void SetStorePar(TGo4EventStoreParameter *kind)
Sets the event store parameter which is used on intitialization of this step.
void SetStoreEnabled(Bool_t on=kTRUE)
Enables or disables the event store.
void SetProcessEnabled(Bool_t on=kTRUE)
Enables or disables the event processing.
void SetSourcePar(TGo4EventSourceParameter *kind)
Sets the event source parameter which is used on intitialization of this step.
void SetSplitlevel(Int_t split)
void SetBufsize(Int_t bufsize)
TGo4Slot * BrowserTopSlot()
void ToggleMonitoring(Int_t period)
void CreateMemoryFolder(const char *foldername=nullptr)
TGo4Slot * DataSlot(const char *item)
void SetTimeout(Int_t out)
void SetSplitlevel(Int_t split)
void SetCompression(Int_t comp)
void SetOverwriteMode(Bool_t over=kTRUE)
void SetBufsize(Int_t bufsize)
void SetAutosaveSize(Int_t interval)
void ProcessEvents(Int_t timeout=-1) override
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0) override
Set MBS remote event server as step data source.
void StopAnalysis() override
Stop (suspend) analysis execution.
Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname) override
Change name of viewpanel.
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS transport server as step data source.
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0) override
Set MBS file source as step data source.
void WaitAnalysis(Int_t delay_sec) override
Waits, until connection to analysis is established.
TString GetViewPanelName(ViewPanelHandle handle) override
Return name of viewpanel.
TGo4AnalysisStepStatus * GetStepStatus(const char *stepname)
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr) override
Set user data source as step data source.
void AnalysisConfigName(const char *filename) override
Configure name of file, where analysis configuration will be saved.
void RedrawItem(const char *itemname) override
Redraw item of given name on all viewpanels/editors.
ViewPanelHandle StartViewPanel() override
Create new view panel.
void Message(const char *msg) override
Display message in GUI status line.
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS event server as step data source.
void DisconnectAnalysis() override
Disconnects from running analysis.
void StepRandomSource(const char *stepname, const char *sourcename, int timeout) override
Set random generator as step data source.
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite) override
Configure autosave properties of analysis.
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0) override
Set MBS stream server as step data source.
ViewPanelHandle GetActiveViewPanel() override
Return handle of last active viewpanel.
void Wait(double tm_sec) override
Wait specified number of seconds.
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY) override
Divide viewpanel on subpads.
Bool_t HandleTimer(TTimer *timer) override
TGo4AnalysisStatus * GetAnalStatus()
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore) override
Set basic step properties.
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000) override
Set file as step data storage.
void HotStart(const char *filename) override
Executes hotstart file, generated in go4 GUI.
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0) override
Set active pad on viewpanel.
void StartAnalysis() override
Starts (resume) analysis execution.
TGo4AnalysisProxy * AddAnalysisProxy(Bool_t isserver)
void ShutdownAnalysis() override
Shutdown running analysis.
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel) override
Set back store as step data storage.
void SubmitAnalysisConfig(int tmout=20) override
Submit configuration to analysis.
void RedrawPanel(ViewPanelHandle panel) override
Forces of panel redraw.
TGo4RootBrowserProxy * fRootBrowser
void StepUserStore(const char *stepname, const char *storename) override
Set user store as step data storage.
void StepFileSource(const char *stepname, const char *sourcename, int timeout) override
Set file source as step data source.
ViewPanelHandle FindViewPanel(const char *name) override
Return handle on viewpanel with specified name.
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=nullptr) override
Connect to running analysis server.
void RefreshNamesList(int tmout=10) override
Sends new request to the analysis and waits for new names list.
void LaunchAnalysis() override
Launch analysis in client mode, using default configuration.
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=nullptr, const char *drawopt=nullptr) override
Draw browser item on specified viewpanel.
MBS event server parameter.
void SetTagName(const char *name)
Name of the Tagfile.
void SetStartEvent(UInt_t firstindex)
Define the Start index for the NextEvent.
void SetPort(Int_t port)
Set optional port number, 0 or negative value means that default port number will be used.
void SetStopEvent(UInt_t lastindex)
Define the index of Stop event.
void SetEventInterval(UInt_t skipinterval)
Defines event interval.
void AddProxy(const char *pathname, TGo4Proxy *cont, const char *name, const char *title="title")
TGo4Slot * AddLink(TGo4Slot *source, const char *pathname, const char *linkname, const char *linktitle)
void MakeFolder(const char *pathname)
Picture cconfiguration in Go4.
special base class for remote data servers like DABC, HTTP, hist server
Bool_t IsAnalysisSettingsReady() const
virtual void StartAnalysis()
virtual void StopAnalysis()
void SetAnalysisReady(Bool_t on=kTRUE)
virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec)
TGo4Slot * RatemeterSlot()
virtual void SubmitAnalysisSettings()
TGo4Slot * SettingsSlot()
Bool_t IsAnalysisReady() const
virtual Bool_t NamesListReceived() const
virtual Bool_t RefreshNamesList()
TGo4Proxy * GetProxy() const
void SetExpression(const char *name)