16 #include <QtCore/QString>
17 #include <QtCore/QDateTime>
18 #include <QtCore/QTimer>
19 #include <QtCore/QProcess>
20 #include <QtCore/QHash>
21 #include <QtCore/QSignalMapper>
22 #include <QtCore/QDir>
24 #include <QApplication>
26 #include <QDockWidget>
29 #include <QActionGroup>
31 #include <QStyleFactory>
33 #include <QMessageBox>
34 #include <QColorDialog>
35 #include <QFileDialog>
36 #include <QFontDialog>
37 #include <QInputDialog>
38 #include <QMdiSubWindow>
40 #include <QDesktopServices>
55 #include "TGo4LockGuard.h"
123 setWindowIcon(QIcon(
":/icons/go4logo2_big.png"));
162 TH1I* h1 =
new TH1I(
"histo1",
"histo title", 100, -10., 10.);
163 h1->FillRandom(
"gaus",10000);
177 gStyle->SetPalette(1);
178 gStyle->SetCanvasColor(10);
179 gStyle->SetPadColor(10);
180 gStyle->SetFrameFillColor(10);
181 gStyle->SetStatColor(0);
187 fxMdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
188 fxMdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
192 menuBar()->setNativeMenuBar(kFALSE);
205 QDockWidget* BrowserDockWin =
new QDockWidget(
"Browser",
this);
206 BrowserDockWin->setObjectName(
"BrowserDock");
207 TGo4Browser* browser =
new TGo4Browser(BrowserDockWin,
"Browser");
208 browser->setWindowFlags(Qt::Widget);
210 browser->StartWorking();
211 BrowserDockWin->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable);
212 BrowserDockWin->setWidget(browser);
213 BrowserDockWin->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
214 addDockWidget(Qt::LeftDockWidgetArea, BrowserDockWin);
216 QAction* BrowserDockAction=BrowserDockWin->toggleViewAction();
217 BrowserDockAction->setShortcut(QKeySequence(
"F6"));
220 #if (QT_VERSION >= 0x040700) && (QT_VERSION <= 0x040909)
221 browser->setMinimumWidth(230);
224 QDockWidget* LogDockWin =
new QDockWidget(
"Log window",
this);
225 LogDockWin->setObjectName(
"LogInfoDock");
226 TGo4LogInfo* loginfo =
new TGo4LogInfo(
this,
"LogInfo");
228 LogDockWin->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable);
229 LogDockWin->setWidget(loginfo);
230 LogDockWin->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
231 addDockWidget(Qt::BottomDockWidgetArea, LogDockWin);
233 QAction* LogDockWinAction=LogDockWin->toggleViewAction();
234 LogDockWinAction->setShortcut(QKeySequence(
"F7"));
236 QDockWidget* MBSDockWin =
new QDockWidget(
"MBS monitor",
this);
237 MBSDockWin->setObjectName(
"MbsViewerDock");
238 TGo4MBSViewer* mbs =
new TGo4MBSViewer(MBSDockWin,
"MBSViewer");
239 mbs->setWindowFlags(Qt::Widget);
241 MBSDockWin->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetClosable);
242 MBSDockWin->setWidget(mbs);
243 MBSDockWin->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
244 addDockWidget(Qt::BottomDockWidgetArea, MBSDockWin);
246 QAction* MBSDockAction=MBSDockWin->toggleViewAction();
247 MBSDockAction->setShortcut(QKeySequence(
"F8"));
249 QToolBar* DividePanelBar = addToolBar(
"Canvas Tools");
250 DividePanelBar->setObjectName(
"DividePadDock");
251 TGo4DividePad* dividepanel =
new TGo4DividePad(
this,
"DividePad");
252 DividePanelBar->addWidget(dividepanel);
254 QToolBar* stylebar = addToolBar(
"Color Tools");
255 stylebar->setObjectName(
"Go4StyleDock");
256 fxStyle =
new TGo4Style(
this,
"Go4Style");
259 QToolBar* BrowserOptionsPanel = addToolBar(
"Browser Options");
260 BrowserOptionsPanel->setObjectName(
"BrowserOptionsDock");
261 TGo4BrowserOptions* bropt =
new TGo4BrowserOptions(
this,
"BrowserOptions");
263 BrowserOptionsPanel->addWidget(bropt);
264 bropt->StartWorking();
266 QToolBar* DrawOptionPanel = addToolBar(
"Draw Options");
267 DrawOptionPanel->setObjectName(
"DrawOptionsDock");
268 TGo4HisDrawOptions* drawopt =
new TGo4HisDrawOptions(
this,
"DrawOptions");
269 DrawOptionPanel->addWidget(drawopt);
270 DrawOptionPanel->adjustSize();
272 QToolBar* DrawOptionShortPanel = addToolBar(
"Hist Draw Options");
273 DrawOptionShortPanel->setObjectName(
"HisDrawOptionsDock");
274 TGo4HisDrawOptionsShort* drawopts =
new TGo4HisDrawOptionsShort(
this,
"HisDrawOptions");
275 DrawOptionShortPanel->addWidget(drawopts);
276 DrawOptionShortPanel->adjustSize();
278 QToolBar* ScaleOptionBar = addToolBar(
"Zoom Tools");
279 ScaleOptionBar->setObjectName(
"ScaleOptionsDock");
280 TGo4ScaleOptions* scopt =
new TGo4ScaleOptions(
this,
"ScaleOptions");
282 ScaleOptionBar->addWidget(scopt);
283 ScaleOptionBar->adjustSize();
285 QToolBar* commandlinebar = addToolBar(
"Go4 Command Line");
286 commandlinebar->setObjectName(
"CommandLineDock");
287 TGo4CommandLine* cli =
new TGo4CommandLine(
this,
"CommandLine");
289 commandlinebar->addWidget(cli);
291 QToolBar* tviewerdock = addToolBar(
"Tree viewer");
292 tviewerdock->setObjectName(
"TreeViewerDock");
293 TGo4TreeViewer* tviewer =
new TGo4TreeViewer(
this,
"TreeViewer");
295 tviewerdock->addWidget(tviewer);
315 menuBar()->addSeparator();
317 QMenu* helpMenu = menuBar()->addMenu(
"&Help");
318 helpMenu->addAction(
"&Introduction (user manual)",
this, SLOT(
IntroHelpSlot()), Key_F1);
319 helpMenu->addAction(
"&Reference manual",
this, SLOT(
RefHelpSlot()));
320 helpMenu->addAction(
"&Fit Tutorial",
this, SLOT(
FitHelpSlot()));
321 helpMenu->addSeparator();
322 helpMenu->addAction(
"About &Qt",
this, SLOT(
aboutQt()), Key_F2 );
323 helpMenu->addAction(
"About R&OOT",
this, SLOT(
aboutROOT()), Key_F3);
325 helpMenu->addAction(
"About &DABC",
this, SLOT(
aboutDABC()));
326 helpMenu->addAction(
"About &Go4",
this, SLOT(
about()), Key_F4);
328 const char* libs = gSystem->Getenv(
"GO4USERLIBRARY");
331 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
332 QStringList LibList = QString(libs).split(
":",QString::SkipEmptyParts);
334 QStringList LibList = QString(libs).split(
":",Qt::SkipEmptyParts);
337 for (QStringList::Iterator it=LibList.begin(); it!=LibList.end(); ++it)
338 gSystem->Load((*it).toLatin1().constData());
357 statusBar()->showMessage(
"Ready");
358 statusBar()->setSizeGripEnabled(
true);
361 if (!sfmt.isEmpty()) gStyle->SetStatFormat(sfmt.toLatin1().constData());
379 QString GO4STR(
"Go4 ");
381 QString GO4STR1 = GO4STR;
382 GO4STR1.append(
"<br>");
383 GO4STR1.append(
"The Go4 (GSI Object Oriented On-line Off-line system) is based on ROOT<br> with the specific requirements of the low and medium energy nuclear and atomic<br> physics experiments implemented as extensions.<br> See <a href='http://go4.gsi.de'>http://go4.gsi.de</a> for more information") ;
385 QMessageBox AboutGo4(GO4STR, GO4STR1, QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton ,
this);
386 AboutGo4.setIconPixmap(QPixmap(
":/icons/go4logo2_big.png"));
387 AboutGo4.setTextFormat(Qt::RichText);
393 QMessageBox::aboutQt(
this,
"Qt");
398 QString mestring(
"This Go4 uses ROOT ");
399 mestring.append(gROOT->GetVersion());
400 mestring.append(
"<br> ROOT is an object-oriented framework <br>for large scale scientific <br>data analysis and data mining.<br> It has been developed at CERN<br> See <a href='http://root.cern.ch'>http://root.cern.ch</a> for more information");
401 QMessageBox AboutRoot(
"ROOT", mestring,
402 QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton ,
this);
403 AboutRoot.setIconPixmap(QPixmap(
":/icons/root.png"));
404 AboutRoot.setTextFormat(Qt::RichText);
410 QString mestring(
"This Go4 uses DABC ");
414 mestring.append(
"<undef>");
415 mestring.append(
"<br>DABC (Data Acquisition Backbone Core) is <br> framework to build multi-threaded multi-node DAQ applications.<br> It is developed in GSI.<br> See <a href='http://dabc.gsi.de'>http://dabc.gsi.de</a> for more information");
416 QMessageBox AboutDabc(
"DABC", mestring,
417 QMessageBox::NoIcon,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton ,
this);
418 AboutDabc.setIconPixmap(QPixmap(
":/icons/dabc.png"));
419 AboutDabc.setTextFormat(Qt::RichText);
427 QMenu* settMenu = menuBar()->addMenu(
"&Settings");
429 QMenu* sub = createPopupMenu();
430 sub->setTitle(
"Sh&ow/hide");
431 settMenu->addMenu(sub);
435 QMenu *style = settMenu->addMenu(
"St&yle");
437 QMenu* prefMenu = settMenu->addMenu(
"&Preferences");
457 #if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
458 prefMenu->addAction(
"GUI HighDPI Scale factor...",
this, SLOT(
ScaleFactorSlot()));
461 QMenu* panelMenu = settMenu->addMenu(
"&Panel defaults");
463 panelMenu->addAction(
"&Canvas color...",
this, SLOT(
CanvasColorSlot()));
469 panelMenu->addAction(
"Statistics box...",
this, SLOT(
OptStatsSlot()));
499 panelMenu->addAction(
"TH1 draw opt ...",
this, SLOT(
TH1DrawOptSlot()));
500 panelMenu->addAction(
"TH2 draw opt ...",
this, SLOT(
TH2DrawOptSlot()));
501 panelMenu->addAction(
"TH3 draw opt ...",
this, SLOT(
TH3DrawOptSlot()));
510 QMenu* termMenu = settMenu->addMenu(
"&Terminal");
519 settMenu->addAction(
"&Break hotstart execution",
this, SLOT(
StopGUIScriptSlot()));
524 QActionGroup *ag =
new QActionGroup(
this);
525 ag->setExclusive(
true );
526 QSignalMapper *styleMapper =
new QSignalMapper(
this );
527 connect(styleMapper, SIGNAL(mapped(
const QString&)),
this, SLOT(
SetStyleSlot(
const QString&)));
529 QStringList list = QStyleFactory::keys();
531 QHash<QString, int> stylesDict;
532 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
533 QString styleStr = *it;
534 QString styleAccel = styleStr;
535 if ( stylesDict[styleAccel.left(1)] ) {
536 for ( uint i = 0; i < styleAccel.length(); i++ ) {
537 if ( !stylesDict[styleAccel.mid( i, 1 )] ) {
538 stylesDict.insert(styleAccel.mid( i, 1 ), 1);
539 styleAccel = styleAccel.insert( i,
'&' );
544 stylesDict.insert(styleAccel.left(1), 1);
545 styleAccel =
"&"+styleAccel;
547 QAction *act =
new QAction(styleAccel,
this);
548 act->setCheckable(
true);
550 act->setChecked(
true);
552 connect( act, SIGNAL(triggered()), styleMapper, SLOT(map()) );
553 styleMapper->setMapping(act, styleStr);
556 style->addAction(act);
560 #if QT_VERSION < QT_VERSION_CHECK(6,0,0)
561 #define CtrlKey(key) (CTRL+key)
563 #define CtrlKey(key) (CTRL|key)
569 QMenu* fileMenu = menuBar()->addMenu(
"&File");
571 fileMenu->addAction(QIcon(
":/icons/open.png" ),
"&Open...",
573 fileMenu->addAction(QIcon(
":/icons/network.png" ),
"Open &Remote...",
576 fileMenu->addAction(QIcon(
":/icons/dabc.png" ),
"Connect &DABC...",
578 fileMenu->addAction(QIcon(
":/icons/http.png" ),
"Connect &HTTP...",
580 fileMenu->addAction(QIcon(
":/icons/histserv.png" ),
"Open HIST &Server...",
582 fileMenu->addAction(QIcon(
":/icons/filesave.png" ),
"Save memor&y...",
584 fileMenu->addAction(QIcon(
":/icons/close.png" ),
"Close all files",
586 fileMenu->addAction(QIcon(
":/icons/exit.png" ),
"E&xit",
587 this, SLOT(close()),
CtrlKey(Key_X) );
592 QToolBar *FileBar = addToolBar(
"File Toolbar" );
593 FileBar->setObjectName(
"FileToolBar");
595 FileBar->addAction( QIcon(
":/icons/open.png" ),
"Open a local file from disk",
598 FileBar->addAction( QIcon(
":/icons/network.png" ),
"Open a remote file from server",
602 FileBar->addAction( QIcon(
":/icons/dabc.png" ),
"Connect to DABC server",
605 FileBar->addAction( QIcon(
":/icons/http.png" ),
"Connect to HTTP server",
608 FileBar->addAction( QIcon(
":/icons/histserv.png" ),
"Connect to running histogram server",
611 FileBar->addAction( QIcon(
":/icons/filesave.png" ),
"Save the content of the browser to a root file",
614 FileBar->addAction( QIcon(
":/icons/close.png" ),
"Close all root files in file browser",
617 FileBar->addAction( QIcon(
":/icons/exit.png" ),
"Exit the Go4",
618 this, SLOT(close()));
623 QMenu* toolMenu = menuBar()->addMenu(
"&Tools");
625 toolMenu->addAction(QIcon(
":/icons/chart.png" ),
"&View panel",
627 toolMenu->addAction(QIcon(
":/icons/fitpanel.png" ),
"&Fit panel...",
629 toolMenu->addAction(QIcon(
":/icons/hislist.png" ),
"&Histogram properties...",
631 toolMenu->addAction(QIcon(
":/icons/hiscre.png" ),
"Create New H&istogram...",
633 toolMenu->addAction(QIcon(
":/icons/condlist.png" ),
"C&ondition properties...",
635 toolMenu->addAction(QIcon(
":/icons/condcre.png" ),
"Create new &condition...",
637 toolMenu->addAction(QIcon(
":/icons/zoom.png" ),
"&Event printout...",
639 toolMenu->addAction(QIcon(
":/icons/dynlist.png" ),
"Create &dyn. list entry ...",
641 toolMenu->addAction(QIcon(
":/icons/dllicon.png" ),
"Load li&braries ...",
643 toolMenu->addAction(QIcon(
":/icons/user.png" ),
"&User GUI ...",
649 QToolBar *ToolBar = addToolBar(
"Go4 tools");
650 ToolBar->setObjectName(
"Go4ToolsBar");
652 ToolBar->addAction( QIcon(
":/icons/chart.png" ),
"Create a new view panel",
655 ToolBar->addAction( QIcon(
":/icons/fitpanel.png" ),
"Show/hide the Go4 Fit Panel",
658 ToolBar->addAction( QIcon(
":/icons/hislist.png" ),
"Show histogram properties window",
661 ToolBar->addAction( QIcon(
":/icons/hiscre.png" ),
"Create new ROOT Histogram",
664 ToolBar->addAction( QIcon(
":/icons/condlist.png" ),
"Show condition properties window",
667 ToolBar->addAction( QIcon(
":/icons/condcre.png" ),
"Create new condition in analysis",
670 ToolBar->addAction( QIcon(
":/icons/zoom.png" ),
"Event printout and examination window",
673 ToolBar->addAction( QIcon(
":/icons/dynlist.png" ),
"Create new Dynamic list entry",
676 ToolBar->addAction( QIcon(
":/icons/dllicon.png" ),
"Load Libraries",
679 ToolBar->addAction( QIcon(
":/icons/user.png" ),
"Start user panel",
685 QMenu* anMenu = menuBar()->addMenu(
"&Analysis");
688 anMenu->addAction(QIcon(
":/icons/launchanal.png" ),
"Lau&nch analysis...",
691 anMenu->addAction(QIcon(
":/icons/connect.png"),
"&Connect to running server...",
695 anMenu->addAction(QIcon(
":/icons/connect.png" ),
"&Prepare for client connection...",
699 anMenu->addAction(QIcon(
":/icons/disconnect.png"),
"Disconnect from analysis",
703 anMenu->addAction(QIcon(
":/icons/shutanal.png"),
"Shutdown analysis",
707 anMenu->addAction(QIcon(
":/icons/restart.png"),
"Submit+S&tart",
711 anMenu->addAction(QIcon(
":/icons/start.png"),
"&Start",
715 anMenu->addAction(QIcon(
":/icons/Stop.png"),
"Stop (&Halt)",
719 anMenu->addAction(QIcon(
":/icons/control.png"),
"Confi&guration...",
723 anMenu->addAction(QIcon(
":/icons/analysiswin.png"),
"Analysis &Window",
729 QToolBar *AnalBar = addToolBar(
"Analysis Toolbar");
730 AnalBar->setObjectName(
"AnalysisToolBar");
731 AnalBar->setToolTip(
"Analysis related tool buttons");
751 bool on = !
fxMdiArea->subWindowList().isEmpty();
765 windowsMenu->addAction(
"Save L&ogwindow", loginfo, SLOT(SaveLogInfo()));
766 windowsMenu->addAction(
"Clear &Logwindow", loginfo, SLOT(ClearLogInfo()));
768 windowsMenu->addAction(
"Save L&ogwindow")->setEnabled(
false);
769 windowsMenu->addAction(
"Clear &Logwindow")->setEnabled(
false);
774 windowsMenu->addAction(
"Save &Analysis window", anw, SLOT(SaveAnalysisOutput()));
775 windowsMenu->addAction(
"Clear Analysis &window", anw, SLOT(ClearAnalysisOutput()));
777 windowsMenu->addAction(
"Save &Analysis window")->setEnabled(
false);
778 windowsMenu->addAction(
"Clear Analysis &window")->setEnabled(
false);
787 QList<QMdiSubWindow *> windows =
fxMdiArea->subWindowList();
788 for (
int i=0; i< windows.count(); i++ ) {
789 QAction* act =
new QAction(windows.at(i)->widget()->windowTitle(),
winMapper);
790 act->setCheckable(
true);
791 act->setChecked(
fxMdiArea->activeSubWindow() == windows.at(i));
795 connect(act, SIGNAL(triggered()),
winMapper, SLOT(map()) );
802 QList<QMdiSubWindow *> windows =
fxMdiArea->subWindowList();
803 for (
int i = 0; i < windows.count(); i++ )
804 windows.at(i)->widget()->showMinimized();
809 QList<QMdiSubWindow *> windows =
fxMdiArea->subWindowList();
813 for (
int i = 0; i < windows.count(); i++ ) {
814 windows.at(i)->move(x, y);
823 else showFullScreen();
830 QList<QMdiSubWindow *> windows =
fxMdiArea->subWindowList();
831 if ((
id>=0) && (
id<windows.count())) {
832 windows.at(
id)->widget()->showNormal();
833 windows.at(
id)->widget()->setFocus();
837 typedef void* (*TStartUserGuiFunc)(QWidget* parent);
841 QString dirname, libname;
845 if ((usergui!=0) && (strlen(usergui)>0)) {
846 QFileInfo info(usergui);
849 dirname = info.path();
850 libname = info.fileName();
851 }
else if (info.isDir()) {
855 if ((dirname.length()>0) && (dirname[dirname.length()-1]!=
'/')) dirname+=
"/";
858 bool defaultnames = libname.length()==0;
860 libname =
"libGo4UserGui";
864 libname = dirname + libname;
866 std::cout <<
"Try usergui: " << libname.toLatin1().constData() << std::endl;
870 if (gSystem->Load(libname.toLatin1().constData())>=0) {
872 startfunc = (
TStartUserGuiFunc) gSystem->DynFindSymbol(libname.toLatin1().constData(),
"StartUserPanel");
878 userpanel->setObjectName(
"UserPanel");
883 userpanel->ensurePolished();
887 StatusMessage(
"StartUserPanel() function did not create user widget");
891 std::cout <<
"Start user GUI from ";
892 if (dirname.length()>0)
893 std::cout << dirname.toLatin1().constData() << std::endl;
895 std::cout <<
"$LD_LIBRARY_PATH=" << gSystem->Getenv(
"LD_LIBRARY_PATH") << std::endl;
897 if (loaded) gSystem->Unload(libname.toLatin1().constData());
906 if (userpanel!=0)
return;
909 if (gSystem->Getenv(
"GO4USERGUI")!=0)
910 if (
startUserGUI(gSystem->Getenv(
"GO4USERGUI")))
return;
924 QMessageBox::critical(
this,
"Starting user GUI",
"No suitable libraries found");
936 name = QString(
"Panel") + QString::number(n);
937 }
while ((edslot!=0) && (edslot->
FindChild(name.toLatin1().constData())!=0));
939 TGo4ViewPanel* panel =
new TGo4ViewPanel(
fxMdiArea, name.toLatin1().constData());
951 panel->ensurePolished();
952 panel->CompleteInitialization();
956 int DivX(1), DivY(1);
958 TGo4DividePad* divpad = findChild<TGo4DividePad*>(
"DividePad");
961 DivX = divpad->SpinBoxX->value();
962 DivY = divpad->SpinBoxY->value();
964 if (DivX * DivY < ndiv) {
965 DivX = (int) TMath::Sqrt(ndiv*1.);
967 while (DivX*DivY<ndiv) DivY++;
969 panel->Divide(DivX, DivY);
982 if (newx + sub->width() >
fxMdiArea->width()) newx = 0;
983 if (newy + sub->height() >
fxMdiArea->height()) newy = 0;
984 sub->move(newx, newy);
995 if(QMessageBox::question(
this,
"Go4 GUI",
"Really Exit Go4?",
996 QMessageBox::Yes | QMessageBox::No ,
997 QMessageBox::Yes) != QMessageBox::Yes ) {
1009 bool realshutdown =
false;
1020 statusBar()->showMessage(
"Exit.... please wait");
1021 QApplication::setOverrideCursor(Qt::WaitCursor);
1026 statusBar()->showMessage(
"Closing GUI...");
1039 if (
Browser()->FindServer()!=0) {
1047 QMessageBox box(QMessageBox::Critical,
"Exit GUI",
"Analysis is not (yet) shutdown correctly");
1048 QPushButton *wait_btn = box.addButton(
"Wait 10 s more", QMessageBox::AcceptRole);
1049 QAbstractButton *kill_btn = box.addButton(
"Kill analysis", QMessageBox::DestructiveRole);
1050 QAbstractButton *exit_btn = box.addButton(
"Exit immediately", QMessageBox::DestructiveRole);
1051 QAbstractButton *cancel_btn = box.addButton(
"Cancel quit", QMessageBox::RejectRole);
1052 box.setDefaultButton(wait_btn);
1056 if (box.clickedButton() == wait_btn) {
1062 if ((box.clickedButton() == cancel_btn) || (box.clickedButton() == 0)) {
1063 std::cout <<
"Keep GUI running, press exit once again" << std::endl;
1067 if (box.clickedButton() == kill_btn) {
1068 std::cout <<
"Killing analysis" << std::endl;
1072 if (box.clickedButton() == exit_btn) {
1073 std::cout <<
"GUI closed with analysis still running - may lead to analysis task running forever" << std::endl;
1074 std::cout <<
"Please check running processes with \"ps\" and probably, kill analysis with \"killall go4analysis\" command" << std::endl;
1077 std::cout <<
"----- Exiting Go4 GUI now -----" << std::endl;
1083 QFileDialog fd(
this,
1084 "Select a ROOT file to open it in the Go4 Disk Browser",
1086 QString(
"Root files (*.root);;Root xml files (*.xml);;All files (*.*)"));
1088 fd.setFileMode( QFileDialog::ExistingFiles);
1090 if ( fd.exec() != QDialog::Accepted )
return;
1092 QStringList list = fd.selectedFiles();
1093 QStringList::Iterator it = list.begin();
1094 while( it != list.end() ) {
1095 QString fileName = *it;
1104 TGo4OpenRemoteDialog fd(
this);
1105 if (fd.exec() != QDialog::Accepted)
return;
1107 QString ftype = fd.GetFileType();
1108 QString host = fd.GetServer();
1111 if(ftype.contains(
"root:"))
1112 urlpath =
"root://" + host +
"/";
1114 if (ftype.contains(
"rfio:")) {
1116 urlpath=
"rfio:" + host +
":/";
1120 if (ftype.contains(
"http:")) {
1122 urlpath=
"http://" + host +
"/";
1127 QString fileName = fd.GetFileName();
1129 if(!fileName.isEmpty() && !fileName.contains(
".root"))
1130 fileName.append(
".root");
1132 fileName = urlpath + fileName;
1140 QString dabcnode = QInputDialog::getText(
1141 this,
"Establish connection with DABC",
"Provide dabc server name",
1142 QLineEdit::Normal, QString(), &ok);
1145 if (!
Browser()->ConnectDabc(dabcnode.toLatin1().constData()))
1146 QMessageBox::warning(0,
"DABC server",
"Cannot connect to DABC server");
1157 httpaddr = QInputDialog::getText(
1158 this,
"Establish connection with HTTP",
"Provide http server name",
1159 QLineEdit::Normal, fulladdress, &ok);
1161 QStringList nameportlist = httpaddr.split(
":");
1164 if(nameportlist.at(0).contains(
"http")) {
1169 if(nameportlist.size()<portindex+1 || nameportlist.at(portindex).isEmpty()){
1170 QMessageBox::warning(0,
"HTTP server connection",
"Could not connect. Please specify port number!");
1173 QString host = nameportlist.at(nameindex);
1174 QStringList hostnamelist = nameportlist.at(nameindex).split(
"//");
1175 if(hostnamelist.size()>1) host = hostnamelist.at(1);
1186 if (!exec)
return 0;
1190 if (serv)
StatusMessage(QString(
"Connect with http server %1 %2").arg(httpaddr).arg(serv->
IsGo4Analysis() ?
" as GO4 analysis" :
""));
1199 TGo4LogInfo* loginfo = (TGo4LogInfo*)
FindGo4Widget(
"LogInfo",
false);
1200 if (loginfo!=0) loginfo->WorkWithInfo(serv->
LoginfoSlot());
1211 TGo4HServerConnection dlg(
this,
"Connect to remote HServer",
true );
1218 if (dlg.exec() != QDialog::Accepted)
return;
1226 dlg.PortNumberSpin->value(),
1227 dlg.BaseName->text().toLatin1().constData(),
1228 dlg.UserPassEdt->text().toLatin1().constData(),
1229 dlg.FilterList->text().toLatin1().constData()))
1230 QMessageBox::warning(0,
"HServer",
"Cannot connect to histogram server");
1235 QFileDialog fd(
this,
1237 "Select root file to fetch and export all browser objects" :
1238 "Select root file to export all local browser objects",
1241 fd.setFileMode( QFileDialog::AnyFile);
1242 fd.setAcceptMode(QFileDialog::AcceptSave);
1243 fd.selectFile(
"export.root");
1245 if (fd.exec() != QDialog::Accepted)
return;
1247 QStringList flst = fd.selectedFiles();
1248 if (flst.isEmpty())
return;
1250 QString fname = flst[0];
1252 if (fname.indexOf(
".root", 0, Qt::CaseInsensitive)<0) fname+=
".root";
1255 QMessageBox::warning(
this,
"Save data to file",
"Specified file can not be created");
1269 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
1270 size = QInputDialog::getInt(
this,
1271 "Analysis terminal history size in bytes (minimum 10000 bytes)",
1272 "Input 0 if full analysis history should be preserved",
1273 size, 0, 100000000, 10000, &ok);
1275 size = QInputDialog::getInteger(
this,
1276 "Analysis terminal history size in bytes (minimum 10000 bytes)",
1277 "Input 0 if full analysis history should be preserved",
1278 size, 0, 100000000, 10000, &ok);
1282 if ((size>0) && (size<10000)) size = 10000;
1294 TGo4LogSettings dlg;
1295 if (dlg.exec() != QDialog::Accepted)
return;
1297 if(dlg.LogfileWrite->isChecked())
1298 TGo4Log::OpenLogfile(dlg.LogfileName->text().toLatin1().constData(),
"Logfile for Go4 GUI",
true);
1308 QApplication::setOverrideCursor( Qt::WaitCursor );
1312 bool result = QDesktopServices::openUrl(QUrl::fromLocalFile(surl));
1315 StatusMessage(msg ? QString(msg) : QString(
"Show ") + filename);
1319 QApplication::restoreOverrideCursor();
1324 HelpWindow(
"docs/Go4Introduction.pdf",
"Show Go4 Introduction manual...");
1329 HelpWindow(
"docs/Go4Reference.pdf",
"Show Go4 Reference manual...");
1334 HelpWindow(
"docs/Go4FitTutorial.pdf",
"Show Go4 Fit tutorial...");
1354 QFont font= QFontDialog::getFont(&ok, QApplication::font(),
this);
1359 QApplication::setFont(font);
1372 if (anw) anw->setFont(font);
1388 QString str = QInputDialog::getText(
this,
"Analysis terminal timestamp format",
1389 "Time format (empty resets to yyyy-MM-dd hh:mm:ss.zzz)",
1394 str =
"yyyy-MM-dd hh:mm:ss.zzz";
1422 QApplication::setStyle(style);
1427 QString output = QDateTime::currentDateTime().toString(Qt::ISODate);
1428 output.append(
": ");
1429 output.append(mess);
1430 statusBar()->showMessage(output, 0);
1447 QString capt =
"Go4 ";
1450 capt += gSystem->HostName();
1456 setWindowTitle(capt);
1459 if (pr==0) flag = (ht==0 ?
true:
false) ;
1476 if (pr==0) flag = (ht==0 ?
true:
false) ;
1482 if (pr==0) flag = (ht==0 ?
false:
true);
1492 bool iscontrolling(
false), issubmit(
false);
1508 if ((go4_serv==0) && (root_serv!=0)) {
1549 QColor c = QColorDialog::getColor();
1556 TGo4MarkerSettings mset;
1557 if (mset.exec() != QDialog::Accepted)
return;
1563 TGo4OptStatsSettings stset;
1564 if (stset.exec() != QDialog::Accepted)
return;
1586 bool s =
faClone->isChecked();
1619 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
1620 w = QInputDialog::getInt(
this,
1621 "Default line width for object drawing",
1622 "Input 1 to preserve default value",
1625 w = QInputDialog::getInteger(
this,
1626 "Default line width for object drawing",
1627 "Input 1 to preserve default value",
1641 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
1642 w = QInputDialog::getInt(
this,
1643 "Default fill color for 1D objects (histogram and graph) drawing",
1644 "Input 0 for no fill",
1647 w = QInputDialog::getInteger(
this,
1648 "Default fill color for 1D objects (histogram and graph) drawing",
1649 "Input 0 for no fill",
1662 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0)
1663 w = QInputDialog::getInt(
this,
1664 "Default fill style for 1D objects (histogram and graph) drawing",
1665 "Input 1001 for solid fill",
1666 w, 0, 4000, 1, &ok);
1668 w = QInputDialog::getInteger(
this,
1669 "Default fill style for 1D objects (histogram and graph) drawing",
1670 "Input 1001 for solid fill",
1671 w, 0, 4000, 1, &ok);
1681 QString str = QInputDialog::getText(
this,
1682 "Default draw options for TH1 class",
1683 "Input draw options",
1691 QString str = QInputDialog::getText(
this,
1692 "Default draw options for TH2 class",
1693 "Input draw options",
1701 QString str = QInputDialog::getText(
this,
1702 "Default draw options for TH3 class",
1703 "Input draw options",
1711 QString str = QInputDialog::getText(
this,
1712 "Default draw options for TGraph class",
1713 "Input draw options",
1724 if (s0.isEmpty()) s0 = gStyle->GetStatFormat();
1726 QString str = QInputDialog::getText(
this,
1727 "Printf argument for float values - gStyle->GetStatFormat()",
1728 "Input format string like 6.4g (empty - ROOT default)",
1729 QLineEdit::Normal, s0, &ok);
1733 gStyle->SetStatFormat();
1735 gStyle->SetStatFormat(str.toLatin1().constData());
1744 int min=0, def=0, max =0;
1746 QString palvals = QString(
"%1:%2:%3").arg(min).arg(def).arg(max);
1747 QString str = QInputDialog::getText(
this,
1748 "Default Palette options",
1749 "Input - MinIndex:DefaultIndex:MaxIndex",
1750 QLineEdit::Normal, palvals, &ok);
1752 QStringList parts=str.split(
":");
1753 min=parts[0].toInt();
1754 def=parts[1].toInt();
1755 max=parts[2].toInt();
1759 fxStyle->SetPaletteRange(min,def,max);
1766 #if QT_VERSION >= QT_VERSION_CHECK(5,6,0)
1771 w = QInputDialog::getDouble(
this,
1773 "Please set scale factor. Restart GUI to apply!",
1785 QMessageBox::warning(
this,
"Launch analysis",
"Please disconnect analysis first");
1790 TGo4StartClient dlg;
1791 if (dlg.exec()!=QDialog::Accepted)
return;
1799 TString launchcmd, killcmd;
1800 Bool_t res = kFALSE;
1811 if (
ConnectHttpSlot(addr.toLatin1().constData(),0,0,
false, true )!=0) {
1812 StatusMessage(
"Connected to exisiting analysis webserver!");
1813 std::cout<<
"!!! Connected to exisiting analysis webserver "<<addr.toLatin1().constData()<<
"!!! "<<std::endl;
1818 2, shellmode, termmode,
1821 workdir.toLatin1().constData(),
1831 if ((termmode==2) || (termmode==3)) {
1832 gSystem->Exec(launchcmd.Data());
1835 anw->
StartAnalysisShell(launchcmd.Data(), (shellmode==0) ? workdir.toLatin1().constData() : 0,
true);
1854 workdir.toLatin1().constData(),
1859 if (res && (anw!=0) && (termmode==1)) {
1860 anw->
StartAnalysisShell(launchcmd.Data(), (shellmode==0) ? workdir.toLatin1().constData() : 0,
false);
1870 workdir.toLatin1().constData(),
1883 if ((isserver==1) && interactive) {
1892 if ((ana!=0) && interactive)
1893 QMessageBox::information(
this,
"Prepare for client connection",
1894 "Now you can start client from other shell (node) and connect to port " +
1902 if (force_recreate || (anw->
HasOutput() && !needoutput)) {
1914 anw->ensurePolished();
1917 QToolBar* dock = addToolBar(
"Analysis control");
1918 dock->setObjectName(
"AnalysisControlBar");
1921 dock->addWidget(anw);
1934 if ((serv==0) || (dynamic_cast<TGo4AnalysisProxy*>(serv)!=0) || (serv->
DebugOutputSlot()==0))
return;
1952 const char* analisysitem =
"Analysis";
1964 dynamic_cast<TGo4AnalysisProxy*> (analslot->
GetProxy());
1966 if (anal==0)
return 0;
1970 TGo4LogInfo* loginfo = (TGo4LogInfo*)
FindGo4Widget(
"LogInfo",
false);
2025 if ((anw!=0) && anw->
HasOutput())
return;
2027 bool shouldexists =
false;
2031 shouldexists =
true;
2033 shouldexists =
true;
2037 if (shouldexists && (anw==0)) {
2052 TGo4AnalysisStatusMonitor* status =
2053 dynamic_cast<TGo4AnalysisStatusMonitor*
>
2058 status =
new TGo4AnalysisStatusMonitor(statusBar(),
"AnalysisStatusMonitor");
2060 statusBar()->addWidget(status);
2068 status->RemoveLink(
"Ratemeter",
true);
2069 statusBar()->removeWidget(status);
2089 delete conf->parentWidget();
2095 conf =
new TGo4AnalysisConfiguration(
fxMdiArea,
"AnalysisConfiguration");
2105 conf->WorkWithAnalysis(anal);
2121 QMessageBox::warning(
this,
"Connect client",
"Analysis task is already connected");
2126 QString pass = password;
2128 TGo4ConnectServer dlg;
2131 if (dlg.exec()!=QDialog::Accepted)
return;
2132 pass = dlg.getInput();
2145 def ? 0 : pass.toLatin1().constData());
2146 StatusMessage(
"Connecting running analysis.... Please wait");
2157 fulladdress.append(
":");
2158 fulladdress.append(portstring);
2161 QString
msg(
"Connecting analysis http server at ");
2162 msg.append(fulladdress).append(QString(
", Please wait"));
2166 pass.toLatin1().constData(),
false,
false);
2223 if (serv==0)
return;
2232 QMessageBox::Warning,
2233 "Disconnect from analysis",
2234 "Analysis runs inside go4 widget.\n"
2235 "If one only disconnects from the analysis,\n"
2236 "it remains invisible and difficult to stop.\n"
2237 "To shutdown it later, one need to reconnect with go4 gui again.\""
2238 "It is recommended to shutdown analysis now",
2239 QMessageBox::Ok | QMessageBox::Close | QMessageBox::Abort);
2241 msgBox.setButtonText(QMessageBox::Ok,
"Shutdown");
2242 msgBox.setButtonText(QMessageBox::Close,
"Disconnect");
2243 msgBox.setButtonText(QMessageBox::Abort,
"Cancel");
2245 switch (msgBox.exec()) {
2246 case QMessageBox::Ok: shutdown =
true;
break;
2247 case QMessageBox::Close: shutdown =
false;
break;
2251 if (QMessageBox::warning(
this,
"Disconnect analysis",
2252 QString(
"Really disconnect from analysis task?"),
2253 QString(
"Disconnect"),
2255 QString(), 0) != 0)
return;
2265 int res = QMessageBox::warning(
this,
"Shutdown analysis",
2266 QString(
"Really shutdown analysis task?"),
2267 QString(
"Shutdown"),
2274 bool realshutdown =
false;
2291 if (serv==0)
return false;
2297 StatusMessage(
"Press Ctrl+S or choose Analysis->Start from the Menu to start the analysis");
2322 if (cmd.Length()>0) {
2324 StatusMessage(TString::Format(
"Submit %s command to the server", cmd.Data()).Data());
2339 if (cmd.Length()>0) {
2341 StatusMessage(TString::Format(
"Submit %s command to the server", cmd.Data()).Data());
2350 int res = QMessageBox::warning(
this,
"Kill analysis process",
2351 QString(
"Kill analysis by shell command: ") +
fKillCommand +
" ?",
2371 QProcess* killprocess =
new QProcess;
2375 killprocess->start(progname, args);
2376 QTimer::singleShot(10000, killprocess, SLOT(deleteLater()));
2378 StatusMessage(
"Can not kill analysis. Do it by OS commands");
2387 if (!
fxOM)
return 0;
2392 if (!widgslot)
return 0;
2397 if (widg && activate) {
2398 if(!widg->isVisible()){
2411 TGo4FitPanel *fitpanel = (TGo4FitPanel*)
FindGo4Widget(
"FitPanel",
true);
2414 fitpanel =
new TGo4FitPanel(
fxMdiArea,
"FitPanel");
2418 fitpanel->ensurePolished();
2421 fitpanel->parentWidget()->showNormal();
2422 fitpanel->setFocus();
2429 TGo4HistogramInfo* hinfo = (TGo4HistogramInfo*)
FindGo4Widget(
"HistogramInfo",
true);
2431 hinfo =
new TGo4HistogramInfo(
fxMdiArea,
"HistogramInfo");
2435 hinfo->ensurePolished();
2436 hinfo->adjustSize();
2444 TGo4ConditionInfo* cinfo = (TGo4ConditionInfo*)
FindGo4Widget(
"ConditionInfo",
true);
2446 cinfo =
new TGo4ConditionInfo(
fxMdiArea,
"ConditionInfo");
2450 cinfo->ensurePolished();
2451 cinfo->adjustSize();
2459 TGo4LoadedLibraries llib(
this);
2467 TGo4Browser* br = (TGo4Browser*)
FindGo4Widget(
"Browser",
false);
2468 if (br!=0) br->ShootUpdateTimer();
2474 TGo4ParaEdit* pedit = (TGo4ParaEdit*)
FindGo4Widget(
"ParaEdit",
true);
2479 if (!cl->IsLoaded()) {
2480 QMessageBox::warning(0,
"Parameter editor", QString(
"Cannot start parameter editor for incomplete class ") + cl->GetName());
2486 pedit =
new TGo4ParaEdit(
fxMdiArea,
"ParaEdit");
2489 pedit->ensurePolished();
2495 pedit->WorkWithParameter(itemname,
false);
2502 TGo4EditDynEntry* dedit = (TGo4EditDynEntry*)
FindGo4Widget(
"EditDynEntry",
true);
2505 dedit =
new TGo4EditDynEntry(
fxMdiArea,
"EditDynEntry");
2509 dedit->ensurePolished();
2518 TGo4ConditionEditor* wedit = (TGo4ConditionEditor*)
FindGo4Widget(
"ConditionEditor",
true);
2520 wedit =
new TGo4ConditionEditor(
fxMdiArea,
"ConditionEditor");
2524 wedit->ensurePolished();
2532 TGo4EventInfo* einfo = (TGo4EventInfo*)
FindGo4Widget(
"EventInfo",
true);
2535 einfo =
new TGo4EventInfo(
fxMdiArea,
"EventInfo");
2539 einfo->ensurePolished();
2548 return (TGo4AnalysisConfiguration*)
FindGo4Widget(
"AnalysisConfiguration",
false);
2554 QWidget* mdi = conf ? conf->parentWidget() : 0;
2559 if (mdi->isVisible())
2566 if (conf->GetNumSteps() == 0)
2575 if (mdi->isMinimized())
2591 QWidget* mdi = anw->parentWidget();
2593 if (mdi->isVisible()) {
2598 if (mdi->isMinimized()) mdi->showNormal();
2601 QToolBar* dock =
dynamic_cast<QToolBar*
> (anw->parentWidget());
2602 if (dock->isVisible())
2615 anw->parentWidget()->close();
2617 QToolBar* bar =
dynamic_cast<QToolBar*
> (anw->parentWidget());
2630 TGo4MBSViewer* mbs =
2631 dynamic_cast<TGo4MBSViewer*
> (
FindGo4Widget(
"MBSViewer",
false));
2633 if (mbs->parentWidget()->isVisible()) {
2634 mbs->parentWidget()->hide();
2636 mbs->SetNode(nodename);
2637 mbs->parentWidget()->show();
2644 TGo4SetScaleValues* scl = 0;
2646 QList<QMdiSubWindow *> windows =
fxMdiArea->subWindowList();
2647 for (
int i=0; i < windows.count(); ++i ) {
2648 scl =
dynamic_cast<TGo4SetScaleValues*
> (windows.at(i)->widget());
2653 scl =
new TGo4SetScaleValues(
fxMdiArea,
"ScaleValues", Qt::WindowStaysOnTopHint);
2656 scl->ensurePolished();
2659 scl->parentWidget()->close();
2667 TGo4CreateNewHistogram dlg(
this);
2671 dlg.SetLocalAvaliable(isremote!=1);
2673 if (dlg.exec() != QDialog::Accepted)
return;
2674 TH1* h1 = dlg.MakeHistogram();
2679 if (dlg.GetSelectedCmd()==1) {
2682 if (newitem.Length()>0)
2685 newitem.Data(), h1->IsA());
2688 if ((dlg.GetSelectedCmd()==2) && (an!=0)) {
2694 if (h1!=0)
delete h1;
2701 QMessageBox::information(
this,
"Create new condition",
"Cannot create new condition before analysis setup");
2705 TGo4CreateNewCondition dlg(
this);
2707 if (dlg.exec() != QDialog::Accepted)
return;
2710 if (cond==0)
return;
2725 QMessageBox::information(
this,
"Create new dynamic entry",
"Cannot create new entry before analysis setup");
2729 TGo4CreateNewDynEntry dlg(
this);
2731 if (dlg.exec() != QDialog::Accepted)
return;
2734 if (entry==0)
return;
2747 if (editor==0)
return;
2748 connect(editor, SIGNAL(widgetService(
QGo4Widget*,
int,
const char*,
void*)),
2756 if ((br==0) || (itemname==0) || strlen(itemname)==0 )
return 0;
2760 if (guislot==0)
return 0;
2762 std::cerr <<
" Problem with gui slots" << std::endl;
2768 pad = panel->GetCanvas();
2770 if (pad==0) pad = panel->GetActivePad();
2775 panel->SetActivePad(pad);
2776 panel->ShootRepaintTimer();
2779 if (updatelevel<0) {
2794 if ((br==0) || (itemname==0))
return 0;
2796 TString fileslotname;
2797 const char* filepath = 0;
2802 int answer = QMessageBox::question(
this,
"Writing object to file",
2803 QString(
"Overwrite ") + filepath +
" in file " + fileslotname.Data(),
2804 "Overwrite",
"Save to other file",
"Cancel");
2805 if (answer==2)
return false;
2811 QString root_fmt =
"ROOT (*.root)";
2812 QString xml_fmt =
"ROOT XML (*.xml)";
2814 QFileDialog fd(
this, QString(
"Save ") + itemname +
" in root file",
fLastFileDir);
2815 fd.setFileMode(QFileDialog::AnyFile);
2816 fd.setAcceptMode(QFileDialog::AcceptSave);
2817 fd.setNameFilters(QStringList() << root_fmt << xml_fmt);
2819 if (fd.exec() == QDialog::Accepted) {
2820 QStringList flst = fd.selectedFiles();
2821 if (!flst.isEmpty()) {
2822 QString filename = flst[0];
2823 if (fd.selectedNameFilter()==xml_fmt) {
2824 if (!filename.endsWith(
".xml")) filename.append(
".xml");
2826 if (!filename.endsWith(
".root")) filename.append(
".root");
2828 res = br->
SaveItemToFile(itemname, filename.toLatin1().constData(), subfolder);
2839 if (panel==0)
return;
2841 TCanvas* can = panel->GetCanvas();
2843 QFileDialog fd(
this, QString(
"Save ") + panel->objectName() +
" As",
fLastFileDir);
2844 fd.setFileMode( QFileDialog::AnyFile );
2845 fd.setAcceptMode(QFileDialog::AcceptSave);
2847 QString PS =
"Post Script (*.ps)";
2848 QString PS_Portrait =
"Post Script Portrait (*.ps)";
2849 QString PS_Landscape =
"Post Script Landscape (*.ps)";
2850 QString EPS =
"Encapsulated Post Script (*.eps)";
2851 QString EPS_Preview =
"Encapsulated Post Script preview (*.eps)";
2852 QString GIF =
"GIF format (*.gif)";
2853 QString PDF =
"PDF format (*.pdf)";
2854 QString SVG =
"SVG format (*.svg)";
2855 QString XPM =
"XPM format (*.xpm)";
2856 QString PNG =
"PNG format (*.png)";
2857 QString JPG =
"JPG format (*.jpg)";
2858 QString TIFF =
"TIFF format (*.tiff)";
2860 QString CXXM =
"C++ Macro (*.C)";
2861 QString ROOTM =
"root file (*.root)";
2867 flt << PS_Landscape;
2882 fd.setNameFilters(flt);
2884 if (fd.exec() != QDialog::Accepted)
return;
2890 can = (TCanvas*) panel->GetCanvas()->Clone();
2891 can->SetName(
"PrintoutPad");
2894 QStringList flst = fd.selectedFiles();
2895 if (flst.isEmpty())
return;
2897 QString filename = flst[0];
2898 QString filter = fd.selectedNameFilter();
2902 const char* opt =
"ps";
2906 if (!filename.endsWith(
".eps")) filename.append(
".eps");
2908 if(filter==EPS_Preview) {
2910 if (!filename.endsWith(
".eps")) filename.append(
".eps");
2914 if (!filename.endsWith(
".ps")) filename.append(
".ps");
2916 if(filter==PS_Portrait) {
2918 if (!filename.endsWith(
".ps")) filename.append(
".ps");
2920 if(filter==PS_Landscape) {
2922 if (!filename.endsWith(
".ps")) filename.append(
".ps");
2926 if (!filename.endsWith(
".gif")) filename.append(
".gif");
2930 if (!filename.endsWith(
".pdf")) filename.append(
".pdf");
2934 if (!filename.endsWith(
".svg")) filename.append(
".svg");
2938 if (!filename.endsWith(
".xpm")) filename.append(
".xpm");
2942 if (!filename.endsWith(
".png")) filename.append(
".png");
2946 if (!filename.endsWith(
".jpg")) filename.append(
".jpg");
2950 if (!filename.endsWith(
".tiff")) filename.append(
".tiff");
2954 if (!filename.endsWith(
".C")) filename.append(
".C");
2956 if (filter==ROOTM) {
2958 if (!filename.endsWith(
".root")) filename.append(
".root");
2962 panel->ResetPadFillColors(can,0);
2964 gROOT->SetBatch(kTRUE);
2967 can->Print(filename.toLatin1().constData(), opt);
2970 gROOT->SetBatch(kFALSE);
2987 if (widget==0)
return 0;
2989 QString EditorName = widget->objectName();
2992 editorslotname +=
"/";
2993 editorslotname += EditorName;
2995 if ((edslot==0) && force) {
2997 edslot =
fxOM->
GetSlot(editorslotname.toLatin1().constData());
3011 if ((actpanel!=0) && actpanel->IsRepaintTimerActive())
3012 actpanel->checkRepaintSlot();
3018 for (
int n=0;n<topslot->
NumChilds();n++) {
3023 if (wproxy==0)
continue;
3025 TGo4ViewPanel* panel =
3026 dynamic_cast<TGo4ViewPanel*
> (wproxy->
GetWidget());
3028 if ((panel!=0) && (panel!=actpanel))
3029 if (panel->IsRepaintTimerActive()) {
3030 panel->checkRepaintSlot();
3043 if (editor==0)
return;
3048 if (edslot==0)
return;
3050 switch (serviceid) {
3052 QDragMoveEvent *
event = (QDragMoveEvent *) par;
3053 if (!event || !event->mimeData()->hasText())
return;
3055 QString eventstr =
event->mimeData()->text();
3057 bool accept =
false;
3061 accept = editor->
IsAcceptDrag(eventstr.toLatin1().constData(), cl, kind);
3064 if (accept)
event->acceptProposedAction();
3069 QDropEvent*
event = (QDropEvent*) par;
3071 if ((event==0) || !
event->mimeData()->hasText())
return;
3073 QString eventstr =
event->mimeData()->text();
3074 event->acceptProposedAction();
3080 TGo4ViewPanel* panel =
dynamic_cast<TGo4ViewPanel*
> (editor);
3081 TGo4FitPanel* fitpanel =
dynamic_cast<TGo4FitPanel*
> (editor);
3083 panel->DropOnPad((TPad*)str, eventstr.toLatin1().constData(), cl, kind);
3086 fitpanel->DropOnPanel(event, eventstr.toLatin1().constData(), cl, kind);
3088 editor->
DropItem(eventstr.toLatin1().constData(), cl, kind);
3094 TClass* cl = (TClass*) par;
3095 int id = str!=0 ? QString(str).toInt() : 0;
3097 if (cl->InheritsFrom(TH1::Class()))
3099 else if (cl->InheritsFrom(TGo4Condition::Class()) && (
id!=0))
3101 else if (cl->InheritsFrom(TGo4DynamicEntry::Class()) && (
id!=0))
3107 void** res = (
void**) par;
3108 res[0] =
DisplayBrowserItem(str, (TGo4ViewPanel*) res[0], (TPad*) res[1], *((
bool*)res[2]), *((
int*) res[3]), 0);
3113 TGo4ViewPanel** res = (TGo4ViewPanel**) par;
3116 for (
int n=0;n<topslot->
NumChilds();n++) {
3121 if (wproxy==0)
continue;
3123 TGo4ViewPanel* panel =
3124 dynamic_cast<TGo4ViewPanel*
> (wproxy->
GetWidget());
3127 if (panel->FindPadWithItem(str)!=0) {
3138 for (
int n=0;n<topslot->
NumChilds();n++) {
3143 if (wproxy==0)
continue;
3145 TGo4ViewPanel* panel =
3146 dynamic_cast<TGo4ViewPanel*
> (wproxy->
GetWidget());
3149 panel->UndrawItemOnPanel(str);
3164 TGo4TreeViewer* tviewer =
3165 dynamic_cast<TGo4TreeViewer*
> (
FindGo4Widget(
"TreeViewer",
false));
3167 tviewer->WorkWithLeaf(str);
3168 tviewer->parentWidget()->show();
3175 if (cl->InheritsFrom(TGo4Fitter::Class())) {
3177 TGo4ViewPanel* panel =
dynamic_cast<TGo4ViewPanel*
> (editor);
3178 fitpanel->WorkWithFitter(str, panel, panel==0 ? 0 : panel->GetActivePad());
3180 if (cl->InheritsFrom(TGo4Parameter::Class())) {
3183 if (cl->InheritsFrom(TH1::Class())) {
3185 hinfo->WorkWithHistogram(str);
3187 if (cl->InheritsFrom(TGo4Condition::Class())) {
3189 wedit->WorkWithCondition(str);
3191 if (cl->InheritsFrom(TGo4DynamicEntry::Class())) {
3193 dedit->WorkWithEntry(str);
3195 if (cl->InheritsFrom(TGo4AnalysisStatus::Class())) {
3208 einfo->WorkWithEvent(str);
3212 if (cl->InheritsFrom(TH1::Class())) {
3214 hinfo->WorkWithHistogram(str);
3216 if (cl->InheritsFrom(TGo4Condition::Class())) {
3218 cinfo->WorkWithCondition(str);
3228 if (obj->InheritsFrom(TGo4Fitter::Class())) {
3230 fitpanel->WorkWithFitterInSlot(slot);
3236 const char* subfolder = (
const char*) par;
3237 bool* replace = (
bool*) par;
3239 * ((
char*) par) = res ? 1 : 0;
3244 TObject** obj = (TObject**) par;
3246 if (res) *obj = (TObject*) 1;
else *obj = 0;
3256 TGo4ViewPanel** res = (TGo4ViewPanel**) par;
3262 bool* res = (
bool*) par;
3274 TObject** obj = (TObject**) par;
3276 QString** res = (QString**) par;
3278 if (itemname.Length()>0)
3279 *res =
new QString(itemname.Data());
3292 QByteArray ba = editor->objectName().toLatin1();
3294 if (str==0) str = ba.constData();
3297 str,
"link to browser item");
3306 QByteArray ba = editor->objectName().toLatin1();
3307 if (str==0) str = ba.constData();
3312 str,
"direct link to OM slot");
3325 if (parent==0) parent = edslot;
3330 brslot->GetName(),
"link in specific subfolder");
3362 if (edslot==0)
return;
3363 const char** res = (
const char**) par;
3369 void** res = (
void**) par;
3378 if (edslot==0)
return;
3380 if (link==0)
return;
3382 TObject** res = (TObject**) par;
3392 if (edslot==0)
return;
3394 if (link!=0) link->
Delete();
3399 if ((str==0) || (strcmp(str,
"complete")!=0))
3410 if (edslot==subslot)
continue;
3423 if (edslot==0)
break;
3433 TGo4ViewPanel** res = (TGo4ViewPanel**) par;
3439 if (strcmp(str,
"CloseAnalysisWindow")==0) {
3445 if (strcmp(str,
"PrintAnalysisHistograms")==0) {
3450 if (strcmp(str,
"PrintAnalysisConditions")==0) {
3455 if (strcmp(str,
"DisplayMbsMonitor")==0) {
3459 if (strcmp(str,
"SubmitAnalysisSettings")==0) {
3463 if (strcmp(str,
"CloseAnalysisSettings")==0) {
3471 if (strcmp(str,
"SubmitStartAnalysis")==0) {
3475 if (strcmp(str,
"StartAnalysis")==0) {
3479 if (strcmp(str,
"StopAnalysis")==0) {
3483 if (strcmp(str,
"TerminateAnalysis")==0) {
3487 if (strcmp(str,
"UpdateGuiLayout")==0) {
3491 if (strcmp(str,
"StartEventInfo")==0) {
3495 if (strcmp(str,
"ActivateConditionEditor")==0) {
3496 TGo4ConditionEditor* w =
3497 (TGo4ConditionEditor*)
FindGo4Widget(
"ConditionEditor",
true);
3500 w->RefreshWidget(
true);
3504 if (strcmp(str,
"SavePanelCanvas")==0) {
3508 if (strcmp(str,
"ToggleScaleValues")==0) {
3512 if (strcmp(str,
"GetFitterFromFitPanel")==0) {
3513 TGo4FitPanel* panel = (TGo4FitPanel*)
FindGo4Widget(
"FitPanel",
false);
3515 if ((panel!=0) && (res!=0))
3516 *res = panel->GetFitter();
3519 if (strcmp(str,
"CloneFitterFromFitPanel")==0) {
3520 TGo4FitPanel* panel = (TGo4FitPanel*)
FindGo4Widget(
"FitPanel",
false);
3522 if ((panel!=0) && (res!=0))
3523 *res = panel->CloneFitter();
3530 TGo4ViewPanel* panel = (TGo4ViewPanel*) editor;
3555 TGo4ViewPanel* panel = (TGo4ViewPanel*) editor;
3556 TPad* pad = (TPad*) par;
3568 if (fname==0)
return;
3581 if (exec==0)
return;
3590 if (QApplication::overrideCursor()==0)
3591 QApplication::setOverrideCursor(Qt::WaitCursor);
3595 QApplication::restoreOverrideCursor();
3609 QFileDialog::getSaveFileName(
this,
3610 "Create GUI script dialog",
3612 QString(
"GUI hotstart script (*") + ext +
")");
3613 if (fileName.length()==0)
return;
3615 int pos = fileName.indexOf(ext);
3617 if ((pos<0) || (pos!=fileName.length()-ext.length()))
3629 QToolBar* AnalysisMacroBar = addToolBar(
"Analysis Command Buttons");
3630 AnalysisMacroBar->setObjectName(
"AnalysisCommandToolBar");
3633 TGo4UserCommands* companel =
new TGo4UserCommands(
this,
"UserCommands");
3635 AnalysisMacroBar->addWidget(companel);
3636 AnalysisMacroBar->adjustSize();
3648 if ((name==0) || (*name==0))
return 0;
3650 TGo4ViewPanel* panel =
dynamic_cast<TGo4ViewPanel*
> (
FindGo4Widget(name,
false));
3652 if (panel!=0)
return panel;
3656 for (Int_t n=0;n<slot->
NumChilds();n++) {
3659 panel = wproxy==0 ? 0 :
dynamic_cast<TGo4ViewPanel*
> (wproxy->
GetWidget());
3662 if (strcmp(panel->GetPanelName(), name)==0)
return panel;
Bool_t IsAnalysisSettingsReady() const
void PaletteSettingsSlot()
QAction * faWindowRubberBand
TGo4ConditionEditor * StartConditionEditor()
void setDrawDateFlag(bool on=true)
QString GetSettLoaction()
virtual Bool_t IsViewer()
void setScreenScaleFactor(double factor)
TGo4Proxy * GetProxy(const char *name)
QAction * faDisconnectAnal
bool getSavePadWhiteBackground()
void OpenRemoteFileSlot()
void OpenFile(const char *fname)
void CreateNewHistSlot(int isremote=-1)
Bool_t ContinueExecution()
void HotStart(const char *fname)
QString getTGraphDrawOpt()
virtual Bool_t IsConnected()
QString getClientAccountName()
void EstablishAnalysisWindowForHttp()
void storeMainWindowState(QMainWindow *src)
void StatusMessage(const QString &mess)
QMdiSubWindow * AddGo4SubWindow(QWidget *widget, Qt::WindowFlags flags=Qt::Widget)
void ChangeTerminalFontSlot()
TGo4AnalysisProxy * AddAnalysisProxy(bool isserver, bool needoutput)
void setTH1DrawOpt(const QString &value)
void setHideTGo4EventElement(bool on=true)
void ChangeDrawDateFlagSlot()
TString SaveToMemory(const char *pathname, TObject *obj, Bool_t ownership, Bool_t overwrite=kFALSE)
TObject * GetBrowserObject(const char *name, Int_t update=0)
double getScreenScaleFactor()
virtual Bool_t IsAdministrator()
void SetProxy(TGo4Proxy *cont)
void ConnectHServerSlot()
TGo4Slot * UpdateObjectSlot()
void ToggleFullScreenSlot()
void LaunchClientSlot(bool interactive=true)
void setFetchDataWhenCopy(bool on=true)
Int_t ItemKind(const char *name)
bool SaveBrowserItemToFile(const char *itemname, const char *subfolder)
void setPadEventStatus(bool on)
bool getFetchDataWhenCopy()
TGo4MainWindow(QApplication *)
void AddFile(const char *pathname, const char *filename)
void ChangeFetchWhenDrawSlot()
static void ExtractProgArgs(QString &prog, QStringList &args)
QString getTermTimeFormat()
Bool_t IsItemRemote(const char *name)
TGo4Proxy * GetProxy() const
void checkPanelRepaintSlot()
void setDrawFillColor(int col)
void ConnectGo4Widget(QGo4Widget *editor)
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=0)
void HelpWindow(const char *filename, const char *msg=0)
void setPaletteOpt(int min, int def, int max)
void ToggleAnalysisConfiguration()
TGo4AnalysisConfiguration * EstablishAnalysisConfiguration(int level)
void MakeFolder(const char *pathname)
QAction * faTermTimeStamp
QAction * faFetchWhenSave
virtual Bool_t IsGo4Analysis() const
void CreateNewConditionSlot(bool forothereditor=false)
void setHServFilter(const QString &)
void ChangeHideEventElement()
virtual TGo4ServerProxy * ConnectHttp(const char *servername, const char *account=0, const char *pass=0)
TGo4ParaEdit * StartParaEdit(const char *itemname=0)
QAction * faHideEventElement
virtual void CloseAnalysisSettings()
TClass * ItemClass(const char *name)
static const char * FileExtension()
void DeleteChilds(const char *startedwith=0)
QString getClientExec(int mode=-1)
TGo4AnalysisStatusMonitor * EstablishRatemeter(int level)
QAction * faFetchWhenDraw
static void SetIgnoreLevel(Int_t level)
void SetAnalysisLaunched(Int_t on=1)
void UpdateDockAnalysisWindow()
void ChangeDrawOnceSlot()
bool SubmitAnalysisSettings()
void ToggleMbsMonitor(const char *nodename)
virtual Bool_t IsConnected()
virtual Bool_t RefreshNamesList()
static void OutputEnable(Bool_t on=kTRUE)
void StartAnalysisShell(const char *cmd, const char *workdir=0, bool aschildprocess=false)
virtual Bool_t IsAdministrator()
void ConnectServerSlot(bool interactive=true, const char *password="")
void ChangeFetchWhenCopySlot()
virtual void RequestAnalysisSettings()
virtual Bool_t IsController()
static void OpenLogfile(const char *name=0, const char *headercomment=0, Bool_t appendmode=kFALSE)
void setTH3DrawOpt(const QString &value)
TGo4ServerProxy * FindServer(const char *itemname=0, Bool_t asanalysis=kTRUE)
Bool_t ConnectHServer(const char *servername, Int_t portnumber, const char *basename, const char *userpass, const char *filter)
virtual Bool_t IsAnalysisServer() const
void CheckConnectingCounterSlot()
void ShutdownAnalysisSlot(bool interactive=true)
void SetHistorySize(int sz)
void setSavePadWhiteBackground(bool on)
int getClientControllerMode()
virtual void StartAnalysis()
Bool_t SaveBrowserToFile(const char *filename, Bool_t prefetch=kFALSE, const char *selectedpath=0, const char *description=0)
void setTermHistorySize(int sz)
static TGo4Script * ScriptInstance()
TGo4FitPanel * StartFitPanel()
TGo4Slot * DataSlot(const char *item)
void ChangeTerminalTimeStampSlot()
Bool_t ConnectToServer(const char *remotehost, Int_t remoteport, Int_t ascontroller, const char *accesspass)
TGo4BrowserProxy * Browser()
virtual Bool_t IsAdministrator()
TGo4Slot * RatemeterSlot()
void InputTerminalParametersSlot()
TObject * GetAssignedObject()
TGo4SetScaleValues * ToggleScaleValues()
void SetDefaultReceiver(TGo4ObjectManager *rcv, const char *path)
void SavePanelCanvas(TGo4ViewPanel *panel)
void WorkWithDebugOutput(TGo4Slot *slot)
void SetAnalysisReady(Bool_t on=kTRUE)
void setFetchDataWhenDraw(bool on=true)
void setCloneFlag(bool on=true)
void setPadCrosshair(bool on)
void UpdateCaptionButtons()
TGo4Slot * DebugOutputSlot()
virtual Bool_t IsConnected()
TGo4Slot * FindChild(const char *name)
void ResponseOnPanelEvent(int funcid, TGo4ViewPanel *panel, TPad *pad)
void windowsMenuAboutToShow()
virtual void ResetDebugOutputRequests()
virtual const char * GetContainedObjectInfo()
static void DeleteInstance()
Bool_t DefineFileObject(const char *itemname, TString &filedataslot, const char **filepath)
TGo4HistogramInfo * StartHistogramInfo()
void CreateMemoryFolder(const char *foldername=0)
static Int_t DelayMillisec()
Int_t IsAnalysisLaunched() const
void ChangeSaveWhiteBackgroundSlot()
bool getMbsMonitorMonitorActive()
void setHServPort(int port)
TGo4Slot * MakeObjSlot(const char *foldername, const char *name=0, const char *title=0)
virtual Bool_t IsAnalysisServer() const
bool getTermShowTimestamp()
void AddAnalysisMacrosBar()
bool TerminateOnClose() const
void setTermFont(const QFont &)
TGo4AnalysisWindow * EstablishAnalysisWindow(bool needoutput, bool withkillbnt=false, bool force_recreate=false)
virtual Bool_t IsController()
virtual Bool_t UpdateAnalysisObject(const char *objectname, TObject *obj)
void setAppStyle(const QString &)
TGo4Slot * GetSlot(const char *name, Bool_t force=kFALSE)
void setDrawLineWidth(int w=1)
QAction * faFetchWhenCopy
int getClientConnectMode()
TGo4EventInfo * StartEventInfo()
void windowsMenuActivated(int id)
QAction * faSumbStartAnal
static Bool_t GetLaunchString(TString &launchcmd, TString &killcmd, Int_t serverkind, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, const char *remotedir, const char *remoteexe, Int_t guiport, Int_t exe_kind=0, const char *exeargs=0)
void setDrawOnceFlag(bool on=true)
TGo4ViewPanel * GetActivePanel()
void WorkWithUpdateObjectCmd(TGo4Slot *slot)
bool getFetchDataWhenSave()
void ChangeCloneFlagSlot()
void SetMonitorBlockingFlag(Bool_t blocked=kFALSE)
static const char * Message(Int_t prio, const char *text,...)
void *(* TStartUserGuiFunc)(QWidget *parent)
void setFetchDataWhenSave(bool on=true)
virtual Bool_t CanSubmitObjects()
static void ProduceScript(const char *filename, TGo4MainWindow *main)
void restoreMainWindowState(QMainWindow *tgt)
TGo4Slot * BrowserSlot(const char *item)
QSignalMapper * winMapper
virtual ~TGo4MainWindow()
TGo4ViewPanel * FindViewPanel(const char *name)
bool startUserGUI(const char *)
void AddProxy(const char *pathname, TGo4Proxy *cont, const char *name, const char *title="title")
bool getFetchDataWhenDraw()
virtual void SubmitAnalysisSettings()
void CreateGUIScriptSlot()
void CreateNewDynEntrySlot(bool forothereditor=false)
TGo4AnalysisProxy * FindAnalysis(const char *itemname=0)
void setMoveSubwindowRubberBand(bool on=true)
QGo4Widget * FindGo4Widget(const char *name, bool activate)
static const char * GetLinkedName(TGo4Slot *slot)
void CloseFiles(const char *pathname)
TGo4EditDynEntry * StartEditDynEntry()
void setDrawTimeFlag(bool on=true)
Bool_t StartScriptExecution(const char *fname)
void SetStyleSlot(const QString &)
QSize lastPanelSize(const QString &kind="ViewPanel", int dfltwidth=450, int dfltheight=250)
void editorServiceSlot(QGo4Widget *editor, int serviceid, const char *str, void *par)
void setTH2DrawOpt(const QString &value)
void DisconnectAnalysisSlot(bool interactive=true)
void setHServName(const QString &)
void GStyleStatFormatSlot()
virtual void Delete(Option_t *opt="")
void SubmitStartAnalysisSlot()
virtual void StopAnalysis()
bool getClientDefaultPass()
static TString subGO4SYS(const char *subdir)
void setClientNode(const QString &)
TGo4ServerProxy * ConnectHttpSlot(const char *addr=0, const char *user=0, const char *pass=0, bool with_qt_process=false, bool get_analysis_config=false)
void UpdateTimeStampFormat()
virtual void closeEvent(QCloseEvent *ce)
TString GetFullName(TGo4Slot *toparent=0)
virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec)
void getPaletteOpt(int &min, int &def, int &max)
static void SetLinkedName(TGo4Slot *slot, const char *itemname)
void setTermShowTimestamp(bool on)
void setDrawFillStyle(int style)
void setDrawItemFlag(bool on=true)
void setCanvasColor(int red, int green, int blue)
bool getMoveSubwindowRubberBand()
void ChangeFetchWhenSaveSlot()
void ChangeDrawTimeFlagSlot()
TGo4ViewPanel * DisplayBrowserItem(const char *itemname, TGo4ViewPanel *panel, TPad *pad, bool activate, int updatelevel, const char *drawopt)
static const char * GetDabcVersion()
void AppendOutputBuffer(const QString &value, int prio=0)
TGo4AnalysisConfiguration * FindAnalysisConfiguration()
virtual TString FindCommand(const char *name)
void ChangeDrawItemFlagSlot()
QString getGStyleStatFormat()
TGo4ViewPanel * MakeNewPanel(int div=0)
void CloseAnalysisWindow()
void TerminateAnalysis(bool interactive=true)
const char * LastTypedPassword() const
Bool_t UpdateObjectInFile(const char *itemname, const char *fileslotname, const char *filepath)
virtual Bool_t SubmitCommand(const char *name, Int_t waitres=-1, const char *arg1=0, const char *arg2=0, const char *arg3=0)
static void AutoEnable(Bool_t on=kTRUE)
TGo4AnalysisWindow * FindAnalysisWindow()
void setClientConnectMode(int)
TGo4Slot * GetChild(Int_t n) const
bool getHideTGo4EventElement()
void setHServBase(const QString &)
void MarkerSettingsSlot()
bool RemoveAnalysisProxy(int waittime=30, bool servershutdown=false)
void setGStyleStatFormat(const QString &)
Bool_t UpdateAnalysisItem(const char *itemname, TObject *obj=0)
virtual void DisconnectAnalysis(Int_t waittime=30, Bool_t servershutdown=kFALSE)
void ToggleAnalysisWindow()
void CascadeMdiPosition(QWidget *sub)
void setTermTimeFormat(const QString &form)
static Bool_t IsAutoEnabled()
void ChangeTerminalTimeStampFormatSlot()
void setAppFont(const QFont &)
void setPadSuperimpose(bool on)
void ChangeWindowRubberBandSlot()
void ToggleMonitoring(Int_t period)
void TerminateAnalysisProcess()
void PrepareForClientConnectionSlot(bool interactive=true)
TGo4Slot * AddLink(TGo4Slot *source, const char *pathname, const char *linkname, const char *linktitle)
TGo4ConditionInfo * StartConditionInfo()
Bool_t SaveItemToFile(const char *itemname, const char *filename, const char *subfolder=0)
TGo4Slot * GetWidgetTopSlot(QGo4Widget *widget, bool force)
void setTGraphDrawOpt(const QString &value)
void WaitForNewObject(bool isobjectforeditor)
static void LogfileEnable(Bool_t on=kTRUE)
static Bool_t LaunchAsServer(TString &launchcmd, TString &killcmd, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, Int_t remoteport, const char *remotedir, const char *remoteexe, Int_t exe_kind=0, const char *exeargs=0)