GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Script.cxx
Go to the documentation of this file.
1 // $Id: TGo4Script.cxx 1995 2017-03-10 12:40:46Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum f�r Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4Script.h"
15 
16 #include <stdlib.h>
17 #include <stdio.h>
18 
19 #include "TString.h"
20 #include "TROOT.h"
21 #include "TSystem.h"
22 #include "TInterpreter.h"
23 #include "TPad.h"
24 #include "TCanvas.h"
25 #include "TStopwatch.h"
26 
27 #include "TGo4QSettings.h"
28 #include "TGo4BrowserProxy.h"
29 #include "TGo4AnalysisProxy.h"
30 #include "TGo4DirProxy.h"
31 #include "TGo4HServProxy.h"
32 #include "TGo4DabcProxy.h"
33 #include "TGo4HttpProxy.h"
34 #include "TGo4Iter.h"
35 #include "TGo4Log.h"
36 
38 #include "TGo4ConfigStep.h"
39 #include "TGo4AnalysisWindow.h"
40 #include "TGo4MdiArea.h"
41 #include "TGo4Picture.h"
42 #include "TGo4ViewPanel.h"
43 #include "TGo4MainWindow.h"
44 #include "TGo4Slot.h"
45 
46 #include <QMdiSubWindow>
47 
48 #include <QNetworkAccessManager>
49 
50 
52 {
53  return dynamic_cast<TGo4Script*> (Instance());
54 }
55 
58  fiWaitForGUIReaction(0),
59  fiWaitCounter(0),
60  fStrBuf(),
61  fMainWin(mainwin),
62  fErrorFlag(kFALSE),
63  fBlockConfigFlag(0)
64 {
65  if (mainwin!=0)
66  Initialize(mainwin->OM(), mainwin->Browser());
67 }
68 
70 {
71 }
72 
73 
74 Bool_t TGo4Script::StartScriptExecution(const char* fname)
75 {
76  if ((fname==0) || (strlen(fname)==0)) return kFALSE;
77 
79 
80  if (!LoadHotStart(fname)) return kFALSE;
81 
83  fiWaitCounter = getCounts(0.1);
84 
85  doOutput("Start hostart script execution");
86 
87  return kTRUE;
88 }
89 
90 Int_t TGo4Script::getCounts(Double_t tm)
91 {
92  return int(tm*1000./DelayMillisec());
93 }
94 
95 void TGo4Script::doOutput(const char* str)
96 {
97  if (fMainWin!=0)
98  fMainWin->StatusMessage(str);
99 }
100 
102 {
103  if ((fMainWin==0) || !IsHotStart()) return kFALSE;
104 
105  switch (execGUICommands()) {
106  case 0:
107  return kFALSE;
108  case 1:
110  fiWaitCounter = 0;
111  break;
112  case 2:
113  fiWaitCounter--;
114  return kTRUE;
115  }
116 
117  const char* nextcmd = NextHotStartCmd();
118  if (nextcmd==0) return kFALSE;
119 
120  Int_t error = 0;
121  gROOT->ProcessLineSync(nextcmd, &error);
122 
123  if (error!=0) {
124  doOutput(Form("Error = %d. CMD: %s", error, nextcmd));
125  return kFALSE;
126  }
127 
128  return kTRUE;
129 }
130 
132 {
134  fErrorFlag = kFALSE;
136  fiWaitCounter = 0;
137 }
138 
140 {
141  return fiWaitCounter>0;
142 }
143 
145 {
146  // do postprocessing of command only if normal script is executed
147  if (IsHotStart()) return;
148 
149  // if error was before, nothing todo
150  if (fErrorFlag || (fMainWin==0)) return;
151 
152  TStopwatch watch;
153 
154  Int_t loopnumbers = 0;
155  Double_t spenttime = 0;
156 
157  do {
158 
159  loopnumbers++;
160  Bool_t first = kTRUE;
161 
162  do {
163  watch.Start();
164  if (first) first = kFALSE;
165  else gSystem->Sleep(DelayMillisec());
167  watch.Stop();
168  spenttime += watch.RealTime();
169  } while (spenttime < loopnumbers*0.001*DelayMillisec());
170 
171  switch (execGUICommands()) {
172  case 0: // error
174  fiWaitCounter = 0;
175  fErrorFlag = kTRUE;
176  return;
177  case 1: // finish command
179  fiWaitCounter = 0;
180  return;
181  case 2: // next turn
182  fiWaitCounter--;
183  }
184  } while (loopnumbers < 1000000);
185 }
186 
187 void TGo4Script::ProcessEvents(Int_t timeout)
188 {
189  Wait(timeout <= 0 ? 0 : timeout*0.001);
190 }
191 
193 {
194  switch (fiWaitForGUIReaction) {
195  case 0:
196  return 1;
197 
198  case 1: { // execute launch client method
199  TGo4ServerProxy* anal = Server();
200 
201  if((anal!=0) && anal->IsAnalysisReady()) {
202  doOutput("// Disconnect old analysis first");
205  fiWaitCounter = getCounts(10.);
206  return 2;
207  }
208 
209  fMainWin->LaunchClientSlot(false);
210 
211  doOutput("// Start analysis client");
212 
213  // wait 5 sec for analysis ready
215  fiWaitCounter = getCounts(5.);
216 
217  return 2;
218  }
219 
220  case 2: { // check if analysis is ready, can continue if not ok
221  TGo4ServerProxy* anal = Server();
222  if ((anal!=0) && anal->IsAnalysisReady()) return 1;
223  return (fiWaitCounter<2) ? 1 : 2;
224  }
225 
226  case 3: { // wait while analysis is disconnected
227  TGo4ServerProxy* anal = Server();
228  if((anal==0) || !anal->IsAnalysisReady()) {
230  fiWaitCounter = getCounts(5.);
231  return 2;
232  }
233  return (fiWaitCounter<2) ? 0 : 2;
234  }
235 
236  case 4: { // wait time and lunch analysis again
237  if (fiWaitCounter<5)
239  return 2;
240  }
241 
242  case 5: { // check if analysis is ready, abort if not ok
243  TGo4ServerProxy* anal = Server();
244  if (anal==0) return 0;
245  if (anal->IsAnalysisReady()) return 1;
246  return (fiWaitCounter<2) ? 0 : 2;
247  }
248 
249  case 10: { // wait until submitted settings are set
250  TGo4ServerProxy* anal = Server();
251  if ((anal!=0) && anal->IsAnalysisSettingsReady()) {
253  // fiWaitCounter = getCounts(20.); // counter is for complete operation
254  return 2;
255  }
256  return (fiWaitCounter<2) ? 0 : 2;
257  }
258 
259  case 11: { // wait until remote browser refresh it's data
260  TGo4ServerProxy* anal = Server();
261  if ((anal!=0) && anal->NamesListReceived()) return 1;
262  return (fiWaitCounter<2) ? 0 : 2;
263  }
264 
265  case 12: { // wait until analysis will be disconnected
266  TGo4ServerProxy* anal = Server();
267  if (anal==0) return 1;
268  return (fiWaitCounter<2) ? 0 : 2;
269  }
270 
271  case 15: { // connect to running server
272  fMainWin->ConnectServerSlot(false, fStrBuf.Data());
273 
274  // wait 5 sec for analysis ready,
276  fiWaitCounter = getCounts(5.);
277 
278  return 2;
279  }
280 
281  case 111: { // just wait time and take next command
282  return (fiWaitCounter<2) ? 1 : 2;
283  }
284  } //switch
285 
286  return 2;
287 }
288 
289 // ******************* Functions to be used in GUI script *************
290 
291 void TGo4Script::Wait(double tm_sec)
292 {
293  fiWaitForGUIReaction = 111;
294  fiWaitCounter = getCounts(tm_sec);
295  if (fiWaitCounter<0) fiWaitCounter = 1;
296 
298 }
299 
300 
301 void TGo4Script::Message(const char* msg)
302 {
303  if (fMainWin!=0)
304  fMainWin->StatusMessage(msg);
305 }
306 
307 
308 void TGo4Script::HotStart(const char* filename)
309 {
310  fMainWin->HotStart(filename);
311 }
312 
314 {
316  fiWaitCounter = getCounts(1.);
317 
319 }
320 
321 void TGo4Script::LaunchAnalysis(const char* ClientName,
322  const char* ClientDir,
323  const char* ClientExec,
324  const char* ClientNode,
325  Int_t ShellMode,
326  Int_t TermMode,
327  Int_t ExeMode,
328  const char* UserArgs)
329 {
330  go4sett->setClientName(ClientName);
331  go4sett->setClientDir(ClientDir);
332  go4sett->setClientExeMode(ExeMode);
333  go4sett->setClientExec(ClientExec);
334  go4sett->setClientArgs(UserArgs);
335  const char* separ = strrchr(ClientNode, ':');
336  if (separ==0) {
337  go4sett->setClientNode(ClientNode);
339  } else {
340  TString node;
341  node.Append(ClientNode, separ - ClientNode);
342  go4sett->setClientNode(node.Data());
344  go4sett->setClientPort(TString(separ+1).Atoi());
345  }
346 
347  go4sett->setClientShellMode(ShellMode);
348  go4sett->setClientTermMode(TermMode);
349  LaunchAnalysis();
350 }
351 
352 void TGo4Script::ConnectAnalysis(const char* ServerNode,
353  Int_t ServerPort,
354  Int_t ControllerMode,
355  const char* password)
356 {
357  go4sett->setClientNode(ServerNode);
358  go4sett->setClientPort(ServerPort);
359  go4sett->setClientControllerMode(ControllerMode);
360  go4sett->setClientDefaultPass((password==0) || (*password==0));
362  fStrBuf = password;
363  fiWaitCounter = getCounts(1.);
364 
366 }
367 
368 void TGo4Script::WaitAnalysis(Int_t delay_sec)
369 {
371  fiWaitCounter = getCounts(delay_sec);
372 
374 }
375 
377 {
379 
381  fiWaitCounter = getCounts(20.);
382 
384 }
385 
387 {
389 
391  fiWaitCounter = getCounts(20.);
392 
394 }
395 
397 {
398  if (CanConfigureAnalysis())
401  fiWaitCounter = getCounts(tmout);
402  }
403 
405 }
406 
408 {
409  if (CanConfigureAnalysis()) {
411  if (dynamic_cast<TGo4HttpProxy*>(Server())!=0)
412  Wait(0.1);
413  else
414  Wait(1.);
415  } else {
416  fBlockConfigFlag = -1; // from this command blocking is disabled
417  }
418 }
419 
421 {
422  if (CanConfigureAnalysis()) {
424  if (dynamic_cast<TGo4HttpProxy*>(Server())!=0)
425  Wait(0.1);
426  else
427  Wait(2.);
428  } else {
429  fBlockConfigFlag = -1; // from this command blocking is disabled
430  }
431 }
432 
434 {
435  TGo4ServerProxy* anal = Server();
436  if (anal!=0) {
437  anal->RefreshNamesList();
439  fiWaitCounter = getCounts(tmout > 0 ? tmout : 10);
440  }
441 
443 }
444 
446 {
447  if (fBlockConfigFlag == 0) {
448  // once a session check if analysis was not launched from the GUI, we should not try to configure it
449  TGo4HttpProxy* serv = dynamic_cast<TGo4HttpProxy*> (Server());
450  if ((serv!=0) && !serv->IsAnalysisLaunched()) fBlockConfigFlag = 1;
451  }
452 
453  return (fBlockConfigFlag<=0);
454 }
455 
456 
458 {
460  QWidget* gui = gui_ ? gui_->parentWidget() : 0;
461  if (gui==0) return;
462 
463  if (mode<0) gui->hide(); else
464  if (mode==0) gui->showMinimized(); else
465  gui->showNormal();
466 }
467 
469 {
471  QWidget* gui = gui_ ? gui_->parentWidget() : 0;
472  if (gui==0) return;
473 
474  if (mode<0) gui->hide(); else
475  if (mode==0) gui->showMinimized(); else
476  gui->showNormal();
477 }
478 
479 void TGo4Script::AnalysisAutoSave(const char* filename,
480  Int_t interval,
481  Int_t compression,
482  Bool_t enabled,
483  Bool_t overwrite)
484 {
486  if((gui!=0) && CanConfigureAnalysis())
487  gui->SetAutoSaveConfig(filename, interval, compression, enabled, overwrite);
488 }
489 
490 void TGo4Script::AnalysisConfigName(const char* filename)
491 {
493  if((gui!=0) && CanConfigureAnalysis())
494  gui->SetAnalysisConfigFile(filename);
495 }
496 
498 {
499  // in cannot configure analysis - do not return step gui pointer
500  if (!CanConfigureAnalysis()) return 0;
501 
503 
504  return gui==0 ? 0 : gui->FindStepConfig(stepname);
505 }
506 
507 void TGo4Script::ConfigStep(const char* stepname,
508  Bool_t enableprocess,
509  Bool_t enablesource,
510  Bool_t enablestore)
511 {
512  TGo4ConfigStep* step = GetStepGUI(stepname);
513  if (step)
514  step->SetStepControl(enableprocess, enablesource, enablestore);
515 }
516 
517 void TGo4Script::StepFileSource(const char* stepname,
518  const char* sourcename,
519  int timeout)
520 {
521  TGo4ConfigStep* step = GetStepGUI(stepname);
522  if (step) {
523  step->SetFileSource();
524  step->SetSourceWidgets(sourcename, timeout);
525  }
526 }
527 
528 void TGo4Script::StepMbsFileSource(const char* stepname,
529  const char* sourcename,
530  int timeout,
531  const char* TagFile,
532  int start,
533  int stop,
534  int interval)
535 {
536  TGo4ConfigStep* step = GetStepGUI(stepname);
537  if (step) {
538  step->SetMbsFileSource(TagFile);
539  step->SetSourceWidgets(sourcename, timeout);
540  step->SetMbsSourceWidgets(start, stop, interval);
541  }
542 }
543 
544 void TGo4Script::StepMbsStreamSource(const char* stepname,
545  const char* sourcename,
546  int timeout,
547  int start,
548  int stop,
549  int interval)
550 {
551  TGo4ConfigStep* step = GetStepGUI(stepname);
552  if (step) {
553  step->SetMbsStreamSource();
554  step->SetSourceWidgets(sourcename, timeout);
555  step->SetMbsSourceWidgets(start, stop, interval);
556  }
557 }
558 
559 void TGo4Script::StepMbsTransportSource(const char* stepname,
560  const char* sourcename,
561  int timeout,
562  int start,
563  int stop,
564  int interval)
565 {
566  TGo4ConfigStep* step = GetStepGUI(stepname);
567  if (step) {
568  step->SetMbsTransportSource();
569  step->SetSourceWidgets(sourcename, timeout);
570  step->SetMbsSourceWidgets(start, stop, interval);
571  }
572 }
573 
574 void TGo4Script::StepMbsEventServerSource(const char* stepname,
575  const char* sourcename,
576  int timeout,
577  int start,
578  int stop,
579  int interval)
580 {
581  TGo4ConfigStep* step = GetStepGUI(stepname);
582  if (step) {
583  step->SetMbsEventServerSource();
584  step->SetSourceWidgets(sourcename, timeout);
585  step->SetMbsSourceWidgets(start, stop, interval);
586  }
587 }
588 
589 void TGo4Script::StepMbsRevServSource(const char* stepname,
590  const char* sourcename,
591  int timeout,
592  int port,
593  int start,
594  int stop,
595  int interval)
596 {
597  TGo4ConfigStep* step = GetStepGUI(stepname);
598  if (step) {
599  step->SetMbsRevServSource(port);
600  step->SetSourceWidgets(sourcename, timeout);
601  step->SetMbsSourceWidgets(start, stop, interval, port);
602  }
603 }
604 
605 void TGo4Script::StepMbsSelection(const char* stepname,
606  int start,
607  int stop,
608  int interval)
609 {
610  TGo4ConfigStep* step = GetStepGUI(stepname);
611  if (step)
612  step->SetMbsSourceWidgets(start, stop, interval);
613 }
614 
615 void TGo4Script::StepRandomSource(const char* stepname,
616  const char* sourcename,
617  int timeout)
618 {
619  TGo4ConfigStep* step = GetStepGUI(stepname);
620  if (step) {
621  step->SetRandomSource();
622  step->SetSourceWidgets(sourcename, timeout);
623  }
624 }
625 
626 void TGo4Script::StepMbsPort(const char* stepname,
627  int port)
628 {
629  TGo4ConfigStep* step = GetStepGUI(stepname);
630  if (step) step->SetMbsPort(port);
631 }
632 
633 void TGo4Script::StepMbsRetryCnt(const char* stepname,
634  int cnt)
635 {
636  TGo4ConfigStep* step = GetStepGUI(stepname);
637  if (step) step->SetMbsRetryCnt(cnt);
638 }
639 
640 void TGo4Script::StepUserSource(const char* stepname,
641  const char* sourcename,
642  int timeout,
643  int port,
644  const char* expr)
645 {
646  TGo4ConfigStep* step = GetStepGUI(stepname);
647  if (step) {
648  step->SetUserSource(port, expr);
649  step->SetSourceWidgets(sourcename, timeout);
650  }
651 }
652 
653 void TGo4Script::StepFileStore(const char* stepname,
654  const char* storename,
655  bool overwrite,
656  int bufsize,
657  int splitlevel,
658  int compression,
659  int autosaveperiod)
660 {
661  TGo4ConfigStep* step = GetStepGUI(stepname);
662  if (step)
663  step->SetFileStore(storename, overwrite, bufsize, splitlevel, compression, autosaveperiod);
664 }
665 
666 void TGo4Script::StepBackStore(const char* stepname,
667  const char* storename,
668  int bufsize,
669  int splitlevel)
670 {
671  TGo4ConfigStep* step = GetStepGUI(stepname);
672  if (step)
673  step->SetBackStore(storename, bufsize, splitlevel);
674 }
675 
676 void TGo4Script::SetMainWindowState(int qtversion, const char* val)
677 {
678  if (qtversion==4)
679  fMainWin->restoreState(QByteArray::fromHex(val));
680 }
681 
682 void TGo4Script::SetMainWindowGeometry(int qtversion, const char* val)
683 {
684  if (qtversion==4)
685  fMainWin->restoreGeometry(QByteArray::fromHex(val));
686 }
687 
689 {
690  return fMainWin->MakeNewPanel(1);
691 }
692 
693 ViewPanelHandle TGo4Script::StartViewPanel(int x, int y, int width, int height, int mode, TGo4Picture* pic)
694 {
695  TGo4ViewPanel* panel = fMainWin->MakeNewPanel(1);
696  if (panel==0) return 0;
697 
698  if (mode==0) panel->showMinimized(); else
699  if (mode==2) panel->showMaximized(); else {
700  panel->showNormal();
701  panel->parentWidget()->move(QPoint(x,y));
702  panel->parentWidget()->resize(QSize(width, height));
703  }
704 
705  if (pic!=0) {
706  panel->ProcessPictureRedraw("", panel->GetCanvas(), pic);
707  if (TString(DefaultPicTitle()) != pic->GetTitle())
708  panel->SetFreezedTitle(pic->GetTitle());
709 
710  panel->ShootRepaintTimer();
711  }
712 
713  return (ViewPanelHandle) panel;
714 }
715 
717 {
718  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
719  if (panel==0) return TString();
720  return TString(panel->objectName().toLatin1().constData());
721 }
722 
724 {
725  return (ViewPanelHandle) fMainWin->FindViewPanel(name);
726 }
727 
728 Bool_t TGo4Script::SetViewPanelName(ViewPanelHandle handle, const char* newname)
729 {
730  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
731  if ((handle==0) || (newname==0) || (strlen(newname)==0)) return kFALSE;
732 
733  if (fMainWin->FindViewPanel(newname)) {
734  Message(Form("Viewpanel with name %s already exists",newname));
735  return kFALSE;
736  }
737 
738  panel->SetPanelName(newname);
739 
740  panel->UpdatePanelCaption();
741 
742  return kTRUE;
743 }
744 
746 {
748 }
749 
751 {
752  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
753  if (panel!=0) panel->RedrawPanel(panel->GetCanvas(), true);
754 }
755 
756 void TGo4Script::DivideViewPanel(ViewPanelHandle handle, Int_t numX, Int_t numY)
757 {
758  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
759  if (panel!=0) panel->Divide(numX, numY);
760 }
761 
762 TPad* TGo4Script::SelectPad(ViewPanelHandle handle, Int_t number)
763 {
764  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
765  if (panel!=0) {
766  TPad* pad = panel->GetSubPad(0, number, false);
767  if (pad==0) pad = panel->GetCanvas();
768  panel->SetActivePad(pad);
769  ProcessEvents();
770  return pad;
771  }
772  return 0;
773 }
774 
776 {
777  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
778  if (panel==0) return 0;
779 
780  TPad* pad = panel->GetSubPad(0, padnumber, false);
781  if (pad==0) pad = panel->GetCanvas();
782  return panel->GetPadOptions(pad);
783 }
784 
786 {
787  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
788  if (panel!=0) panel->SetPadSuperImpose(panel->GetActivePad(), on);
789 }
790 
792 {
793  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
794  if (panel!=0) panel->SetApplyToAllFlag(on);
795 }
796 
797 Bool_t TGo4Script::DrawItem(const char* itemname, ViewPanelHandle handle, const char* drawopt)
798 {
799  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
800 
801  panel = fMainWin->DisplayBrowserItem(itemname, panel, 0, true, -1, drawopt);
802 
803  if (panel!=0) ProcessEvents();
804 
805  return (panel!=0);
806 }
807 
808 const char* TGo4Script::GetDrawnItemName(ViewPanelHandle handle, int cnt)
809 {
810  TGo4ViewPanel* panel = (TGo4ViewPanel*) handle;
811 
812  return panel ? panel->GetDrawItemName(cnt) : 0;
813 }
814 
815 TGo4ServerProxy* TGo4Script::ConnectHttp(const char* servername, const char* account, const char* pass)
816 {
817  if ((servername==0) || (*servername==0)) return 0;
818 
819  TGo4HttpProxy* proxy = new TGo4HttpProxy();
820  if(account) proxy->SetAccount(account,pass);
821  if (!proxy->Connect(servername)) {
822  delete proxy;
823  return 0;
824  }
825 
826  const char* slotname = servername;
827  if (strncmp(slotname,"http://",7)==0) slotname+=7; else
828  if (strncmp(slotname,"https://",8)==0) slotname+=8;
829  TString sname(slotname);
830  Int_t len = sname.Index("/");
831  if ((len>1) && (len<sname.Length())) sname.Resize(len);
832 
833  Browser()->AddServerProxy(proxy, sname.Data(), "ROOT http server");
834 
835  return proxy;
836 }
837 
838 
839 // ***************************** Generation *********************
840 
841 
842 void TGo4Script::ProduceScript(const char* filename, TGo4MainWindow* main)
843 {
845 
846  TGo4AnalysisWindow* termgui = main->FindAnalysisWindow();
847 
848  TGo4BrowserProxy* br = main->Browser();
849 
850  TGo4AnalysisProxy* anal = br->FindAnalysis();
851 
852  // this is either HTTP or normal http proxy
853  TGo4ServerProxy* serv = br->FindServer();
854 
855  // ignore server which is was not launched
856  if ((serv!=0) && (serv!=anal) && (serv->IsAnalysisLaunched()<=0)) serv = 0;
857 
858  std::ofstream fs(filename);
859 
860  fs << "// Automatically generated startup script" << std::endl;
861  fs << "// Do not change it!" << std::endl << std::endl;
862 
863  fs << "go4->SetMainWindowState(4,\"" << main->saveState().toHex().data() << "\");" << std::endl;
864 
865  fs << "go4->SetMainWindowGeometry(4,\"" << main->saveGeometry().toHex().data() << "\");" << std::endl;
866 
867  ProduceLoadLibs(fs);
868 
869  TObjArray prlist;
870  br->MakeFilesList(&prlist);
871  for(Int_t n=0;n<=prlist.GetLast();n++) {
872  TGo4DirProxy* pr = (TGo4DirProxy*) prlist.At(n);
873  fs << "go4->OpenFile(\"" << pr->GetFileName() << "\");" << std::endl;
874  }
875 
876  prlist.Clear();
877  br->MakeHServerList(&prlist);
878  for(Int_t n=0;n<=prlist.GetLast();n++) {
879  TGo4HServProxy* pr = (TGo4HServProxy*) prlist.At(n);
880  fs << "go4->ConnectHServer(\""
881  << pr->GetServerName() << "\", "
882  << pr->GetPortNumber() << ", \""
883  << pr->GetBaseName() << "\", \""
884  << pr->GetUserPass() << "\", \""
885  << pr->GetFilter() << "\");" << std::endl;
886  }
887 
888  prlist.Clear();
889  br->MakeDabcList(&prlist);
890  for(Int_t n=0;n<=prlist.GetLast();n++) {
891  TGo4DabcProxy* pr = (TGo4DabcProxy*) prlist.At(n);
892  fs << "go4->ConnectDabc(\"" << pr->GetServerName() << "\");" << std::endl;
893  }
894 
895  fs << std::endl;
896 
897  bool isanalysis = (anal!=0) && anal->IsAnalysisReady() && !anal->IsAnalysisServer();
898  if (!isanalysis && (serv!=0) && (serv!=anal)) isanalysis = true;
899 
900  if (isanalysis) {
901 // start analysis configuration
902  fs << "go4->LaunchAnalysis(\"" << go4sett->getClientName().toLatin1().constData() << "\", \""
903  << go4sett->getClientDir().toLatin1().constData() << "\", \""
904  << go4sett->getClientExec().toLatin1().constData() << "\", \""
905  << go4sett->getClientNode().toLatin1().constData();
906 
907  if (go4sett->getClientIsServer() == 2) {
908  // add port number for http server
909  fs << ":";
910  fs << go4sett->getClientPort();
911  }
912 
913  fs << "\", ";
914 
915  if (go4sett->getClientShellMode() == Go4_rsh) fs << "Go4_rsh, "; else
916  if (go4sett->getClientShellMode() == Go4_ssh) fs << "Go4_ssh, "; else fs << "Go4_sh, ";
917 
918  if (go4sett->getClientTermMode() == Go4_xterm) fs << "Go4_xtrem, "; else
919  if (go4sett->getClientTermMode() == Go4_konsole) fs << "Go4_konsole, "; else fs << "Go4_qt, ";
920 
921  if (go4sett->getClientExeMode() == Go4_lib) fs << "Go4_lib"; else fs << "Go4_exe";
922 
923 // << go4sett->getClientShellMode() << ", "
924 // << go4sett->getClientTermMode() << ", "
925 // << go4sett->getClientExeMode();
926  if (go4sett->getClientArgs().length()>0)
927  fs << ", \"" << go4sett->getClientArgs().toLatin1().constData() << "\"";
928  fs << ");" << std::endl;
929 
930  fs << "go4->WaitAnalysis(300);" << std::endl << std::endl;
931 
932  if (confgui==0) return;
933  fs << "// configuration of analysis" << std::endl;
934 
935  QString fname;
936  int interval, compression;
937  bool asenabled, asoverwrite;
938 
939  confgui->GetAutoSaveConfig(fname, interval, compression, asenabled, asoverwrite);
940  fs << "go4->AnalysisAutoSave(\"" << fname.toLatin1().constData() << "\", "
941  << interval << ", "
942  << compression << ", "
943  << (asenabled ? "kTRUE" : "kFALSE") << ", "
944  << (asoverwrite ? "kTRUE" : "kFALSE") << ");" << std::endl;
945 
946  confgui->GetAnalysisConfigFile(fname);
947  fs << "go4->AnalysisConfigName(\"" << fname.toLatin1().constData() << "\");" << std::endl << std::endl;
948 
949  for(int nstep=0;nstep<confgui->GetNumSteps();nstep++) {
950  TGo4ConfigStep* stepconf = confgui->GetStepConfig(nstep);
951  fs << "// step " << stepconf->GetStepName().toLatin1().constData() << std::endl;
952 
953  bool process, source, store;
954  stepconf->GetStepControl(process, source, store);
955  fs << "go4->ConfigStep(\"" << stepconf->GetStepName().toLatin1().constData() << "\", "
956  << (process ? "kTRUE" : "kFALSE") << ", "
957  << (source ? "kTRUE" : "kFALSE") << ", "
958  << (store ? "kTRUE" : "kFALSE") << ");" << std::endl;
959 
960  QString srcname;
961  int timeout(0), start(0), stop(0), interval(0), nport(0), nretry(0);
962  int nsrc = stepconf->GetSourceSetup(srcname, timeout, start, stop, interval, nport, nretry);
963 
964  TString srcargs;
965  srcargs.Form("(\"%s\", \"%s\", %d", stepconf->GetStepName().toLatin1().constData(), srcname.toLatin1().constData(), timeout);
966 
967  switch(nsrc) {
968  case 0:
969  fs << "go4->StepFileSource" << srcargs;
970  break;
971  case 1: {
972  QString TagFile;
973  stepconf->GetMbsFileSource(TagFile);
974  fs << "go4->StepMbsFileSource" << srcargs << ", \""
975  << TagFile.toLatin1().constData() << "\"";
976  break;
977  }
978  case 2:
979  fs << "go4->StepMbsStreamSource" << srcargs;
980  break;
981  case 3:
982  fs << "go4->StepMbsTransportSource" << srcargs;
983  break;
984  case 4:
985  fs << "go4->StepMbsEventServerSource" << srcargs;
986  break;
987  case 5:
988  fs << "go4->StepMbsRevServSource" << srcargs;
989  break;
990  case 6:
991  fs << "go4->StepRandomSource" << srcargs;
992  break;
993  case 7: {
994  int port;
995  QString expr;
996  stepconf->GetUserSource(port, expr);
997  fs << "go4->StepUserSource" << srcargs << ", " << port << ", \""
998  << expr.toLatin1().constData() << "\"";
999  break;
1000  }
1001 
1002  } // switch(nsrc)
1003  fs << ");" << std::endl;
1004 
1005  if ((start!=0) || (stop!=0) || (interval>1)) {
1006  srcargs.Form("(\"%s\", %d, %d ,%d)",stepconf->GetStepName().toLatin1().constData(), start, stop, interval);
1007  fs << "go4->StepMbsSelection" << srcargs << ";" << std::endl;
1008  }
1009 
1010  if (nport>0) {
1011  srcargs.Form("(\"%s\", %d)",stepconf->GetStepName().toLatin1().constData(), nport);
1012  fs << "go4->StepMbsPort" << srcargs << ";" << std::endl;
1013  }
1014 
1015  if (nretry>0) {
1016  srcargs.Form("(\"%s\", %d)",stepconf->GetStepName().toLatin1().constData(), nretry);
1017  fs << "go4->StepMbsRetryCnt" << srcargs << ";" << std::endl;
1018  }
1019 
1020  QString storename;
1021  int nstore = stepconf->GetStoreSetup(storename);
1022  switch(nstore) {
1023  case 0: {
1024  bool overwrite;
1025  int bufsize, splitlevel, compression, autosave;
1026  stepconf->GetFileStore(overwrite, bufsize, splitlevel, compression, autosave);
1027  fs << "go4->StepFileStore(\"" << stepconf->GetStepName().toLatin1().constData() << "\", \""
1028  << storename.toLatin1().constData() << "\", "
1029  << (overwrite ? "kTRUE" : "kFALSE") << ", "
1030  << bufsize << ", "
1031  << splitlevel << ", "
1032  << compression << ", "
1033  << autosave << ");" << std::endl;
1034  break;
1035  }
1036 
1037  case 1: {
1038  int bufsize, splitlevel;
1039  stepconf->GetBackStore(bufsize, splitlevel);
1040  fs << "go4->StepBackStore(\"" << stepconf->GetStepName().toLatin1().constData() << "\", \""
1041  << storename.toLatin1().constData() << "\", "
1042  << bufsize << ", "
1043  << splitlevel << ");" << std::endl;
1044  break;
1045  }
1046  } // switch
1047 
1048  fs << std::endl;
1049  }
1050 
1051  if (((anal!=0) && anal->IsAnalysisSettingsReady()) || ((serv!=0) && (serv!=anal)))
1052  fs << "go4->SubmitAnalysisConfig(20);" << std::endl << std::endl;
1053 
1054  int mode = 1;
1055  QWidget* mdi = confgui ? confgui->parentWidget() : 0;
1056  if (mdi!=0) {
1057  if (mdi->isHidden()) mode = -1; else
1058  if (mdi->isMinimized()) mode = 0;
1059  }
1060  fs << "go4->SetAnalysisConfigMode(" << mode << ");" << std::endl;
1061 
1062  mode = 1;
1063  mdi = termgui ? termgui->parentWidget() : 0;
1064  if (mdi!=0) {
1065  if (mdi->isHidden()) mode = -1; else
1066  if (mdi->isMinimized()) mode = 0;
1067  }
1068  fs << "go4->SetAnalysisTerminalMode(" << mode << ");" << std::endl << std::endl;
1069 // end analysis configuration
1070  } else
1071  if ((anal!=0) && anal->IsAnalysisReady() && anal->IsAnalysisServer()) {
1072  fs << "go4->ConnectAnalysis(\""
1073  << go4sett->getClientNode().toLatin1().constData() << "\", "
1074  << go4sett->getClientPort() << ", "
1075  << go4sett->getClientControllerMode() << ", ";
1077  fs << "0);" << std::endl;
1078  else
1079  fs << "\"" << main->LastTypedPassword() << "\");" << std::endl;
1080  fs << "go4->WaitAnalysis(10);" << std::endl << std::endl;
1081  } else {
1082  fs << "go4->DisconnectAnalysis();" << std::endl;
1083  }
1084 
1085  // connect to other http server after main analysis configuration - otherwise they could replace it in control elements
1086  prlist.Clear();
1087  br->MakeHttpList(&prlist);
1088  for(Int_t n=0;n<=prlist.GetLast();n++) {
1089  TGo4HttpProxy* pr = (TGo4HttpProxy*) prlist.At(n);
1090  if (pr == serv) continue;
1091  fs << "go4->ConnectHttp(\"" << pr->GetServerName() << "\");" << std::endl;
1092  }
1093 
1094  if (((anal!=0) && anal->IsAnalysisRunning() && !anal->IsAnalysisServer()) ||
1095  ((serv!=0) && (serv!=anal) && serv->IsAnalysisRunning())) {
1096  fs << "go4->StartAnalysis();" << std::endl;
1097  fs << std::endl;
1098  fs << "// in some analysis one requires to wait several seconds before new histograms appears" << std::endl;
1099  fs << "// go4->Wait(1);" << std::endl;
1100  fs << "go4->RefreshNamesList();" << std::endl;
1101  } else
1102  if ((anal!=0) || (serv!=0)) {
1103  fs << std::endl;
1104  fs << "go4->RefreshNamesList();" << std::endl;
1105  }
1106 
1107  int npanel(0);
1108 
1109  QList<QMdiSubWindow *> windows = TGo4MdiArea::Instance()->subWindowList();
1110  for (int i=0; i<windows.count(); ++i ) {
1111  TGo4ViewPanel* panel = dynamic_cast<TGo4ViewPanel*> (windows.at(i)->widget());
1112  if (panel==0) continue;
1113 
1114  TString picname = TString::Format("pic%d", ++npanel);
1115  TGo4Picture pic(picname.Data(), DefaultPicTitle());
1116 
1117  panel->MakePictureForPad(&pic, panel->GetCanvas(), true);
1118 
1119  fs << std::endl;
1120 
1121  pic.SavePrimitive(fs,"");
1122 
1123  QWidget* mdi = panel->parentWidget();
1124 
1125  QPoint pos = mdi->pos();
1126  mdi->mapToParent(pos);
1127  QSize size = mdi->size();
1128 
1129  const char* mode = "Go4_normal";
1130  if (mdi->isHidden()) mode = "Go4_hidden"; else
1131  if (mdi->isMinimized()) mode = "Go4_minimized"; else
1132  if (mdi->isMaximized()) mode = "Go4_maximized";
1133 
1134  fs << "go4->StartViewPanel("
1135  << pos.x() << ", "
1136  << pos.y() << ", "
1137  << size.width() << ", "
1138  << size.height() << ", "
1139  << mode << ", " << picname << ");" << std::endl;
1140 
1141  fs << "delete " << picname << ";" << std::endl;
1142  }
1143 
1144  fs << std::endl;
1145 
1146 
1147 
1148  TGo4Iter iter(br->BrowserTopSlot(), kFALSE);
1149  Bool_t goinside = kTRUE;
1150 
1151  while (iter.next(goinside)) {
1152  TGo4Slot* subslot = iter.getslot();
1153  goinside = kTRUE;
1154 
1155  if (br->ItemKind(subslot)==TGo4Access::kndFolder) {
1156  // check if any subitem not monitored
1157  Int_t ncheck(0), ncount(0);
1158  TGo4Iter subiter(subslot, kTRUE);
1159  while (subiter.next()) {
1160  TGo4Slot* subsubslot = subiter.getslot();
1161  if (br->ItemKind(subsubslot)!=TGo4Access::kndObject) continue;
1162  ncount++;
1163  if (!br->IsItemMonitored(subsubslot)) ncheck++;
1164  else break;
1165  }
1166  goinside = (ncount==0) || (ncheck!=ncount);
1167  } else
1168  goinside = br->IsItemMonitored(subslot);
1169 
1170  if (!goinside) {
1171  TString sbuf;
1172  if (br->BrowserItemName(subslot, sbuf))
1173  fs << "go4->MonitorItem(\"" << sbuf << "\", kFALSE);" << std::endl;
1174  }
1175 
1176  }
1177 
1178  Int_t mperiod = br->MonitoringPeriod();
1179  if (mperiod>0)
1180  fs << "go4->StartMonitoring(" << mperiod/1000 << ");" << std::endl;
1181 }
Bool_t IsAnalysisSettingsReady() const
void setClientControllerMode(int)
Int_t fiWaitForGUIReaction
Definition: TGo4Script.h:208
virtual void ShootRepaintTimer()
QString getClientDir()
Bool_t ContinueExecution()
Definition: TGo4Script.cxx:101
void HotStart(const char *fname)
Bool_t IsAnalysisReady() const
int getClientShellMode()
void SetApplyToAll(ViewPanelHandle panel, Bool_t on=kTRUE)
Definition: TGo4Script.cxx:791
void setClientExeMode(int mode)
Bool_t IsItemMonitored(TGo4Slot *slot)
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr)
Definition: TGo4Script.cxx:640
Int_t getCounts(Double_t time)
Definition: TGo4Script.cxx:90
void StatusMessage(const QString &mess)
Bool_t LoadHotStart(const char *filename)
void MakeHttpList(TObjArray *arr)
virtual void SetMbsStreamSource()
virtual void SetUserSource(int port, QString expr)
void setClientArgs(const QString &)
virtual void GetAnalysisConfigFile(QString &filename)
virtual void MakePictureForPad(TGo4Picture *pic, TPad *pad, bool useitemname)
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0)
Definition: TGo4Script.cxx:762
Int_t execGUICommands()
Definition: TGo4Script.cxx:192
virtual void SetActivePad(TPad *pad)
TString fStrBuf
Definition: TGo4Script.h:210
void RedrawPanel(ViewPanelHandle handle)
Definition: TGo4Script.cxx:750
void setClientDir(const QString &)
void LaunchClientSlot(bool interactive=true)
ViewPanelHandle StartViewPanel()
Definition: TGo4Script.cxx:688
Int_t ItemKind(const char *name)
QString getClientName()
ViewPanelHandle GetActiveViewPanel()
Definition: TGo4Script.cxx:745
virtual void SetBackStore(QString name, int bufsize, int splitlevel)
virtual void SetMbsRetryCnt(int retry)
TGo4BrowserProxy * Browser() const
void StepRandomSource(const char *stepname, const char *sourcename, int timeout)
Definition: TGo4Script.cxx:615
virtual void SetAutoSaveConfig(QString filename, int interval, int compression, bool enbaled, bool overwrite)
static TGo4MdiArea * Instance()
Definition: TGo4MdiArea.cpp:27
void StepMbsPort(const char *stepname, int port)
Definition: TGo4Script.cxx:626
void StepMbsSelection(const char *stepname, int start, int stop, int interval)
Definition: TGo4Script.cxx:605
TGo4ConfigStep * GetStepConfig(int n)
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0)
Definition: TGo4Script.cxx:528
void doOutput(const char *str)
Definition: TGo4Script.cxx:95
void Initialize(TGo4ObjectManager *om, TGo4BrowserProxy *br)
list of shared libraries when application is started
void SetAnalysisConfigMode(int mode)
Definition: TGo4Script.cxx:468
virtual Bool_t IsAnalysisRunning() const
void ShutdownAnalysis()
Definition: TGo4Script.cxx:386
TGo4Slot * getslot() const
Definition: TGo4Iter.cxx:167
void MakeHServerList(TObjArray *arr)
TGo4MainWindow * fMainWin
Definition: TGo4Script.h:211
virtual TGo4ServerProxy * ConnectHttp(const char *servername, const char *account=0, const char *pass=0)
Definition: TGo4Script.cxx:815
virtual void SetMbsRevServSource(int port)
Int_t fBlockConfigFlag
Definition: TGo4Script.h:213
QString getClientExec(int mode=-1)
bool SubmitAnalysisSettings()
void LaunchAnalysis()
Definition: TGo4Script.cxx:313
virtual Bool_t RefreshNamesList()
void setClientName(const QString &)
virtual const char * GetDrawItemName(int itemcnt=0)
void SubmitAnalysisConfig(int tmout=20)
Definition: TGo4Script.cxx:396
void ConnectServerSlot(bool interactive=true, const char *password="")
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=0)
Definition: TGo4Script.cxx:352
virtual void RedrawPanel(TPad *pad, bool force)
TGo4ServerProxy * FindServer(const char *itemname=0, Bool_t asanalysis=kTRUE)
virtual void GetFileStore(bool &overwrite, int &bufsize, int &splitlevel, int &compression, int &autosaveinterval)
void setClientTermMode(int)
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=0, const char *drawopt=0)
Definition: TGo4Script.cxx:797
virtual Bool_t IsAnalysisServer() const
virtual void Divide(int numX, int numY)
void ShutdownAnalysisSlot(bool interactive=true)
virtual Bool_t IsAnalysisRunning() const
int main(int argc, char **argv)
void ProcessEvents(Int_t timeout=-1)
Definition: TGo4Script.cxx:187
void DisconnectAnalysis()
Definition: TGo4Script.cxx:376
Bool_t Connect(const char *nodename)
int getClientControllerMode()
void setClientShellMode(int)
void StepFileSource(const char *stepname, const char *sourcename, int timeout)
Definition: TGo4Script.cxx:517
static TGo4Script * ScriptInstance()
Definition: TGo4Script.cxx:51
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY)
Definition: TGo4Script.cxx:756
void FinishExecution()
Definition: TGo4Script.cxx:131
virtual void UpdatePanelCaption()
void SetAnalysisTerminalMode(int mode)
Definition: TGo4Script.cxx:457
TGo4BrowserProxy * Browser()
virtual void GetMbsFileSource(QString &TagFile)
virtual TPad * GetSubPad(TPad *toppad, int num, bool onlytoplevel)
TGo4Script(TGo4MainWindow *mainwin)
Definition: TGo4Script.cxx:56
ViewPanelHandle FindViewPanel(const char *name)
Definition: TGo4Script.cxx:723
virtual void SetApplyToAllFlag(bool on)
TString GetViewPanelName(ViewPanelHandle panel)
Definition: TGo4Script.cxx:716
void StopAnalysis()
Definition: TGo4Script.cxx:420
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port=0, int start=0, int stop=0, int interval=0)
Definition: TGo4Script.cxx:589
TGo4Picture * GetPadOptions(ViewPanelHandle panel, Int_t padnumber=0)
Definition: TGo4Script.cxx:775
virtual int GetStoreSetup(QString &name)
void setClientPort(int)
void setClientIsServer(int kind)
virtual void GetStepControl(bool &process, bool &source, bool &store)
virtual void GetAutoSaveConfig(QString &filename, int &interval, int &compression, bool &enbaled, bool &overwrite)
virtual void SetMbsFileSource(const QString &TagFile)
static const char * DefaultPicTitle()
virtual void SetRandomSource()
Int_t IsAnalysisLaunched() const
QString getClientArgs()
void SetAccount(const char *username, const char *passwd)
void MakeFilesList(TObjArray *arr)
void MakeDabcList(TObjArray *arr)
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore)
Definition: TGo4Script.cxx:507
virtual void SetFileSource()
void Message(const char *msg)
Definition: TGo4Script.cxx:301
virtual QString GetStepName()
virtual void SetFileStore(QString name, bool overwrite, int bufsize, int splitlevel, int compression, int autosave=0)
virtual const char * GetServerName() const
Definition: TGo4DabcProxy.h:36
void HotStart(const char *filename)
Definition: TGo4Script.cxx:308
void SetMainWindowGeometry(int qtversion, const char *val)
Definition: TGo4Script.cxx:682
virtual Bool_t NamesListReceived()
const char * GetFileName() const
TGo4QSettings * go4sett
TGo4ViewPanel * GetActivePanel()
Definition: TGo4MdiArea.cpp:64
void WaitAnalysis(Int_t delay_sec)
Definition: TGo4Script.cxx:368
virtual void SetStepControl(bool process, bool source, bool store)
Int_t GetPortNumber() const
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
Definition: TGo4Script.cxx:559
virtual void SetSourceWidgets(const QString &name, int timeout)
virtual void GetBackStore(int &bufsize, int &splitlevel)
static void ProduceScript(const char *filename, TGo4MainWindow *main)
Definition: TGo4Script.cxx:842
virtual TGo4Picture * GetPadOptions(TPad *pad)
virtual void SetMbsTransportSource()
virtual void SetMbsSourceWidgets(int start, int stop, int interval, int port=0)
TGo4ViewPanel * FindViewPanel(const char *name)
virtual void GetUserSource(int &port, QString &expr)
void RefreshNamesList(int tmout=10)
Definition: TGo4Script.cxx:433
void SetSuperimpose(ViewPanelHandle panel, Bool_t on=kTRUE)
Definition: TGo4Script.cxx:785
TGo4AnalysisProxy * FindAnalysis(const char *itemname=0)
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite)
Definition: TGo4Script.cxx:479
void DoPostProcessing()
Definition: TGo4Script.cxx:144
const char * GetFilter() const
TGo4ObjectManager * OM()
void setClientExec(const QString &)
static void ProduceLoadLibs(std::ostream &fs)
Bool_t StartScriptExecution(const char *fname)
Definition: TGo4Script.cxx:74
TGo4Slot * BrowserTopSlot()
virtual void SetPadSuperImpose(TPad *pad, bool on)
void DisconnectAnalysisSlot(bool interactive=true)
void AddServerProxy(TGo4ServerProxy *serv, const char *slotname, const char *info)
virtual const char * GetServerName() const
const char * GetUserPass() const
void SetMainWindowState(int qtversion, const char *val)
Definition: TGo4Script.cxx:676
const char * GetBaseName() const
TGo4ConfigStep * FindStepConfig(QString name)
bool getClientDefaultPass()
Bool_t IsWaitSomething()
Definition: TGo4Script.cxx:139
void * ViewPanelHandle
void setClientNode(const QString &)
Bool_t fErrorFlag
Definition: TGo4Script.h:212
void StartAnalysis()
Definition: TGo4Script.cxx:407
virtual int GetSourceSetup(QString &name, int &timeout, int &start, int &stop, int &interval, int &port, int &nretry)
TGo4ViewPanel * DisplayBrowserItem(const char *itemname, TGo4ViewPanel *panel, TPad *pad, bool activate, int updatelevel, const char *drawopt)
void AnalysisConfigName(const char *filename)
Definition: TGo4Script.cxx:490
static TGo4AbstractInterface * Instance()
TGo4AnalysisConfiguration * FindAnalysisConfiguration()
virtual const char * GetServerName() const
virtual void SetPanelName(const char *newname)
virtual ~TGo4Script()
Definition: TGo4Script.cxx:69
TGo4ConfigStep * GetStepGUI(const char *stepname)
Definition: TGo4Script.cxx:497
virtual void SetAnalysisConfigFile(QString filename)
TGo4ViewPanel * MakeNewPanel(int div=0)
Bool_t CanConfigureAnalysis()
Definition: TGo4Script.cxx:445
const char * LastTypedPassword() const
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel)
Definition: TGo4Script.cxx:666
TGo4AnalysisWindow * FindAnalysisWindow()
virtual TPad * GetActivePad()
virtual void ProcessPictureRedraw(const char *picitemname, TPad *pad, TGo4Picture *pic)
void Wait(double tm_sec)
Definition: TGo4Script.cxx:291
Int_t MonitoringPeriod() const
const char * GetDrawnItemName(ViewPanelHandle panel, int cnt=0)
Definition: TGo4Script.cxx:808
virtual void SetMbsEventServerSource()
virtual TCanvas * GetCanvas()
void setClientDefaultPass(bool)
virtual void SetMbsPort(int port)
Bool_t BrowserItemName(TGo4Slot *itemslot, TString &res)
void StepMbsRetryCnt(const char *stepname, int cnt)
Definition: TGo4Script.cxx:633
Int_t fiWaitCounter
Definition: TGo4Script.h:209
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000)
Definition: TGo4Script.cxx:653
QString getClientNode()
Bool_t SetViewPanelName(ViewPanelHandle panel, const char *newname)
Definition: TGo4Script.cxx:728
virtual void SetFreezedTitle(const QString &title)
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
Definition: TGo4Script.cxx:574
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
Definition: TGo4Script.cxx:544
Bool_t next(Bool_t goesinto=kTRUE)
Definition: TGo4Iter.cxx:45
string msg
Definition: go4init.py:11