ATLAS Offline Software
VP1MainWindow.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Implementation of class VP1MainWindow //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 //
13 // Updates:
14 // - Riccardo.Maria.Bianchi@cern.ch
15 // //
17 
18 #include "VP1Gui/VP1MainWindow.h"
19 
21 #include "VP1Gui/VP1TabManager.h"
24 #include "VP1Gui/VP1PluginDialog.h"
25 #include "VP1Gui/VP1DockWidget.h"
26 #include "VP1Gui/VP1AvailEvents.h"
28 #include "VP1StreamMenuUpdater.h"
29 
30 #ifdef BUILDVP1LIGHT
33  #include "VP1Gui/VP1AODSelection.h"
34  #include "VP1Gui/VP1SelectEvent.h"
35 #endif
36 
38 
40 #include "VP1Base/IVP1System.h"
41 #include "VP1Base/VP1Msg.h"
42 #include "VP1Base/VP1Settings.h"
43 #include "VP1Base/VP1QtUtils.h"
44 
45 
46 #include <QMessageBox>
47 #include <QInputDialog>
48 #include <QLabel>
49 #include <QCloseEvent>
50 #include <QFileDialog>
51 #include <QDir>
52 #include <QTimer>
53 #include <QSettings>
54 #include <QComboBox>
55 #include <QPainter>
56 #include <QPrinter>
57 #include <QPrintDialog>
58 #include <QProgressBar>
59 #include <QStyleFactory>
60 #include <QDateTime>
61 #include <QMutex>
62 #include <QDesktopServices>
63 #include <QUrl>
64 #include <QProcess>
65 #include <QGraphicsView>
66 #include <QGraphicsScene>
67 #include <QtGui>
68 #include <QScrollBar>
69 
70 
71 
72 /* FIXME: LCG does not ship QWebEngine with Qt5 at the moment,
73  * but later you want to put it back again!
74  */
75 /*
76 #include <QtGlobal>
77 #if QT_VERSION > QT_VERSION_CHECK(5, 5, 0)
78  #include <QWebEngineView> // Qt 5.6
79 #else
80  #include <QtWebKit>
81 #endif
82 */
83 
84 #include <cassert>
85 #include <iostream>
86 
87 
88 //_________________________________________________________________________________
90 : QMainWindow(parent),
91  m_runnumber(-1),
92  m_eventnumber(-1),
93  m_betweenevents(true),
94  m_mustquit(false),
95  m_dummyemptycontroller(new QWidget(0)),
96  m_scheduler(sched),
97  m_availEvents(ae),
98  m_settingsfile(QDir::homePath()+QDir::separator()+".atlasvp1"),
99  m_userRequestedExit(false),
100  m_streamMenuUpdater(0),
101  m_mutex(new QMutex()),
102  m_edEditor(0)
103 {
104  setupUi(this); // this sets up the GUI
105 
106  setupStatusBar();
107  //
108  #if defined BUILDVP1LIGHT
109  bool checkShowAllCruiseAndEventControls = VP1QtUtils::expertSettingIsSet("expert","ExpertSettings/VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");
110  #else
111  bool checkShowAllCruiseAndEventControls = VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");
112  #endif
113 
114  if (!checkShowAllCruiseAndEventControls) {
115  pushButton_eventseek->setVisible(false);
116  groupBox_cruise->setVisible(false);
117  }
118 
119  if (m_availEvents) {
120  connect(m_availEvents,SIGNAL(message(const QString&)),this,SLOT(helperAddToMessageBox(const QString&)));
121  connect(m_availEvents,SIGNAL(freshEventsChanged()),this,SLOT(updateEventControls()));
122  }
123 
124  // File menu
125  if(!m_availEvents) {
126  QMenu* menu_file = new QMenu(menubar);
127  menu_file->setObjectName("menu_file");
128  menu_file->setTitle("&File");
129  menubar->addAction(menu_file->menuAction());
130  m_action_addEventFile = menu_file->addAction("&Add event file ...");
131 
132  connect(m_action_addEventFile,SIGNAL(triggered(bool)),this,SLOT(addEventFile()));
133  }
134 
135  #ifndef BUILDVP1LIGHT
136  pushButton_previousevent->setVisible(false);
137  pushButton_eventselect->setVisible(false);
138  #else
139  pushButton_eventselect->setVisible(true);
140  pushButton_eventselect->setText("Event: 0/0");
141  pushButton_eventselect->setEnabled(false);
142  pushButton_previousevent->setEnabled(false);
143  //Disable all controls that are not available in VP1Light
144  // pushButton_quicksetup_3dcocktail->setEnabled(false);
145  // pushButton_quicksetup_3dcocktail->setToolTip("Not available in VP1Light");
146  pushButton_quicksetup_trackingstudies->setEnabled(false);
147  pushButton_quicksetup_trackingstudies->setToolTip("Not available in VP1Light");
148  pushButton_quicksetup_calostudies->setEnabled(false);
149  pushButton_quicksetup_calostudies->setToolTip("Not available in VP1Light");
150  action_quicklaunch_Tracking_studies->setEnabled(false);
151  action_quicklaunch_Tracking_studies->setToolTip("Not available in VP1Light");
152  action_quicklaunch_Calo_studies->setEnabled(false);
153  action_quicklaunch_Calo_studies->setToolTip("Not available in VP1Light");
154  action_quicklaunch_Storegate_browser->setEnabled(false);
155  action_quicklaunch_Storegate_browser->setToolTip("Not available in VP1Light");
156  action_quicklaunch_trackcalo_commis->setEnabled(false);
157  action_quicklaunch_trackcalo_commis->setToolTip("Not available in VP1Light");
158  m_action_addEventFile->setEnabled(false);
159  #endif
160 
162  //Do we need a menu for multiple input directories?
163 
164  VP1AvailEvtsLocalDir* availLocal = dynamic_cast<VP1AvailEvtsLocalDir*>(m_availEvents);
165 
166  QStringList inputdirs;
167  if (availLocal)
168  inputdirs = availLocal->availableSourceDirectories();
169 
170  if (availLocal&&!inputdirs.isEmpty()) {
171 
172  QString currentdir = availLocal->currentSourceDir();
173  if (currentdir.endsWith("/"))
174  currentdir.chop(1);
175  m_currentStream = QDir(currentdir).dirName();
176  QMenu * menu_inputdir = new QMenu(menubar);
177  menu_inputdir->setObjectName("menu_inputdir");
178  menu_inputdir->setTitle("&Stream");
179 
180  menubar->addAction(menu_inputdir->menuAction());
181 
182  QActionGroup * inputdir_actiongroup = new QActionGroup(menu_inputdir);
183  QAction*action_inputdir_current(0);
184  foreach (QString inputdir, inputdirs) {
185  if (inputdir.endsWith("/"))
186  inputdir.chop(1);
187  QString dirname = QDir(inputdir).dirName();
188  QAction * action_inputdir = new QAction(this);
189  action_inputdir->setObjectName("action_inputdir_"+dirname);
190  action_inputdir->setData(inputdir);
191  action_inputdir->setStatusTip("Get input files from: "+inputdir);
192  action_inputdir->setCheckable(true);
193 
194  if (currentdir==inputdir)
195  action_inputdir_current = action_inputdir;
196  menu_inputdir->addAction(action_inputdir);
197  inputdir_actiongroup->addAction(action_inputdir);
198  m_inputdiractions << action_inputdir;
199  connect(action_inputdir,SIGNAL(triggered(bool)),this,SLOT(inputDirectoryActionTriggered()));
200  }
201  if (action_inputdir_current) {
202  action_inputdir_current->blockSignals(true);
203  action_inputdir_current->setChecked(true);
204  action_inputdir_current->blockSignals(false);
205  }
206 
207  // Populate inputdirstatuses
208  foreach(QAction* action, m_inputdiractions)
209  m_inputdirstatuses[action] = VP1DirStatusData(action->data().toString(),
210  QString(),
211  true,
212  false);
213 
215  m_streamMenuUpdater->start();
216 
217  //Fixme: start timer which every minute checks the status of these directories
218  QTimer *timer = new QTimer(this);
219  connect(timer, SIGNAL(timeout()), this, SLOT(updateInputDirectoriesStatus()));
220  timer->start(5000);//update this menu rather often (this is only for P1 anyway)
221  }
222 
223  //.......
224 
226  m_tabmanager = new VP1TabManager(this,tabWidget_central,m_channelmanager);
227  stackedWidget_customcontrols->addWidget(m_dummyemptycontroller);
228 
229  //Final touches to instructions page:
230 
231  // Remove any margins added by the layouts in the stacked
232  // widget. This really ought to be the default for stacked widgets!
233  for (int i=0;i<stackedWidget_central->count();++i)
234  stackedWidget_central->widget(i)->layout()->setContentsMargins(0,0,0,0);
235 
236  frame_instructions->setStyleSheet("QFrame#frame_instructions { "+VP1DockWidget::highlightStyle()+" } ");
237  frame_instructions->setFrameShape(QFrame::StyledPanel);
238  // textBrowser_intro1->setStyleSheet("QTextBrowser#textBrowser_intro1 { background-color: rgba(0, 0, 0, 0%) } ");
239  // textBrowser_intro2->setStyleSheet("QTextBrowser#textBrowser_intro2 { background-color: rgba(0, 0, 0, 0%) } ");
240  #ifndef BUILDVP1LIGHT
241  connect(pushButton_quicksetup_3dcocktail,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
242  #else
243  connect(pushButton_quicksetup_3dcocktail,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
244  #endif
245  connect(pushButton_quicksetup_trackingstudies,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
246  connect(pushButton_quicksetup_calostudies,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
247  connect(pushButton_quicksetup_geometrystudies,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
248  connect(pushButton_quicksetup_analysisstudies,SIGNAL(clicked()),this,SLOT(quickSetupTriggered()));
249 
250  //Default application font:
252  m_defaultfont_pointsize = m_defaultfont.pointSizeF();
253  if (m_defaultfont_pointsize<0.0)
255  else
257 
258  //Tabs:
259  connect(m_tabmanager,SIGNAL(tabListChanged(QStringList)),this,SLOT(tabListChanged(QStringList)));
260  connect(tabWidget_central,SIGNAL(currentChanged(int)),this,SLOT(updateCentralStackWidget()));
262 
263  //Channels:
264 
265  connect(pushButton_saveAllChannels,SIGNAL(clicked()),this,SLOT(saveAllCurrentChannels()));
266  connect(pushButton_makeEventDisplay,SIGNAL(clicked()),this,SLOT(makeAllChannelsEventDisplay()));
267 
268  connect(pushButton_3D,SIGNAL(clicked()),this,SLOT(launch3DstereoEditor()));
269 
270  connect(pushButton_channelfullscreen,SIGNAL(clicked()),m_tabmanager,SLOT(showCurrentChannelFullScreen()));
271  connect(pushButton_channelinformation,SIGNAL(clicked()),this,SLOT(request_channelInformation()));
272  connect(pushButton_printchannel,SIGNAL(clicked()),this,SLOT(request_printChannel()));
273  connect(pushButton_savesnapshotchannel,SIGNAL(clicked()),this,SLOT(request_saveChannelSnapshot()));
275 
276  //Menu:
277  //Quick start:
278  connect(action_quicklaunch_Tracking_studies,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
279  connect(action_quicklaunch_Calo_studies,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
280  connect(action_quicklaunch_Geometry_studies,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
281  connect(action_quicklaunch_analysisstudies,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
282  connect(action_quicklaunch_Storegate_browser,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
283  connect(action_quicklaunch_3dcocktail,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
284  connect(action_quicklaunch_trackcalo_commis,SIGNAL(triggered(bool)),this,SLOT(quickSetupTriggered()));
285  connect(action_exit_VP1,SIGNAL(triggered(bool)),this,SLOT(close()));
286 
287  //Configuration
288  m_menu_loadConfFile = menuConfiguration->addMenu ( "&Load tab configuration from file" );
289  m_menu_loadConfFile->setStatusTip("Select .vp1 config file to load");
290  connect(m_menu_loadConfFile,SIGNAL(aboutToShow()),this,SLOT(showMenu_loadConfFile()));
291  menuConfiguration->addSeparator();
292  //plugins:
293  m_menu_loadPlugin = menuConfiguration->addMenu ( "&Load plugin" );
294  m_menu_loadPlugin->setStatusTip("Select plugin to load");
295  // m_action_infoAboutLoadedPlugins = menuPlugins->addAction ( "&Info about loaded plugins" );
296  // m_action_infoAboutLoadedPlugins->setStatusTip("Get information about the presently loaded plugins");
297  // m_action_infoAboutLoadedPlugins->setEnabled(false);
298  connect(m_menu_loadPlugin,SIGNAL(aboutToShow()),this,SLOT(showMenu_loadPlugin()));
299  //Style
300  m_menu_changeStyle = menu_Style->addMenu ( "&Style" );
301  QActionGroup * styleGroup = new QActionGroup(this);
302  QAction * laststyleact(0);
303  bool foundplastique=false;
304  QSettings s(m_settingsfile,QSettings::IniFormat);
305  QString defaultstyle=s.value("style/defaultstyle", "Fusion").toString();
306  foreach (QString style, QStyleFactory::keys() ) {
307  QAction * act = m_menu_changeStyle->addAction(style);
308  act->setStatusTip("Change application style to "+style);
309  connect(act,SIGNAL(triggered(bool)),this,SLOT(changeStyleActionTriggered()));
310  act->setCheckable(true);
311  styleGroup->addAction(act);
312  laststyleact=act;
313  if (act->text()==defaultstyle) {
314  act->setChecked(true);
315  QApplication::setStyle(QStyleFactory::create(act->text()));
316  foundplastique=true;
317  }
318  }
319  if (!foundplastique) {
320  laststyleact->setChecked(true);
321  QApplication::setStyle(QStyleFactory::create(laststyleact->text()));
322  }
323  //Fonts:
324  int savedgoal = 0;
325  if (m_defaultfont_pointsize<0.0)
326  savedgoal = s.value("font/pixelsize_diff", 0).toInt();
327  else
328  savedgoal = s.value("font/pointsize_relativepercent", 0).toInt();
329 
330  m_menu_changeFontSize = menu_Style->addMenu ( "&Font size" );
331  QList<int> fontoptions;
332  if (m_defaultfont_pointsize<0.0)
333  fontoptions <<15<<10<<+5<<+3<<+2<<+1<<0<<-1<<-2<<-3<<-5<<-10<<-20<<-30;
334  else
335  fontoptions <<150<<100<<50<<30<<20<<10<<5<<0<<-5<<-10<<-20<<-30<<-50;
336 
337  QActionGroup * fontGroup = new QActionGroup(this);
338  bool foundsavedgoal(false);
339  QAction * normalfontact(0);
340  foreach (int fontopt,fontoptions) {
342  continue;
343  QString text = (fontopt==0?"normal": (fontopt>0?"+":"")+QString::number(fontopt)+(m_defaultfont_pointsize < 0.0? " pixels" : "%"));
344  QAction * act = m_menu_changeFontSize->addAction(text);
345  act->setStatusTip("Change overall font size of application to "+text);
346  act->setData(fontopt);
347  act->setCheckable(true);
348  fontGroup->addAction(act);
349  connect(act,SIGNAL(triggered(bool)),this,SLOT(changeFontSizeActionTriggered()));
350  if (fontopt==0)
351  normalfontact=act;
352  if (savedgoal==fontopt) {
353  act->setChecked(true);
354  changeFontSize(fontopt);
355  foundsavedgoal=true;
356  }
357  }
358  if (!foundsavedgoal) {
359  normalfontact->setChecked(true);
360  }
361 
362  //
363  m_actionSave_current_tabs = menuConfiguration->addAction ( "&Save current tab configuration to file" );
364  m_actionSave_current_tabs->setStatusTip("Save current tab/channel layout to .vp1 config file");
365  menuConfiguration->addSeparator();
366  m_actionAdd_empty_tab = menuConfiguration->addAction ( "&Add empty tab" );
367  m_actionAdd_empty_tab->setStatusTip("Add empty tab to the current tab list");
368  connect(m_actionAdd_empty_tab,SIGNAL(triggered(bool)),this,SLOT(request_addEmptyTab()));
369  connect(m_actionSave_current_tabs,SIGNAL(triggered(bool)),this,SLOT(request_saveasConfig()));
370 
371  //ExpertSettings
372  #ifdef BUILDVP1LIGHT
373  menuConfiguration->addSeparator();
374  m_actionEnableExpertSettings = menuConfiguration->addAction ( "&Settings" );
375  m_actionEnableExpertSettings->setStatusTip("Open additional settings");
376  connect(m_actionEnableExpertSettings, &QAction::triggered, this, &VP1MainWindow::request_expertSettings);
377  #endif
378 
379  //Event navigation:
380  connect(pushButton_nextevent,SIGNAL(clicked()),this,SLOT(goToNextEvent()));
381  #ifdef BUILDVP1LIGHT
382  connect(pushButton_previousevent,SIGNAL(clicked()),this,SLOT(goToPreviousEvent()));
383  connect(pushButton_eventselect,SIGNAL(clicked()),this,SLOT(chooseEvent()));
384  #endif
385 
386  //Listen for external requests:
388  listenOnTcp();
389  // updateTcpIcon();
390  connect(&m_tcpserver,SIGNAL(listenStateChanged(bool)),this,SLOT(updateTcpIcon()));
391  updateTcpIcon();
393  m_blockallmessages=false;
394  m_plugindialog=0;
395 
396  //Cruise:
397  connect(pushButton_cruise,SIGNAL(clicked()),this,SLOT(request_cruisemodechange()));
398  connect(radioButton_cruise_event,SIGNAL(clicked()),this,SLOT(request_cruisemodechange()));
399  connect(radioButton_cruise_tab,SIGNAL(clicked()),this,SLOT(request_cruisemodechange()));
400  connect(radioButton_cruise_both,SIGNAL(clicked()),this,SLOT(request_cruisemodechange()));
401 
402  // Help menu
403  QMenu* menu_help = new QMenu(menubar);
404  menu_help->setObjectName("menu_help");
405  menu_help->setTitle("&Help");
406  menubar->addAction(menu_help->menuAction());
407  m_action_openVP1Site = menu_help->addAction("VP1 &Web Site");
408  m_action_openUsersGuide = menu_help->addAction("VP1 &User's Guide");
409  m_action_openUsersSupport = menu_help->addAction("VP1 User's &Support (in the system browser)");
410  menu_help->addSeparator();
411  m_action_openAbout = menu_help->addAction("&About VP1");
412 
413  QTimer::singleShot(0, this, SLOT(postInitUpdates()));
416 
417  connect(m_action_openUsersGuide,SIGNAL(triggered(bool)),this,SLOT(help_openUserGuide()));
418  connect(m_action_openVP1Site,SIGNAL(triggered(bool)),this,SLOT(help_openVP1WebSite()));
419  connect(m_action_openUsersSupport,SIGNAL(triggered(bool)),this,SLOT(help_openUserSupport()));
420  connect(m_action_openAbout,SIGNAL(triggered(bool)),this,SLOT(help_openAbout()));
421 
422  // FIXME: enabling menubar again. It's part of a quickfix, described here: https://its.cern.ch/jira/browse/ATLASVPONE-120
423  #ifndef BUILDVP1LIGHT
424  menubar->setEnabled(false);
425  #endif
426 }
427 
428 //_________________________________________________________________________________
430 {
431  VP1Msg::messageDebug("VP1MainWindow::launch3DstereoEditor()");
433 
434 }
435 
436 //_________________________________________________________________________________
438  /*
439  * Open the online help from a web url location
440  * with the default system web browser
441  */
442  VP1Msg::messageDebug("VP1MainWindow::help_openUserGuide()");
443  // we use here the default system browser
444  QDesktopServices::openUrl(QUrl("http://atlas-vp1.web.cern.ch/atlas-vp1/doc/"));
445  return;
446 }
447 
448 //_________________________________________________________________________________
450  /*
451  * Open the online page with links to the JIRA issue collectors
452  * with the default system web browser
453  */
454  VP1Msg::messageDebug("VP1MainWindow::help_openUserSupport()");
455  // we use here the default system browser
456  QDesktopServices::openUrl(QUrl("http://atlas-vp1.web.cern.ch/atlas-vp1/vp1_users_support/"));
457  return;
458 }
459 
460 //_________________________________________________________________________________
462  /*
463  * Open the online help from a web url location
464  * with the default system web browser
465  */
466  VP1Msg::messageDebug("VP1MainWindow::help_openVP1WebSite()");
467  // we use here the default system browser
468  QDesktopServices::openUrl(QUrl("http://atlas-vp1.web.cern.ch/atlas-vp1/"));
469  return;
470 }
471 
472 
473 //_________________________________________________________________________________
475  /*
476  * open the online help
477  */
478  VP1Msg::messageDebug("VP1MainWindow::help_openAbout()");
479  // we use here the default system browser
480  QDesktopServices::openUrl(QUrl("https://atlas-vp1.web.cern.ch/atlas-vp1/doc_new/about_vp1/CREDITS.html"));
481  return;
482 }
483 
484 
485 //_________________________________________________________________________________
487 
488  //Make sure that the splitters give maximum space for the tab area.
489 
490  int sum1 = splitter_tabwidget_messagebox->sizes().at(0) + splitter_tabwidget_messagebox->sizes().at(1);
491  QList<int> sizes1; sizes1 << sum1 << 0;
492  splitter_tabwidget_messagebox->setSizes ( sizes1 );
493  int bottom = 1;
494  while (splitter_tabwidget_messagebox->sizes().at(1)==0&&bottom<50000) {
495  QList<int> sizes2; sizes2 << sum1-bottom << bottom;
496  splitter_tabwidget_messagebox->setSizes ( sizes2 );
497  ++bottom;
498  }
499 
500  int sum2 = splitter_leftright->sizes().at(0) + splitter_leftright->sizes().at(1);
501  int left = 300;
502  QList<int> sizes3; sizes3 << left << sum2-left;
503  splitter_leftright->setSizes ( sizes3 );
504  while (splitter_leftright->sizes().at(0)==0&&left<50000) {
505  QList<int> sizes4; sizes4 << left << sum2-left;
506  splitter_leftright->setSizes ( sizes4 );
507  ++left;
508  }
509 
510  int prefwidths = std::max<int>(left,widget_controlsContainer->sizeHint().width());
511  prefwidths = std::max<int>(prefwidths,groupBox_channelcontrols->sizeHint().width());
512  prefwidths = std::max<int>(prefwidths,groupBox_cruise->sizeHint().width());
513  prefwidths = std::max<int>(prefwidths,groupBox_event->sizeHint().width());
514  prefwidths = std::max<int>(prefwidths,stackedWidget_customcontrols->sizeHint().width());
515  widget_controlsContainer->setMaximumWidth(50+prefwidths);
516  // int h1(textBrowser_intro1->viewport()->sizeHint().height());
517  // textBrowser_intro1->setMaximumHeight(h1+2);
518  if (m_availEvents)
519  m_availEvents->init();
521 }
522 
523 //_________________________________________________________________________________
525  progressbar = new QProgressBar();
526  progressbar->setMinimum(0);
527  progressbar->reset();
528  progressbar->setOrientation(Qt::Horizontal);
529  statusBar()->addPermanentWidget(progressbar);
530  m_statusbarlabel = new QLabel();
531  //Turn off ugly box around items in statusbar:
532  statusBar()->setStyleSheet("QStatusBar::item { border-width: 0 }");
533  statusBar()->addPermanentWidget(m_statusbarlabel);
534  progressbar->hide();
535 }
536 
537 //_________________________________________________________________________________
539 {
540  if (m_edEditor) {
541  VP1Msg::messageDebug("deleting the editor");
542  delete m_edEditor;
543  }
544  VP1Msg::messageDebug("deleting the tab manager");
545  delete m_tabmanager;
546  VP1Msg::messageDebug("deleting the channel manager");
547  delete m_channelmanager;
548  VP1Msg::messageDebug("deleting the events");
549  delete m_availEvents;
550 
551  if(m_streamMenuUpdater) {
552  VP1Msg::messageDebug("deleting the streamupdater");
553  m_streamMenuUpdater->quit();
554  m_streamMenuUpdater->deleteLater();
555  }
556 
557  VP1Msg::messageDebug("deleting the mutex");
558  delete m_mutex;
559 
560  VP1Msg::messageDebug("deleting the view");
561 }
562 
563 //_________________________________________________________________________________
565  return m_mustquit;
566 }
567 
568 
569 //_________________________________________________________________________________
571 {
572  bool l = m_tcpserver.isListening();
573  m_statusbarlabel->setPixmap(QIcon(l?":/vp1/icons/icons/network_64x64.png":":/vp1/icons/icons/network_disconnect_64x64.png")
574  .pixmap(progressbar->height(),progressbar->height(),QIcon::Normal,QIcon::On));
575  m_statusbarlabel->setToolTip(l?"Listening on port "+QString::number(m_tcpserver.port())+" for incoming messsages"
576  :"VP1 is presently NOT listening for incoming messages");
577 
578 }
579 
580 //_________________________________________________________________________________
582 {
583  VP1Msg::messageDebug("loadPluginFile()");
584 
586  if (!err.isEmpty()) {
587  QMessageBox::critical(0, "Error - could not load plugin file: "+filename,
588  "Could not load plugin file: "
589  +filename+"\n\nReason: "+err,QMessageBox::Ok,QMessageBox::Ok);
590  VP1Msg::message("Could not load plugin file: "+filename+"\n\nReason: "+err);
591  }
592  //Fixme: Error message here is hardcoded to be the same as in loadPluginFile method!!
593 }
594 
595 //_________________________________________________________________________________
597  bool ok;
598  QString newtabname = QInputDialog::getText( 0, "New Tab Name","New tab name:",
599  QLineEdit::Normal, m_tabmanager->suggestNewTabName("My Tab"), &ok );
600  if (!ok||newtabname.isEmpty())
601  return;
602  m_tabmanager->addNewTab(newtabname);
603 }
604 
605 //_________________________________________________________________________________
606 void VP1MainWindow::tabListChanged(const QStringList& l) {
608  if (l.count()) {
609  m_actionSave_current_tabs->setEnabled(true);
610  groupBox_cruise->setEnabled(true);
611  } else {
612  m_actionSave_current_tabs->setEnabled(false);
613  groupBox_cruise->setEnabled(false);
614  }
615  if (l.count()>1) {
616  radioButton_cruise_tab->setEnabled(true);
617  radioButton_cruise_both->setEnabled(true);
618  } else {
619  if (radioButton_cruise_tab->isChecked()||radioButton_cruise_both->isChecked())
620  radioButton_cruise_event->setChecked(true);
621  radioButton_cruise_tab->setEnabled(false);
622  radioButton_cruise_both->setEnabled(false);
623  }
624 }
625 
626 //_________________________________________________________________________________
627 void VP1MainWindow::addChannelIconsToComboBox(QComboBox* cb, const bool& isbasenames) {
628  int n= cb->count();
629  for (int i = 0; i<n; ++i) {
630  QString icontext = m_channelmanager->getIconLocation(cb->itemText(i), isbasenames);
631  if (!icontext.isEmpty())
632  cb->setItemIcon ( i, QIcon(icontext) );
633  }
634 }
635 
636 //_________________________________________________________________________________
638 {
639  VP1Msg::messageDebug("VP1MainWindow::selectedChannelChanged()");
640 
641  //Controls box:
642  if (cw) {
643  groupBox_channelcontrols->setTitle("Controls: "+cw->unique_name());
644  groupBox_channelcontrols->setEnabled(true);
645  QWidget* controller = m_channelmanager->getController(cw);
646  if (!controller) {
647  stackedWidget_customcontrols->setCurrentWidget(m_dummyemptycontroller);
648  } else {
649  if (stackedWidget_customcontrols->indexOf(controller)==-1)
650  stackedWidget_customcontrols->addWidget(controller);
651  stackedWidget_customcontrols->setCurrentWidget(controller);
652  }
653  } else {
654  groupBox_channelcontrols->setTitle("Controls: no channel selected");
655  groupBox_channelcontrols->setEnabled(false);
656  stackedWidget_customcontrols->setCurrentWidget(m_dummyemptycontroller);
657  }
658 
659  // FIXME: enabling menubar again. It's part of a quickfix, described here: https://its.cern.ch/jira/browse/ATLASVPONE-120
660  menubar->setEnabled(true);
661 
662  // FIXME: enabling menubar again. It's part of a quickfix, described here: https://its.cern.ch/jira/browse/ATLASVPONE-120
663  menubar->setEnabled(true);
664 }
665 
666 //_________________________________________________________________________________
668 
669  QString filename = QFileDialog::getSaveFileName(this, "Select configuration file to save",
671  "VP1 Configuration files (*.vp1)",0,QFileDialog::DontResolveSymlinks);
672  if(filename.isEmpty())
673  return;
674 
675  if (!filename.endsWith(".vp1"))
676  filename += ".vp1";
677 
678  m_tabmanager->saveConfigurationToFile(filename,false/*Since the filedialog already asks*/);
680 }
681 
682 //_________________________________________________________________________________
684 {
685  if (m_currentconfigfile.isEmpty()) {
687  return;
688  }
690 }
691 
692 //_________________________________________________________________________________
694 {
695  QString filename = QFileDialog::getOpenFileName(this, "Select configuration file to load",
697  "VP1 configuration files (*.vp1)",0,QFileDialog::DontResolveSymlinks);
698  if(filename.isEmpty())
699  return;
702 }
703 
704 //_________________________________________________________________________________
706 {
707 #ifdef __APPLE__
708  QString sharedlibsuffix = "dylib";
709 #else
710  QString sharedlibsuffix = "so";
711 #endif
712  qDebug() << "VP1MainWindow::request_loadPlugin()"<<m_currentloadpluginpath;
713 
714  QString filename = QFileDialog::getOpenFileName(this, "Select plugin file to load",
716  "VP1 plugin files (*VP1*."+sharedlibsuffix+")",0,QFileDialog::DontResolveSymlinks);
717  if(filename.isEmpty())
718  return;
719  m_currentloadpluginpath = QFileInfo(filename).dir().absolutePath();
721 }
722 
723 //_________________________________________________________________________________
724 QMap<QString,QString> VP1MainWindow::availableFiles(const QString& extension,
725  const QString& pathvar,//LD_LIBRARY_PATH or DATAPATH
726  const QString& instareasubdir,
727  const QString& extradirenvvar,
728  bool currentdir ) const
729 {
730 
731  qDebug() << "VP1MainWindow::availableFiles()";
732  qDebug() << "extension:" << extension << "pathvar:" << pathvar << "instareasubdir:" << instareasubdir << "extradirenvvar:" << extradirenvvar << "currentdir:" << currentdir;
733 
734 
735  //Add directories from extradirenvvar (e.g. $VP1PLUGINPATH)
736  QStringList vp1pluginpath =
737  extradirenvvar.isEmpty() ?
738  QStringList() :
739  QString(::getenv(extradirenvvar.toStdString().c_str())) .
740 #if QTCORE_VERSION >= 0x050E00
741  split(":",Qt::SkipEmptyParts);
742 #else
743  split(":",QString::SkipEmptyParts);
744 #endif
745  if(VP1Msg::debug()){
746  qDebug() << "extradirenvvar:" << extradirenvvar;
747  qDebug() << "vp1pluginpath:" << vp1pluginpath;
748  }
749 
750  #ifdef BUILDVP1LIGHT
751  //Add dir from Expert Settings
752  if(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH")==""){
753  vp1pluginpath<<QCoreApplication::applicationDirPath()+"/../lib";
754  } else{
755  vp1pluginpath<<VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH");
756  }
757  #endif
758 
759  //Currentdir:
760  if (currentdir) {
761  vp1pluginpath<<QDir::currentPath();
762  if (QDir::currentPath()!=VP1Settings::defaultFileSelectDirectory())
764  }
765 
766  //Add directories from pathvar (looking in subdir instareasubdir):
767  QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
768  VP1Msg::messageDebug("This is the 'pathvar' variable: " + pathvar);
769  QString path = env.value(pathvar);
770  VP1Msg::messageDebug("Add directories from 'pathvar' variable: " + path);
771 
772  if (!path.isEmpty()) {
773 #if QTCORE_VERSION >= 0x050E00
774  VP1Msg::messageDebug("We're using Qt5...");
775  QStringList tmp = path.split(":",Qt::SkipEmptyParts);//This 'tmp' is for SLC3 compilation.
776 #else
777  VP1Msg::messageDebug("We're using Qt older than 5...");
778  QStringList tmp = path.split(":",QString::SkipEmptyParts);//This 'tmp' is for SLC3 compilation.
779 #endif
780  for (const QString& dir : tmp) {
781  vp1pluginpath << ( instareasubdir.isEmpty() ? dir : dir+QDir::separator()+instareasubdir );
782  }
783  }
784 
785  // Remove duplicates
786  int nDuplicatesRemoved = vp1pluginpath.removeDuplicates();
787  VP1Msg::messageDebug("Removed '" + QString::number(nDuplicatesRemoved) + "' duplicate paths.");
788 
789  //Remove all nonexisting directories:
790  unsigned idx=0;
791  for (const auto& plugindir : vp1pluginpath) {
792  VP1Msg::messageDebug("plugindir: '" + plugindir + "'");
793  QFileInfo fi(plugindir);
794  if (!fi.exists()||!fi.isDir()) {
795  VP1Msg::messageDebug("list: " + vp1pluginpath.join(";"));
796  if (vp1pluginpath.contains(plugindir)) {
797  vp1pluginpath.removeAt(idx); // Note: do not use 'removeAll(string)' it has issues when run within loops
798  VP1Msg::messageDebug("Removed non-valid path: '" + plugindir + "'");
799  }
800  else {
801  VP1Msg::messageDebug("plugindir not present; perhaps, it has been removed already. Skipping it...");
802  }
803  }
804  ++idx;
805  }
806 
807  //Find all files with required extension in the directories (in case of duplicates - the ones appearing first are used):
808  QMap<QString,QString> plugins2fullpath;
809  for (const QString& plugindir : vp1pluginpath) {
810  QStringList plugins = QDir(plugindir).entryList((QStringList()<<("*"+extension)),QDir::CaseSensitive | QDir::Files | QDir::Readable,QDir::Name);
811  for (QString plugin : plugins) {
812  plugin = QFileInfo(plugin).fileName();
813  if (!plugins2fullpath.contains(plugin)) {
814  QString fullpath = plugindir+QDir::separator()+plugin;
815  plugins2fullpath[plugin]=fullpath;
816  }
817  }
818  }
819  return plugins2fullpath;
820 }
821 
822 //_________________________________________________________________________________
823 QMap<QString,QString> VP1MainWindow::availablePluginFiles() const
824 {
825 VP1Msg::messageDebug("VP1MainWindow::availablePluginFiles()");
826 
827 #ifdef __APPLE__
828  QString sharedlibsuffix = "dylib";
829 #else
830  QString sharedlibsuffix = "so";
831 #endif
832 
833  return availableFiles( "."+sharedlibsuffix, "LD_LIBRARY_PATH", "vp1plugins", "VP1PLUGINPATH" );
834 
835 }
836 
837 //_________________________________________________________________________________
839  if (!m_plugindialog)
840  return;
841 
842  int res = m_plugindialog->result();
843  QString filename = m_plugindialog->unloadfile();
844  disconnect(m_plugindialog,SIGNAL(finished(int)),this,SLOT(pluginDialogClosed()));
845  m_plugindialog->deleteLater();
846  m_plugindialog = 0;
847 
848  if (res!=QDialog::Accepted||filename.isEmpty())
849  return;
850 
851  QStringList bns = m_channelmanager->channelsInPluginFile(filename);
852 
853  for (const QString& bn : bns) {
854  while(m_channelmanager->basename2UniqueNames(bn).count()>0)
856  }
857 
859  QTimer::singleShot(0, this, SLOT(unloadPlugin_continue()));
860 
861 }
862 
863 //_________________________________________________________________________________
865 {
866  for (const QString& filename : m_currentunloadpluginfiles) {
867  bool success = m_channelmanager->unloadPluginFile(filename);
868  if (!success)
869  QMessageBox::critical(0, "Error - problems unloading plugin file: "+filename,
870  "Problems encountered while attempting to unload plugin file: "+filename,QMessageBox::Ok,QMessageBox::Ok);
871  }
873 }
874 
875 //_________________________________________________________________________________
877 {
878  return ! (m_betweenevents || (m_availEvents&&m_availEvents->freshEvents().isEmpty()));
879 }
880 
881 
882 //_________________________________________________________________________________
884  m_betweenevents=true;
885  if (m_availEvents) {
886  QList<VP1EventFile> evts = m_availEvents->freshEvents();
887  if (evts.empty()) {
888  addToMessageBox("ERROR: Going to next event, but one is not available!");
890  } else {
891  m_scheduler->setNextRequestedEventFile(evts.front().fileName());
892  }
893  }
895 }
896 
897 //_________________________________________________________________________________
899  #if defined BUILDVP1LIGHT
900  std::cout << "goToNextEvent: \n"
901  << "m_scheduler->getEvtNr()+2: " << m_scheduler->getEvtNr()+2
902  << "\nm_scheduler->getTotEvtNr(): " << m_scheduler->getTotEvtNr() << std::endl;
903  if ( m_scheduler->getEvtNr()+2 < m_scheduler->getTotEvtNr() ) {
904  std::cout << "First case" << std::endl;
905  m_scheduler->setEvtNr(m_scheduler->getEvtNr()+1);
906  nextEvent();
907  qApp->quit();
908  }
909  else if( m_scheduler->getEvtNr()+2 == m_scheduler->getTotEvtNr() ) {
910  std::cout << "Second case" << std::endl;
911  m_scheduler->setEvtNr(m_scheduler->getEvtNr()+1);
912  nextEvent();
913  qApp->quit();
914  }
915  #else
916  nextEvent();
917  qApp->quit();
918  #endif
919 }
920 
921 #if defined BUILDVP1LIGHT
922 //_________________________________________________________________________________
923 void VP1MainWindow::goToPreviousEvent() {
924  if ( m_scheduler->getEvtNr()-1 > 0 ) {
925  m_scheduler->setEvtNr(m_scheduler->getEvtNr()-1);
926  nextEvent();
927  qApp->quit();
928  }
929  else if( m_scheduler->getEvtNr()-1 == 0 ) {
930  m_scheduler->setEvtNr(m_scheduler->getEvtNr()-1);
931  nextEvent();
932  qApp->quit();
933  }
934 }
935 #endif
936 
937 //_________________________________________________________________________________
938 void VP1MainWindow::closeEvent(QCloseEvent * event)
939 {
940  VP1Msg::messageDebug("VP1MainWindow::closeEvent()");
941 
942  bool checkEnableAskOnClose;
943  #if defined BUILDVP1LIGHT
944  checkEnableAskOnClose = VP1QtUtils::expertSettingIsSet("general","ExpertSettings/VP1_ENABLE_ASK_ON_CLOSE");
945  #else
946  checkEnableAskOnClose = VP1QtUtils::environmentVariableIsOn("VP1_ENABLE_ASK_ON_CLOSE");
947  #endif
948 
949  if (checkEnableAskOnClose) {
950  int ret = QMessageBox::warning(this,
951  "Close VP1?",
952  "You are about to close VP1 and end the job.\nProceed?",
953  QMessageBox::Ok| QMessageBox::Cancel,
954  QMessageBox::Cancel );
955  if (ret!=QMessageBox::Ok) {
956  event->ignore();
957  return;
958  }
959  m_userRequestedExit = true;
960  }
961 
962  hide();
963 
964  VP1Msg::messageDebug("calling tabmanager->setSelectedDockWidget(0)...");
966  VP1Msg::messageDebug("tabmanager->setSelectedDockWidget(0) called.");
967 
968  m_mustquit=true; // this will inform VP1Alg that we want to quit VP1 (then we'll quit the Athena algorithm)
969  VP1Msg::messageDebug("calling qApp->quit()...");
970  qApp->quit();
971 }
972 
973 //_________________________________________________________________________________
974 void VP1MainWindow::setRunEvtNumber(const int& r, const unsigned long long& e, const unsigned& triggerType, const unsigned& time, const bool& printmessage ) {
975 
977  const bool sameasold(m_runnumber==r&&m_eventnumber==e);
978 
979  m_runnumber=r;
982 
983  m_betweenevents = false;
984  if (m_availEvents)
986 
988  channel->setRunEvtNumber(r,e);
989  channel->setEvtTimestamp(time);
990  }
991 
992  if(printmessage) {
993  qulonglong evNumber = m_eventnumber;
994  QString evtstr = "run# "+QString::number(m_runnumber)+", event# "+QString::number(evNumber)+(sameasold?" (reused)":"");
995  QString trighex = triggerType > 0 ? "0x"+QString::number(triggerType, 16).toUpper().rightJustified(sizeof(triggerType),'0') : "";
996  QString expandedevtstr = evtstr
997  + QString(trighex.isEmpty()?QString(""):", triggerType: "+trighex)
998  + QString(time>0 ? ", time: "+QDateTime::fromTime_t(time).toString(Qt::ISODate).replace('T',' ') : "")
999  + QString(m_currentStream.isEmpty()?"":", "+m_currentStream);
1000 
1001  #ifdef BUILDVP1LIGHT
1002  setWindowTitle("VP1Light ["+expandedevtstr+"]");
1003  #else
1004  setWindowTitle("VP1 (Virtual Point 1) ["+expandedevtstr+"]");
1005  #endif // BUILDVP1LIGHT
1006 
1007  groupBox_event->setTitle("Event [loaded]");
1008  label_run_event->setText("["+evtstr+"]");
1009 
1010  addToMessageBox("New event: "+expandedevtstr,"color:#ff0000");
1011 
1012  }
1014 }
1015 
1016 //_________________________________________________________________________________
1017 void VP1MainWindow::addToMessageBox( const QString& m, const QString& extrastyleopts,
1018  const QString& title, const QString& titleextrastyleopts )
1019 {
1020 
1021  if (title.isEmpty())
1022  std::cout<<VP1Msg::prefix_msg()<<": "<<m.toStdString()<<std::endl;
1023  else
1024  std::cout<<VP1Msg::prefix_msg()<<": "<<title.toStdString() << ": " <<m.toStdString()<<std::endl;
1025 
1026 
1027  QString titlepart = ( title.isEmpty() ? "" : ( titleextrastyleopts.isEmpty() ? title
1028  : "<span style=\"font-style:italic;"+titleextrastyleopts+";\">["+title+"]</span> "));
1029 
1030  textBrowser_channelmessages->append(titlepart
1031  + ( extrastyleopts.isEmpty() ? m
1032  : "<span style=\"font-style:italic;"+extrastyleopts+";\">"+m+"</span>"));
1033  textBrowser_channelmessages->verticalScrollBar()->setSliderPosition(textBrowser_channelmessages->verticalScrollBar()->maximum());
1034 }
1035 
1036 //_________________________________________________________________________________
1038 {
1039  IVP1System*sys = static_cast<IVP1System*>(sender());
1040  if (!sys) {
1041  addToMessageBox("VP1MainWindow::systemAddToMessageBox Error: Only prints system messages!");
1042  return;
1043  }
1044  if (!sys->channel()) {
1045  addToMessageBox("VP1MainWindow::systemAddToMessageBox Error: System does not know its channel!");
1046  return;
1047  }
1048  addToMessageBox( m, "color:#000000",sys->channel()->unique_name()+"/"+sys->name(),"color:#0000ff" );
1049 }
1050 
1051 //_________________________________________________________________________________
1053 {
1054  IVP1ChannelWidget*cw = static_cast<IVP1ChannelWidget*>(sender());
1055  if (!cw) {
1056  addToMessageBox("VP1MainWindow::channelAddToMessageBox Error: Only prints channelwidget messages!");
1057  return;
1058  }
1059  addToMessageBox(m,"color:#000000", cw->unique_name(),"color:#0000ff");
1060 }
1061 
1062 //_________________________________________________________________________________
1064 {
1065  addToMessageBox(m);
1066 }
1067 
1068 //_________________________________________________________________________________
1071  return;
1072 
1073  QString out = "Information about channel: "+m_tabmanager->selectedChannelWidget()->name() + "\n\n";
1074  out += "Contact: "+m_tabmanager->selectedChannelWidget()->contact_info()+"\n";
1075  out += "Information: "+m_tabmanager->selectedChannelWidget()->information()+"\n";
1076  out += "Systems:\n\n";
1078  for (itsys = m_tabmanager->selectedChannelWidget()->systems().begin();itsys!=itsysE;++itsys) {
1079  out += " ==> System "+(*itsys)->name()+"\n";
1080  out += " Contact: "+(*itsys)->contact_info()+"\n";
1081  out += " Information: "+(*itsys)->information()+"\n";
1082  out += "\n";
1083  }
1084 
1085  QMessageBox::information(0, "Information about channel: "+m_tabmanager->selectedChannelWidget()->name(),Qt::convertFromPlainText(out),QMessageBox::Ok,QMessageBox::Ok);
1086 }
1087 
1088 //_________________________________________________________________________________
1090 {
1091  VP1Msg::messageVerbose("VP1MainWindow::makeAllChannelsEventDisplay()");
1092 
1093  QList<QPixmap> list;
1094  QStringList listNames;
1095  QList<unsigned long long> listRunEventNumberTimestamp;
1096 
1097  getAllChannelsIntoSnapshots(list, listNames);
1098 
1099  listRunEventNumberTimestamp << m_runnumber;
1100  listRunEventNumberTimestamp << m_eventnumber;
1101  listRunEventNumberTimestamp << m_timestamp;
1102 
1103  // create a new editor window
1104  m_edEditor = new VP1EventDisplayEditor(this, listRunEventNumberTimestamp);
1105 
1106  m_edEditor->addPixmapList(list, listNames);
1107 
1108  // pass the lists of all tabs and their names to the editor
1109  m_edEditor->setTabsList( listNames);
1110 
1111  m_edEditor->show();
1112 
1113 }
1114 
1115 
1116 
1117 
1118 //_________________________________________________________________________________
1119 void VP1MainWindow::getAllChannelsIntoSnapshots(QList<QPixmap>& list, QStringList& listNames)
1120 {
1121  VP1Msg::messageDebug("VP1MainWindow::getAllChannelsIntoSnapshots()");
1122 
1123 // int nTabs = m_tabmanager->nTabs();
1124  QList<IVP1ChannelWidget*> allTabs = m_tabmanager->allChannels();
1125 
1126  if (allTabs.isEmpty()) {
1127  VP1Msg::message("WARNING - No tabs to save.");
1128  return;
1129  }
1130 
1131  int nT = 0;
1132 
1133  // loop over all tabs/channels
1134  for(IVP1ChannelWidget* widg : allTabs) {
1135 
1136  // increase tab number
1137  ++nT;
1138 
1139  // get channel name (e.g. Geometry, 3DCocktail)
1140  QString channelname = m_tabmanager->channelToTab(widg);
1141  channelname.replace(' ','_');
1142  VP1Msg::messageDebug("tab: " + channelname);
1143 
1144  // DEBUG MSGS
1145  // get channel info, only for debug
1146  //QString info = widg->information();
1147  //VP1Msg::messageDebug("channel info: " + info);
1148 
1149 
1150  QPixmap snap = getSingleChannelCustomSnapshot(widg);
1151 
1152  list << snap;
1153  listNames << channelname;
1154 
1155  }
1156 
1157  VP1Msg::messageVerbose(QString::number(nT)+" tabs/channels saved in the QList.");
1158 
1159 }
1160 
1161 //_________________________________________________________________________________
1163 {
1164  VP1Msg::messageDebug("VP1MainWindow::getSingleChannelCustomSnapshot()");
1165 
1166  std::cout << "tab: " << tab << std::endl;
1167 
1168  // save the anti-aliasing status, set by the user
1169  bool antialias_original = tab->isAntiAliasing();
1170 
1171  // for the final event display images we want the anti-aliasing turned ON,
1172  tab->setAntiAliasing(true);
1173 
1174  // get the snapshot
1175  QPixmap snap;
1176  if (width)
1177  snap = tab->getSnapshot(true, width); // 'true' means 'transparent background'
1178  else
1179  snap = tab->getSnapshot(true); // 'true' means 'transparent background'
1180 
1181  if (snap.isNull()) {
1182  VP1Msg::message("ERROR! - No snapshot produced!");
1183  return QPixmap();
1184  }
1185 
1186  // go back to the original anti-aliasing status, set by the user for the tab
1187  tab->setAntiAliasing(antialias_original);
1188 
1189  return snap;
1190 }
1191 //_________________________________________________________________________________
1192 QPixmap VP1MainWindow::getSingleChannelCustomSnapshot(const QString& tabName, int width)
1193 {
1194  QList<IVP1ChannelWidget*> allTabs = m_tabmanager->allChannels();
1195 
1196  if (allTabs.isEmpty()) {
1197  VP1Msg::message("WARNING - No tabs to get snapshots from.");
1198  }
1199 
1200  // loop over all tabs/channels
1201  for(IVP1ChannelWidget* widg : allTabs) {
1202 
1203  // get channel name (e.g. Geometry, 3DCocktail)
1204  QString channelname = m_tabmanager->channelToTab(widg);
1205  channelname.replace(' ','_');
1206 
1207  if (channelname == tabName) {
1208  VP1Msg::messageDebug("found tab: " + channelname);
1209 
1210  if (width)
1211  return getSingleChannelCustomSnapshot(widg, width);
1212  else
1213  return getSingleChannelCustomSnapshot(widg);
1214 
1215  }
1216  }
1217  return QPixmap();
1218 }
1219 
1220 //_________________________________________________________________________________
1222 {
1223  VP1Msg::messageDebug("VP1MainWindow::saveAllCurrentChannels()");
1224 
1225  int nTabs = m_tabmanager->nTabs();
1226 
1227  VP1Msg::messageDebug("# of tabs: " + QString::number(nTabs));
1228 
1229  QList<IVP1ChannelWidget*> allTabs = m_tabmanager->allChannels();
1230 
1231  if (allTabs.isEmpty()) {
1232  VP1Msg::message("WARNING - No tabs to save.");
1233  return;
1234  }
1235 
1236 
1237 // QString guess;
1238 // QString chnlname = m_tabmanager->selectedChannelWidget()->name().toLower();
1239 // chnlname.replace(' ','_');
1240 
1241  QString base=m_currentsaveimagepath+QDir::separator()+"vp1"
1243  + QString(m_timestamp>0 ? "_"+QDateTime::fromTime_t(m_timestamp).toString(Qt::ISODate).replace(':','-') : "");
1244 
1245 
1246  // check for existing files
1247  int i(2);
1248  while (QFile::exists(base+".png")) {
1249  base = base+"_"+QString::number(i++);
1250  }
1251 
1252  // let the user choose the base filename
1253  QString filename = QFileDialog::getSaveFileName(0, "Select target image file", base,
1254  "Image (*.png *.bmp)",
1255  0,QFileDialog::DontResolveSymlinks);
1256  if(filename.isEmpty()) {
1257  VP1Msg::message("WARNING - No filename selected.");
1258  return;
1259  }
1260 
1261  m_currentsaveimagepath = QFileInfo(filename).dir().absolutePath ();
1262 
1263 
1264  QStringList tab_save_files;
1265 
1266  int nT = 0;
1267  for(IVP1ChannelWidget* widg : allTabs) {
1268 
1269  // increase tab number
1270  ++nT;
1271 
1272  // get channel name (e.g. Geometry, 3DCocktail)
1273  QString channelname = widg->name().toLower();
1274  channelname.replace(' ','_');
1275  VP1Msg::messageDebug("tab: " + channelname);
1276 
1277 // // get channel info, only for debug
1278 // QString info = widg->information();
1279 // VP1Msg::messageDebug("channel info: " + info);
1280 
1281  QPixmap snap = widg->getSnapshot();
1282  if (snap.isNull()) {
1283  VP1Msg::message("ERROR! - No snapshot produced!");
1284  return;
1285  }
1286 
1287  QString tabfilename = filename + "_" + QString::number(nT) + "_" + channelname + ".png";
1288 
1289  if (!(tabfilename.endsWith(".png",Qt::CaseInsensitive)||tabfilename.endsWith(".bmp",Qt::CaseInsensitive)))
1290  tabfilename += ".png";
1291 
1292 
1293  snap.save(tabfilename);
1294 
1295  tab_save_files << tabfilename;
1296  }
1297 
1298  VP1Msg::message("Tabs saved as: " + tab_save_files.join(" - "));
1299 
1300 
1301  QMessageBox::information(this, tr("Snapshots saved."),
1302  "All tabs have been saved as snapshots in the following files:\n\n"+tab_save_files.join("\n"),
1303  QMessageBox::Ok,
1304  QMessageBox::Ok);
1305 
1306 
1307 // // TODO: test to create a multilayered PSD or TIFF file
1308 // // but doesn't work with the ImageMagick version shipped with SLC5...
1309 // // So I give it up now...
1310 // QProcess *proc = new QProcess();
1311 // QString program = "convert";
1312 // QStringList arguments;
1313 // arguments = tab_save_files;
1314 // arguments << " " + m_currentsaveimagepath + QDir::separator() + "out.psd";
1315 // VP1Msg::messageDebug("running: " + program + " " + arguments.join(" "));
1316 //
1317 // // start the process
1318 // proc->start(program, arguments );
1319 //
1320 // if (!proc->waitForStarted())
1321 // return;
1322 //
1323 // if (!proc->waitForFinished())
1324 // return;
1325 
1326 }
1327 
1328 //_________________________________________________________________________________
1329 /*
1330  * save a snaphot of the currently selected tab.
1331  *
1332  * nsnap is an optional parameter: it's an extra label being added
1333  * to the output filename.
1334  */
1336 {
1337 
1338  VP1Msg::messageDebug("VP1MainWindow::request_saveChannelSnapshot()");
1339 
1341  return QString();
1342  }
1343 
1344  QString guess;
1345  QString chnlname = m_tabmanager->selectedChannelWidget()->name().toLower();
1346  chnlname.replace(' ','_');
1347 
1348  QString base=m_currentsaveimagepath+QDir::separator()+"vp1_"+chnlname
1350  + QString(m_timestamp>0 ? "_"+QDateTime::fromTime_t(m_timestamp).toString(Qt::ISODate).replace(':','-') : "");
1351 
1352 
1353  // check for existing files
1354  guess=base;
1355  int i(2);
1356  while (QFile::exists(guess+".png")) {
1357  guess=base+"_"+QString::number(i++);
1358  }
1359  guess+=".png";
1360 
1361 
1362  // adding the extra label xLabel, if provided
1363  if (!xLabel.isEmpty()) {
1364  guess += "_" + xLabel;
1365  }
1366 
1367 
1368  QString filename = QFileDialog::getSaveFileName(0, "Select target image file", guess,
1369  "Image (*.png *.bmp)",
1370  0,QFileDialog::DontResolveSymlinks);
1371  if(filename.isEmpty())
1372  return QString();
1373 
1374  m_currentsaveimagepath = QFileInfo(filename).dir().absolutePath ();
1375 
1376  if (!(filename.endsWith(".png",Qt::CaseInsensitive)||filename.endsWith(".bmp",Qt::CaseInsensitive)))
1377  filename += ".png";
1378 
1379  VP1Msg::messageVerbose("calling snapshot");
1380  QPixmap pm = m_tabmanager->selectedChannelWidget()->getSnapshot();
1381 
1382  if (pm.isNull())
1383  return QString();
1384 
1385  pm.save(filename);
1386  return filename;
1387 }
1388 
1389 //_________________________________________________________________________________
1392  return;
1393 
1394  //The following will paint the widget onto a paper and bring up the print dialog:
1395  QPrinter printer;
1396  QPrintDialog dialog(&printer, this);
1397  if (dialog.exec() == QDialog::Accepted) {
1398  QPixmap pm = m_tabmanager->selectedChannelWidget()->getSnapshot();
1399  if (pm.isNull())
1400  return;
1401  QPainter painter;
1402  painter.begin(&printer);
1403  painter.drawPixmap(0,0,pm);
1404  painter.end();
1405  }
1406 }
1407 
1408 
1409 //_________________________________________________________________________________
1412 }
1413 
1414 //_________________________________________________________________________________
1416 {
1417  VP1Msg::messageDebug("VP1MainWindow::replaceConfigurationFile() : " + file);
1420 }
1421 
1422 //_________________________________________________________________________________
1424 {
1425  QString err;
1426  if (!m_tcpserver.listen(err)) {
1427  qDebug("%s", err.toStdString().c_str());
1428  }
1429 }
1430 
1431 
1432 //_________________________________________________________________________________
1434 {
1436  if (!m_requestqueue.empty())
1437  QTimer::singleShot(0, this, SLOT(processEnqueuedRequests()));
1438 }
1439 
1440 
1441 //_________________________________________________________________________________
1443 {
1444  if (!m_requestqueue.empty())
1446 }
1447 
1448 //_________________________________________________________________________________
1450 {
1451  if (m_blockallmessages)
1452  return;
1453  if (m_messages_blockedsenders.contains(request.sender()))
1454  return;
1455  if (m_messages_blockedexactmessages.contains(request))
1456  return;
1458  //Fixme: store TIME of incoming request (to show the user).
1459  if (m_requestqueue.count()<999) {
1460  m_requestqueue.enqueue(request);
1462  }
1463  return;
1464  }
1469  connect(md,SIGNAL(finished(int)),this,SLOT(finishedIncomingDialog()));
1471  md->show();
1472 }
1473 
1474 //_________________________________________________________________________________
1476 {
1477  if (pushButton_cruise->isChecked()) {
1478  if (radioButton_cruise_event->isChecked()) {
1480  groupBox_cruise->setTitle("Cruise Mode [event]");
1481  } else if (radioButton_cruise_tab->isChecked()) {
1483  groupBox_cruise->setTitle("Cruise Mode [tab]");
1484  } else if (radioButton_cruise_both->isChecked()) {
1486  groupBox_cruise->setTitle("Cruise Mode [event && tab]");
1487  } else { assert(0); }
1488  } else {
1490  groupBox_cruise->setTitle("Cruise Mode [off]");
1491  }
1492 }
1493 
1494 //_________________________________________________________________________________
1496 {
1497  m_menu_loadPlugin->clear();
1498 
1499  QMap<QString,QString> plugins2fullpath = availablePluginFiles();
1500 
1501  if (plugins2fullpath.empty()) {
1502  m_menu_loadPlugin->addAction("No plugins found")->setEnabled(false);
1503  return;
1504  }
1505 
1506  QStringList pluglist(plugins2fullpath.keys());
1507  pluglist.sort();
1508 
1509  QStringList currentpluginfiles = m_channelmanager->currentPluginFiles();
1510  for(const QString& plug : pluglist) {
1511  QAction * act = m_menu_loadPlugin->addAction(plug);
1512  assert(plugins2fullpath.contains(plug));
1513  QString fullpath = plugins2fullpath[plug];
1514  if (currentpluginfiles.contains(fullpath)) {
1515  act->setEnabled(false);
1516  } else {
1517  act->setData(fullpath);
1518  act->setStatusTip(fullpath);
1519  connect(act,SIGNAL(triggered(bool)),this,SLOT(showMenu_loadPluginItemSelected()));
1520  }
1521  }
1522 
1523  m_menu_loadPlugin->addSeparator();
1524  QAction * act_browse = m_menu_loadPlugin->addAction("&Browse...");
1525  act_browse->setStatusTip("Browse filesystem for VP1 plugin files");
1526  connect(act_browse,SIGNAL(triggered(bool)),this,SLOT(request_loadPlugin()));
1527 
1528 }
1529 
1530 //_________________________________________________________________________________
1532 {
1533  QAction * act = static_cast<QAction*>(sender());
1534  assert(act);
1535  if (!act)
1536  return;
1537  loadPluginFile(act->data().toString());
1538 }
1539 
1540 
1541 //_________________________________________________________________________________
1543 {
1544  m_menu_loadConfFile->clear();
1545 
1546  QMap<QString,QString> conffile2fullpath = availableFiles( ".vp1", "DATAPATH", "", "VP1CONFIGFILEPATH", true );
1547 
1548  #ifndef BUILDVP1LIGHT
1549  if (conffile2fullpath.empty()) {
1550  m_menu_loadConfFile->addAction("No .vp1 config files found")->setEnabled(false);
1551  return;
1552  }
1553 
1554  QStringList filelist(conffile2fullpath.keys());
1555  filelist.sort();
1556 
1557  for(const QString& file : filelist) {
1558  QAction * act = m_menu_loadConfFile->addAction(file);
1559  assert(conffile2fullpath.contains(file));
1560  QString fullpath = conffile2fullpath[file];
1561  act->setData(fullpath);
1562  act->setStatusTip(fullpath);
1563  connect(act,SIGNAL(triggered(bool)),this,SLOT(showMenu_loadConfFileItemSelected()));
1564  }
1565  #endif
1566 
1567  m_menu_loadConfFile->addSeparator();
1568  QAction * act_browse = m_menu_loadConfFile->addAction("&Browse...");
1569  act_browse->setStatusTip("Browse filesystem for .vp1 config file");
1570  connect(act_browse,SIGNAL(triggered(bool)),this,SLOT(request_loadConfig()));
1571 
1572 }
1573 
1574 
1575 //_________________________________________________________________________________
1577 {
1578  QAction * act = static_cast<QAction*>(sender());
1579  assert(act);
1580  if (!act)
1581  return;
1582  loadConfigurationFromFile(act->data().toString());
1583 }
1584 
1585 //_________________________________________________________________________________
1587 {
1588  QAction * act = static_cast<QAction*>(sender());
1589  assert(act);
1590  if (!act)
1591  return;
1592  assert(QStyleFactory::keys().contains(act->text()));
1593  if (!QStyleFactory::keys().contains(act->text()))
1594  return;
1595  QApplication::setStyle(QStyleFactory::create(act->text()));
1596  QSettings s(m_settingsfile,QSettings::IniFormat);
1597  s.setValue("style/defaultstyle",act->text());
1598 
1599 }
1600 
1601 //_________________________________________________________________________________
1603 {
1604  QAction * act = static_cast<QAction*>(sender());
1605  assert(act);
1606  if (!act)
1607  return;
1608  bool ok;
1609  int goal = act->data().toInt(&ok);
1610  assert(ok);
1611  if (!ok)
1612  return;
1613  changeFontSize(goal);
1614 }
1615 
1616 //_________________________________________________________________________________
1618 {
1619  QFont newfont = m_defaultfont;
1620  QSettings s(m_settingsfile,QSettings::IniFormat);
1621  if (m_defaultfont_pointsize<0.0) {
1622  //pixels
1623  assert(m_defaultfont_pixelsize+goal>0);
1624  if (m_defaultfont_pixelsize+goal<=0)
1625  return;
1626  if (m_defaultfont_pixelsize+goal>200)
1627  return;
1628  newfont.setPixelSize(m_defaultfont_pixelsize+goal);
1629  s.setValue("font/pixelsize_diff",goal);
1630  } else {
1631  //pointsize
1632  double fact = (goal+100.0)/100.0;
1633  if (fact<0.01||fact>50)
1634  return;
1635  double newpointsize=m_defaultfont_pointsize*fact;
1636  if (newpointsize<0)
1637  return;
1638  newfont.setPointSizeF(newpointsize);
1639  s.setValue("font/pointsize_relativepercent",goal);
1640  }
1641  QApplication::setFont(newfont);
1642 }
1643 
1644 
1645 //_________________________________________________________________________________
1647 {
1648  QWidget * targetpage = tabWidget_central->count() ? page_tabwidget : page_instructions;
1649  if (stackedWidget_central->currentWidget() != targetpage)
1650  stackedWidget_central->setCurrentWidget(targetpage);
1651 }
1652 
1653 //_________________________________________________________________________________
1655 {
1656  VP1Msg::messageVerbose("VP1MainWindow::quickSetupTriggered()");
1657 
1658  QSettings settings("ATLAS", "VP1Light");
1659 
1660  QString plugfile, channelname, tabname;
1661 
1662  if (sender()==pushButton_quicksetup_geometrystudies||sender()==action_quicklaunch_Geometry_studies) {
1663 
1664  //Open geometry database selection dialog for VP1Light
1665 #ifdef BUILDVP1LIGHT
1666  if(settings.value("db/dbByEnv").toString().isEmpty()){
1667  VP1GeoDBSelection dbSelection;
1668  dbSelection.exec();
1669  if(!dbSelection.result())
1670  return;
1671  }
1672 #endif // BUILDVP1LIGHT
1673 
1674  plugfile="libVP1GeometryPlugin.so";
1675  channelname="Geometry";
1676  tabname = "Geometry";
1677  } else if (sender()==pushButton_quicksetup_trackingstudies||sender()==action_quicklaunch_Tracking_studies) {
1678  plugfile="libVP1TrackPlugin.so";
1679  channelname="Tracking";
1680  tabname = "Tracking";
1681  } else if (sender()==pushButton_quicksetup_calostudies||sender()==action_quicklaunch_Calo_studies) {
1682  plugfile="libVP1CaloPlugin.so";
1683  channelname="Calo Cells";
1684  tabname = "Calorimeter";
1685  } else if (sender()==action_quicklaunch_Storegate_browser) {
1686  plugfile="libVP1BanksPlugin.so";
1687  channelname="Banks";
1688  tabname = "StoreGate";
1689  } else if (sender()==pushButton_quicksetup_3dcocktail||sender()==action_quicklaunch_3dcocktail) {
1690 #ifndef BUILDVP1LIGHT
1691  plugfile="libVP13DCocktailPlugin.so";
1692  channelname="3DCocktail";
1693  tabname = "3D Cocktail";
1694 #else
1695  //Open Geometry DB and AOD file selection dialog for VP1Light
1696  if(settings.value("aod/aodByEnv").toString().isEmpty()){
1697  VP1AODSelection aodSelection;
1698  aodSelection.exec();
1699  if(!aodSelection.result())
1700  return;
1701  }
1702  if(settings.value("db/dbByEnv").toString().isEmpty()){
1703  VP1GeoDBSelection dbSelection;
1704  dbSelection.exec();
1705  if(!dbSelection.result())
1706  return;
1707  }
1708  m_scheduler->loadEvent();
1709 
1710  pushButton_eventselect->setEnabled(true);
1711  plugfile="libVP1LightPlugin.so";
1712  channelname="VP1Light";
1713  tabname = "Geometry/AOD";
1714 #endif // BUILDVP1LIGHT
1715  } else if (sender()==action_quicklaunch_trackcalo_commis) {
1716  plugfile="libVP13DCocktailPlugin.so";
1717  channelname="TrackCalo";
1718  tabname = "Track/Calo";
1719  } else if (sender()==pushButton_quicksetup_analysisstudies||sender()==action_quicklaunch_analysisstudies) {
1720 
1721  //Open AOD file selection dialog for VP1Light
1722 #ifdef BUILDVP1LIGHT
1723  if(settings.value("aod/aodByEnv").toString().isEmpty()){
1724  VP1AODSelection aodSelection;
1725  aodSelection.exec();
1726  if(!aodSelection.result())
1727  return;
1728  }
1729  m_scheduler->loadEvent();
1730  pushButton_eventselect->setEnabled(true);
1731 #endif // BUILDVP1LIGHT
1732 
1733  plugfile="libVP1AODPlugin.so";
1734  channelname="AOD";
1735  tabname = "Analysis";
1736  } else {
1737  addToMessageBox("quickSetupTriggered() Error: Unknown sender");
1738  return;
1739  }
1740 
1741 #ifdef __APPLE__
1742  if (plugfile.endsWith(".so"))
1743  plugfile = plugfile.left(plugfile.count()-3)+".dylib";
1744 #endif
1745 
1746 
1747  //Check that the plugin is available:
1748  QMap<QString,QString> plugins2fullpath = availablePluginFiles();
1749  if(VP1Msg::debug()){
1750  qDebug() << "plugins2fullpath: " << plugins2fullpath;
1751  }
1752 
1753  if (!plugins2fullpath.contains(plugfile)) {
1754  QMessageBox::critical(0, "Error - could not locate plugin file: "+plugfile,
1755  "could not locate plugin file: "
1756  +plugfile,QMessageBox::Ok,QMessageBox::Ok);
1757  return;
1758  }
1759  QString plugfile_fullpath = plugins2fullpath[plugfile];
1760 
1761 
1762  //Load plugin
1763  if (!m_channelmanager->currentPluginFiles().contains(plugfile_fullpath)) {
1764  QString err = m_channelmanager->loadPluginFile(plugfile_fullpath);
1765  if (!err.isEmpty()||!m_channelmanager->currentPluginFiles().contains(plugfile_fullpath)) {
1766  QMessageBox::critical(0, "Error - could not load plugin file: "+plugfile_fullpath,//Fixme: Error message here is hardcoded to be the same as in loadPluginFile method!!
1767  "Could not load plugin file: "
1768  +plugfile_fullpath+"\n\nReason: "+err,QMessageBox::Ok,QMessageBox::Ok);
1769  return;
1770  }
1771  }
1772 
1773 
1774  //Check that plugin contains necessary channel:
1775  if (!m_channelmanager->channelsInPluginFile(plugfile_fullpath).contains(channelname)) {
1776  QMessageBox::critical(0, "Error - did not find necessary channel: "+channelname,
1777  "Could not find channel: "+channelname+" in loaded plugin "+plugfile_fullpath,
1778  QMessageBox::Ok,QMessageBox::Ok);
1779  return;
1780  }
1781 
1782  bool save = updatesEnabled();
1783  setUpdatesEnabled(false);
1784 
1785 
1786  //Add tab:
1787  QString newtabname = m_tabmanager->suggestNewTabName(tabname);
1788  m_tabmanager->addNewTab(newtabname);
1789  if (!m_tabmanager->hasTab(newtabname)) {
1790  QMessageBox::critical(0, "Error - could not create tab: "+newtabname,
1791  "Could not create tab: "+newtabname,
1792  QMessageBox::Ok,QMessageBox::Ok);
1793  setUpdatesEnabled(save);
1794  return;
1795  }
1796 
1797 
1798  //Finally, add channel:
1799 
1800  if (!m_tabmanager->addChannelToTab( channelname, newtabname )) {
1801  QMessageBox::critical(0, "Error - problems launching channel: "+channelname,
1802  "Problems launching channel: "+channelname,
1803  QMessageBox::Ok,QMessageBox::Ok);
1804  setUpdatesEnabled(save);
1805  return;
1806  }
1807 
1808 
1809  m_tabmanager->showTab(newtabname);
1810 
1811 
1812  setUpdatesEnabled(save);
1813 }
1814 
1815 //_________________________________________________________________________________
1817 {
1818  pushButton_nextevent->setEnabled(okToProceedToNextEvent());
1819  #if defined BUILDVP1LIGHT
1820  pushButton_previousevent->setEnabled(okToProceedToNextEvent());
1821  #endif
1822 }
1823 
1824 //_________________________________________________________________________________
1826 {
1827  if(!m_mutex->tryLock()) return;
1828 
1829  QFont f;
1830  QFont fb;
1831  fb.setBold(true);
1832 
1833  for (QAction * act : m_inputdiractions) {
1834  VP1DirStatusData& dirstatus = m_inputdirstatuses[act];
1835  QString inputdir(act->data().toString());
1836  QString dirname = QDir(inputdir).dirName();
1837  act->setEnabled(dirstatus.enabled);
1838  act->setFont(dirstatus.bold?fb:f);
1839  act->setText(dirname+" ["+dirstatus.dirStatus+"]");
1840  }
1841 
1842  m_mutex->unlock();
1843 }
1844 
1845 //_________________________________________________________________________________
1847 {
1848  QAction * act = dynamic_cast<QAction*>(sender());
1849  if (!act)
1850  return;
1851  VP1AvailEvtsLocalDir* availLocal = dynamic_cast<VP1AvailEvtsLocalDir*>(m_availEvents);
1852  if (!availLocal)
1853  return;
1854  QString inputdir(act->data().toString());
1855  QFileInfo fi(inputdir);
1856  if (fi.exists()&&fi.isDir()) {
1857  availLocal->setSourceDir(inputdir);
1858  std::cout<<VP1Msg::prefix_msg()<<": "
1859  <<"VP1Message: inputdirectory changed to "
1860  <<availLocal->currentSourceDir().toStdString()<<std::endl;
1861  m_currentStream = QDir(availLocal->currentSourceDir()).dirName();
1862  }
1863 
1864 
1865 }
1866 
1867 //________________________________________________________________________________
1869 {
1870  QStringList returnval(m_userRequestedFiles);
1871  m_userRequestedFiles.clear();
1872  return returnval;
1873 }
1874 
1875 //_________________________________________________________________________________
1877 {
1878  QString newEventFile = QFileDialog::getOpenFileName(NULL
1879  ,tr("Open Event File")
1881  ,tr("All files (*.*)"));
1882  if(newEventFile.isEmpty()) return;
1883  if(VP1FileUtilities::fileExistsAndReadable(newEventFile.toStdString())) {
1884  m_userRequestedFiles.append(newEventFile);
1885  addToMessageBox(newEventFile + " will be appended to the list of input files");
1886  }
1887  else
1888  QMessageBox::critical(0, newEventFile + " either does not exist or is not readable",
1889  newEventFile + " either does not exist or is not readable",
1890  QMessageBox::Ok,QMessageBox::Ok);
1891 }
1892 
1893 //_________________________________________________________________________________
1894 #ifdef BUILDVP1LIGHT
1895 void VP1MainWindow::request_expertSettings(){
1896  VP1ExpertSettings es;
1897  es.exec();
1898 }
1899 
1900 void VP1MainWindow::chooseEvent(){
1901  //Open event selection dialog for VP1Light
1902  VP1SelectEvent selectEvent(m_scheduler->getTotEvtNr(), m_scheduler->getEvtNr());
1903  selectEvent.exec();
1904  int newEvtNr = selectEvent.result()-1;
1905 
1906  if( (newEvtNr >= 0) && (newEvtNr <= m_scheduler->getTotEvtNr()-1) ){
1907  m_scheduler->setEvtNr(newEvtNr);
1908  nextEvent();
1909  qApp->quit();
1910  }
1911 }
1912 #endif // BUILDVP1LIGHT
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1MainWindow::updateCentralStackWidget
void updateCentralStackWidget()
Definition: VP1MainWindow.cxx:1646
VP1MainWindow::VP1MainWindow
VP1MainWindow(VP1ExecutionScheduler *, VP1AvailEvents *availEvents, QWidget *parent=0)
Definition: VP1MainWindow.cxx:89
python.changerun.bn
bn
Definition: changerun.py:79
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
base
std::string base
Definition: hcg.cxx:78
VP1DirStatusData
Definition: VP1MainWindow.h:54
VP1MainWindow::postInitUpdates
void postInitUpdates()
Definition: VP1MainWindow.cxx:486
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
VP1MainWindow::showMenu_loadPluginItemSelected
void showMenu_loadPluginItemSelected()
Definition: VP1MainWindow.cxx:1531
VP1TabManager::removeAllTabs
void removeAllTabs()
Definition: VP1TabManager.cxx:590
beamspotman.r
def r
Definition: beamspotman.py:676
VP1ExecutionScheduler::NONE
@ NONE
Definition: VP1ExecutionScheduler.h:49
VP1IncomingMessageDialog.h
VP1MainWindow::selectedChannelChanged
void selectedChannelChanged(IVP1ChannelWidget *)
Definition: VP1MainWindow.cxx:637
python.ROOTUtils.setStyle
def setStyle(style=None)
Definition: python/ROOTUtils.py:410
VP1FileUtilities::fileExistsAndReadable
static bool fileExistsAndReadable(const std::string &)
Definition: VP1FileUtilities.cxx:211
VP1MainWindow::~VP1MainWindow
~VP1MainWindow()
Definition: VP1MainWindow.cxx:538
VP1MainWindow::m_actionEnableExpertSettings
QAction * m_actionEnableExpertSettings
Definition: VP1MainWindow.h:230
VP1MainWindow::m_mustquit
bool m_mustquit
Definition: VP1MainWindow.h:164
VP1MainWindow::m_currentconfigfile
QString m_currentconfigfile
Definition: VP1MainWindow.h:157
VP1MainWindow::launch3DstereoEditor
void launch3DstereoEditor()
Definition: VP1MainWindow.cxx:429
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1MainWindow::m_action_openAbout
QAction * m_action_openAbout
Definition: VP1MainWindow.h:236
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
VP1MainWindow::changeStyleActionTriggered
void changeStyleActionTriggered()
Definition: VP1MainWindow.cxx:1586
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
VP1MainWindow::helperAddToMessageBox
void helperAddToMessageBox(const QString &)
Definition: VP1MainWindow.cxx:1063
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
VP1MainWindow::changeFontSize
void changeFontSize(int)
Definition: VP1MainWindow.cxx:1617
VP1ExecutionScheduler.h
VP1MainWindow::m_requestqueue
QQueue< VP1ExternalRequest > m_requestqueue
Definition: VP1MainWindow.h:174
VP1MainWindow::m_channelmanager
VP1ChannelManager * m_channelmanager
Definition: VP1MainWindow.h:155
rename_histos_in_files_from_old_code.currentdir
currentdir
Definition: rename_histos_in_files_from_old_code.py:289
VP1AvailEvtsLocalDir::availableSourceDirectories
const QStringList & availableSourceDirectories() const
Definition: VP1AvailEvtsLocalDir.cxx:78
VP1DockWidget::highlightStyle
static QString highlightStyle()
Definition: VP1DockWidget.cxx:121
VP1ChannelManager::unloadPluginFile
bool unloadPluginFile(QString filename)
Definition: VP1ChannelManager.cxx:184
VP1StreamMenuUpdater
Definition: VP1StreamMenuUpdater.h:15
VP1TabManager::nTabs
int nTabs() const
Definition: VP1TabManager.cxx:1043
VP1MainWindow::tabListChanged
void tabListChanged(const QStringList &)
Definition: VP1MainWindow.cxx:606
VP1MainWindow::help_openUserGuide
void help_openUserGuide()
Definition: VP1MainWindow.cxx:437
VP1MainWindow::help_openVP1WebSite
void help_openVP1WebSite()
Definition: VP1MainWindow.cxx:461
VP1Msg.h
VP1MainWindow::setupStatusBar
void setupStatusBar()
Definition: VP1MainWindow.cxx:524
trigmenu_modify_prescale_json.menu_file
menu_file
Definition: trigmenu_modify_prescale_json.py:30
IVP1ChannelWidget::contact_info
const QString & contact_info() const
Definition: IVP1ChannelWidget.cxx:191
VP1ChannelManager::getIconLocation
QString getIconLocation(const QString &channelname, const bool &isbasename=true)
Definition: VP1ChannelManager.cxx:588
VP1MainWindow::availablePluginFiles
QMap< QString, QString > availablePluginFiles() const
Definition: VP1MainWindow.cxx:823
VP1MainWindow::getSingleChannelCustomSnapshot
QPixmap getSingleChannelCustomSnapshot(IVP1ChannelWidget *tab, int width=0)
Definition: VP1MainWindow.cxx:1162
VP1TabManager::launchStereoEditorCurrentTab
void launchStereoEditorCurrentTab()
Definition: VP1TabManager.cxx:135
VP1AvailEvents.h
VP1TabManager::showTab
bool showTab(const QString &)
Definition: VP1TabManager.cxx:1078
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1EventDisplayEditor::setTabsList
void setTabsList(QStringList listNames)
Definition: VP1EventDisplayEditor.cxx:614
VP1TcpServer::listen
bool listen(QString &err, const quint16 &port=4747)
Definition: VP1TcpServer.cxx:57
VP1ChannelManager.h
dirname
std::string dirname(std::string name)
Definition: utils.cxx:200
VP1QtUtils.h
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
VP1AvailEvents::init
virtual void init()=0
VP1EventDisplayEditor
Definition: VP1EventDisplayEditor.h:34
VP1MainWindow::availableFiles
QMap< QString, QString > availableFiles(const QString &extension, const QString &pathvar, const QString &instareasubdir, const QString &extradirenvvar, bool currentdir=false) const
Definition: VP1MainWindow.cxx:724
VP1MainWindow::m_tcpserver
VP1TcpServer m_tcpserver
Definition: VP1MainWindow.h:170
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
VP1ExecutionScheduler::setCruiseMode
void setCruiseMode(const CruiseMode &)
Definition: VP1ExecutionScheduler.cxx:1314
VP1MainWindow::makeAllChannelsEventDisplay
void makeAllChannelsEventDisplay()
Definition: VP1MainWindow.cxx:1089
VP1MainWindow::m_menu_changeStyle
QMenu * m_menu_changeStyle
Definition: VP1MainWindow.h:227
VP1MainWindow::finishedIncomingDialog
void finishedIncomingDialog()
Definition: VP1MainWindow.cxx:1433
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1MainWindow::m_inputdirstatuses
VP1DirStatuses m_inputdirstatuses
Definition: VP1MainWindow.h:239
AthenaPoolTestRead.Files
Files
Definition: AthenaPoolTestRead.py:10
covarianceTool.xLabel
xLabel
Definition: covarianceTool.py:542
VP1DirStatusData::bold
bool bold
Definition: VP1MainWindow.h:75
VP1QtUtils::expertSettingValue
static QString expertSettingValue(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:43
IVP1ChannelWidget::unique_name
const QString unique_name() const
Definition: IVP1ChannelWidget.cxx:175
VP1MainWindow::processEnqueuedRequests
void processEnqueuedRequests()
Definition: VP1MainWindow.cxx:1442
ReweightUtils.message
message
Definition: ReweightUtils.py:15
VP1MainWindow::help_openAbout
void help_openAbout()
Definition: VP1MainWindow.cxx:474
VP1MainWindow::saveAllCurrentChannels
void saveAllCurrentChannels()
Definition: VP1MainWindow.cxx:1221
VP1EventDisplayEditor::addPixmapList
void addPixmapList(QList< QPixmap > &list, QStringList &listNames)
Definition: VP1EventDisplayEditor.cxx:424
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
VP1GeoDBSelection.h
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
VP1MainWindow::request_loadConfig
void request_loadConfig()
Definition: VP1MainWindow.cxx:693
VP1ChannelManager::currentPluginFiles
QStringList currentPluginFiles() const
Definition: VP1ChannelManager.cxx:535
VP1ExecutionScheduler::EVENT
@ EVENT
Definition: VP1ExecutionScheduler.h:51
VP1ChannelManager
Definition: VP1ChannelManager.h:27
VP1MainWindow::help_openUserSupport
void help_openUserSupport()
Definition: VP1MainWindow.cxx:449
VP1MainWindow::addToMessageBox
void addToMessageBox(const QString &, const QString &extrastyleopts="", const QString &title="", const QString &titleextrastyleopts="")
Definition: VP1MainWindow.cxx:1017
VP1MainWindow::changeFontSizeActionTriggered
void changeFontSizeActionTriggered()
Definition: VP1MainWindow.cxx:1602
VP1MainWindow::m_settingsfile
const QString m_settingsfile
Definition: VP1MainWindow.h:248
VP1MainWindow::m_streamMenuUpdater
VP1StreamMenuUpdater * m_streamMenuUpdater
Definition: VP1MainWindow.h:254
VP1AvailEvents::freshEvents
QList< VP1EventFile > freshEvents() const
Definition: VP1AvailEvents.cxx:129
VP1MainWindow::getAllChannelsIntoSnapshots
void getAllChannelsIntoSnapshots(QList< QPixmap > &list, QStringList &listNames)
Definition: VP1MainWindow.cxx:1119
VP1MainWindow::updateInputDirectoriesStatus
void updateInputDirectoriesStatus()
Definition: VP1MainWindow.cxx:1825
VP1TabManager::suggestNewTabName
QString suggestNewTabName(const QString &oldtabname) const
Definition: VP1TabManager.cxx:1027
VP1MainWindow::m_plugindialog
VP1PluginDialog * m_plugindialog
Definition: VP1MainWindow.h:182
MuonSegmentReaderConfig.inputdir
string inputdir
define the input files
Definition: MuonSegmentReaderConfig.py:42
VP1MainWindow::m_betweenevents
bool m_betweenevents
Definition: VP1MainWindow.h:161
VP1Settings.h
VP1MainWindow::closeEvent
void closeEvent(QCloseEvent *event)
Definition: VP1MainWindow.cxx:938
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
VP1ExecutionScheduler::setNextRequestedEventFile
void setNextRequestedEventFile(const QString &)
Definition: VP1ExecutionScheduler.cxx:584
IVP1System
Definition: IVP1System.h:36
VP1MainWindow.h
VP1MainWindow::m_blockallmessages
bool m_blockallmessages
Definition: VP1MainWindow.h:175
VP1TabManager::addChannelToTab
IVP1ChannelWidget * addChannelToTab(const QString &channelbasename, const QString &tabname)
Definition: VP1TabManager.cxx:470
VP1QtUtils::expertSettingIsSet
static bool expertSettingIsSet(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:27
VP1MainWindow::m_menu_changeFontSize
QMenu * m_menu_changeFontSize
Definition: VP1MainWindow.h:228
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
VP1MainWindow::showMenu_loadConfFile
void showMenu_loadConfFile()
Definition: VP1MainWindow.cxx:1542
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
VP1Settings::defaultFileSelectDirectory
static QString defaultFileSelectDirectory()
Definition: VP1Settings.cxx:22
VP1ExpertSettings
Definition: VP1ExpertSettings.h:26
VP1MainWindow::unloadPlugin_continue
void unloadPlugin_continue()
Definition: VP1MainWindow.cxx:864
VP1MainWindow::request_cruisemodechange
void request_cruisemodechange()
Definition: VP1MainWindow.cxx:1475
VP1AvailEvtsLocalDir::currentSourceDir
const QString & currentSourceDir() const
Definition: VP1AvailEvtsLocalDir.cxx:58
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
VP1ChannelManager::channelsInPluginFile
QStringList channelsInPluginFile(QString filename) const
Definition: VP1ChannelManager.cxx:358
VP1QtUtils::environmentVariableIsOn
static bool environmentVariableIsOn(const QString &name)
Definition: VP1QtUtils.cxx:127
VP1AODSelection
Definition: VP1AODSelection.h:25
VP1AvailEvtsLocalDir.h
VP1TcpServer::port
quint16 port() const
Definition: VP1TcpServer.cxx:75
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1ExternalRequest
Definition: VP1ExternalRequest.h:20
VP1ChannelManager::basename2UniqueNames
QStringList basename2UniqueNames(QString basename) const
Definition: VP1ChannelManager.cxx:546
VP1IncomingMessageDialog
Definition: VP1IncomingMessageDialog.h:27
VP1MainWindow::m_eventnumber
unsigned long long m_eventnumber
Definition: VP1MainWindow.h:159
VP1MainWindow::okToProceedToNextEvent
bool okToProceedToNextEvent() const
Definition: VP1MainWindow.cxx:876
beamspotman.n
n
Definition: beamspotman.py:731
VP1MainWindow::m_statusbarlabel
QLabel * m_statusbarlabel
Definition: VP1MainWindow.h:185
VP1DockWidget.h
VP1DirStatusData::dirStatus
QString dirStatus
Definition: VP1MainWindow.h:73
VP1MainWindow::m_mutex
QMutex * m_mutex
Definition: VP1MainWindow.h:255
python.style.style
def style()
Definition: style.py:15
covarianceTool.title
title
Definition: covarianceTool.py:542
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
VP1MainWindow::loadConfigurationFromFile
void loadConfigurationFromFile(const QString &file)
Definition: VP1MainWindow.cxx:1410
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
VP1MainWindow::m_userRequestedFiles
QStringList m_userRequestedFiles
Definition: VP1MainWindow.h:252
IVP1ChannelWidget::isAntiAliasing
virtual bool isAntiAliasing()
Definition: IVP1ChannelWidget.h:105
VP1MainWindow::request_channelInformation
void request_channelInformation()
Definition: VP1MainWindow.cxx:1069
file
TFile * file
Definition: tile_monitor.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IVP1ChannelWidget::systems
const std::set< IVP1System * > & systems()
Definition: IVP1ChannelWidget.cxx:231
IVP1ChannelWidget::getSnapshot
virtual QPixmap getSnapshot(bool transp=false, int width=0, bool batch=false)
Definition: IVP1ChannelWidget.cxx:306
VP1MainWindow::m_availEvents
VP1AvailEvents * m_availEvents
Definition: VP1MainWindow.h:168
VP1StreamMenuUpdater.h
VP1TabManager::saveConfigurationToFile
void saveConfigurationToFile(const QString &filename, const bool &askonoverride=true)
Definition: VP1TabManager.cxx:767
VP1MainWindow::m_dummyemptycontroller
QWidget * m_dummyemptycontroller
Definition: VP1MainWindow.h:166
VP1MainWindow::m_currentincomingdialog
VP1IncomingMessageDialog * m_currentincomingdialog
Definition: VP1MainWindow.h:173
hist_file_dump.f
f
Definition: hist_file_dump.py:135
VP1MainWindow::request_loadPlugin
void request_loadPlugin()
Definition: VP1MainWindow.cxx:705
VP1ExecutionScheduler::TAB
@ TAB
Definition: VP1ExecutionScheduler.h:50
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
VP1MainWindow::nextEvent
void nextEvent()
Definition: VP1MainWindow.cxx:883
VP1AvailEvents::setCurrentEvent
void setCurrentEvent(int run, int event)
Definition: VP1AvailEvents.cxx:144
VP1MainWindow::m_currentunloadpluginfiles
QStringList m_currentunloadpluginfiles
Definition: VP1MainWindow.h:181
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
VP1ChannelManager::loadPluginFile
QString loadPluginFile(QString filename)
Definition: VP1ChannelManager.cxx:229
VP1MainWindow::showMenu_loadPlugin
void showMenu_loadPlugin()
Definition: VP1MainWindow.cxx:1495
VP1MainWindow::m_action_openUsersSupport
QAction * m_action_openUsersSupport
Definition: VP1MainWindow.h:234
VP1TabManager::selectedChannelWidget
IVP1ChannelWidget * selectedChannelWidget() const
Definition: VP1TabManager.cxx:465
VP1MainWindow::loadPluginFile
void loadPluginFile(const QString &filename)
Definition: VP1MainWindow.cxx:581
VP1TabManager::allChannels
QList< IVP1ChannelWidget * > allChannels() const
Definition: VP1TabManager.cxx:1455
VP1GeoDBSelection
Definition: VP1GeoDBSelection.h:25
VP1AvailEvtsLocalDir::setSourceDir
void setSourceDir(const QString &)
Definition: VP1AvailEvtsLocalDir.cxx:64
VP1MainWindow::m_currentloadpluginpath
QString m_currentloadpluginpath
Definition: VP1MainWindow.h:241
beamspotman.dir
string dir
Definition: beamspotman.py:623
VP1PluginDialog::unloadfile
const QString & unloadfile()
Definition: VP1PluginDialog.cxx:78
VP1MainWindow::m_currentsaveimagepath
QString m_currentsaveimagepath
Definition: VP1MainWindow.h:240
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
VP1MainWindow::m_timestamp
unsigned m_timestamp
Definition: VP1MainWindow.h:160
VP1TabManager::loadConfigurationFromFile
void loadConfigurationFromFile(const QString &filename, const QMap< QString, QString > &availableplugins)
Definition: VP1TabManager.cxx:824
VP1MainWindow::m_action_addEventFile
QAction * m_action_addEventFile
Definition: VP1MainWindow.h:232
VP1MainWindow::showMenu_loadConfFileItemSelected
void showMenu_loadConfFileItemSelected()
Definition: VP1MainWindow.cxx:1576
VP1ExecutionScheduler
Definition: VP1ExecutionScheduler.h:42
VP1SelectEvent
Definition: VP1SelectEvent.h:25
VP1MainWindow::m_defaultfont_pixelsize
int m_defaultfont_pixelsize
Definition: VP1MainWindow.h:247
VP1TabManager::addNewTab
void addNewTab(const QString &, const int &index=-1)
Definition: VP1TabManager.cxx:236
VP1MainWindow::m_actionSave_current_tabs
QAction * m_actionSave_current_tabs
Definition: VP1MainWindow.h:231
VP1MainWindow::replaceConfigurationFile
void replaceConfigurationFile(const QString &file)
Definition: VP1MainWindow.cxx:1415
python.selection.number
number
Definition: selection.py:20
VP1PluginDialog.h
VP1TabManager::dropOutOfFullScreen
void dropOutOfFullScreen()
Definition: VP1TabManager.cxx:257
VP1MainWindow::progressbar
QProgressBar * progressbar
Definition: VP1MainWindow.h:195
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
VP1MainWindow::m_action_openUsersGuide
QAction * m_action_openUsersGuide
Definition: VP1MainWindow.h:233
VP1MainWindow::m_actionAdd_empty_tab
QAction * m_actionAdd_empty_tab
Definition: VP1MainWindow.h:229
VP1MainWindow::m_menu_loadConfFile
QMenu * m_menu_loadConfFile
Definition: VP1MainWindow.h:226
VP1MainWindow::m_edEditor
VP1EventDisplayEditor * m_edEditor
Definition: VP1MainWindow.h:265
VP1MainWindow::request_saveConfig
void request_saveConfig()
Definition: VP1MainWindow.cxx:683
VP1MainWindow::request_addEmptyTab
void request_addEmptyTab()
Definition: VP1MainWindow.cxx:596
VP1TabManager::removeChannel
void removeChannel(const QString &channeluniquename)
Definition: VP1TabManager.cxx:600
VP1MainWindow::listenOnTcp
void listenOnTcp()
Definition: VP1MainWindow.cxx:1423
VP1ChannelManager::getController
QWidget * getController(IVP1ChannelWidget *)
Definition: VP1ChannelManager.cxx:440
VP1MainWindow::m_currentStream
QString m_currentStream
Definition: VP1MainWindow.h:242
Name
JetDumper::Name Name
Definition: JetDumper.cxx:19
VP1MainWindow::updateTcpIcon
void updateTcpIcon()
Definition: VP1MainWindow.cxx:570
VP1Msg::messageDebug
static void messageDebug(const QString &)
Definition: VP1Msg.cxx:39
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
VP1Msg::message
static void message(const QString &, IVP1System *sys=0)
Definition: VP1Msg.cxx:30
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
VP1DirStatusData::enabled
bool enabled
Definition: VP1MainWindow.h:74
python.envutil.filelist
filelist
print ("Checking files %s..." % fullfile)
Definition: envutil.py:133
VP1MainWindow::request_printChannel
void request_printChannel()
Definition: VP1MainWindow.cxx:1390
VP1TabManager::hasTab
bool hasTab(const QString &) const
Definition: VP1TabManager.cxx:1421
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
VP1MainWindow::addEventFile
void addEventFile()
Definition: VP1MainWindow.cxx:1876
VP1TabManager::setSelectedDockWidget
void setSelectedDockWidget(VP1DockWidget *dw=0)
Definition: VP1TabManager.cxx:329
VP1MainWindow::request_saveChannelSnapshot
QString request_saveChannelSnapshot(QString xLabel="")
Definition: VP1MainWindow.cxx:1335
RunTileMonitoring.triggerType
triggerType
Definition: RunTileMonitoring.py:162
VP1MainWindow::m_action_openVP1Site
QAction * m_action_openVP1Site
Definition: VP1MainWindow.h:235
checkFileSG.fi
fi
Definition: checkFileSG.py:65
VP1TabManager
Definition: VP1TabManager.h:30
VP1MainWindow::addChannelIconsToComboBox
void addChannelIconsToComboBox(QComboBox *cb, const bool &isbasenames)
Definition: VP1MainWindow.cxx:627
VP1FileUtilities.h
IVP1ChannelWidget::name
const QString & name() const
Definition: IVP1ChannelWidget.cxx:180
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
VP1MainWindow::m_runnumber
int m_runnumber
Definition: VP1MainWindow.h:158
VP1MainWindow::setRunEvtNumber
void setRunEvtNumber(const int &runnumber, const unsigned long long &eventnumber, const unsigned &triggerType=0, const unsigned &time=0, const bool &printmessage=true)
Definition: VP1MainWindow.cxx:974
VP1ExternalRequest::sender
const QString & sender() const
Definition: VP1ExternalRequest.h:34
VP1AvailEvents
Definition: VP1AvailEvents.h:25
plotBeamSpotMon.font
font
Definition: plotBeamSpotMon.py:80
VP1MainWindow::m_scheduler
VP1ExecutionScheduler * m_scheduler
Definition: VP1MainWindow.h:167
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
VP1MainWindow::m_tabmanager
VP1TabManager * m_tabmanager
Definition: VP1MainWindow.h:156
VP1ExecutionScheduler::BOTH
@ BOTH
Definition: VP1ExecutionScheduler.h:52
VP1MainWindow::userRequestedFiles
QStringList userRequestedFiles()
Definition: VP1MainWindow.cxx:1868
python.dummyaccess.exists
def exists(filename)
Definition: dummyaccess.py:9
VP1AODSelection.h
VP1MainWindow::systemAddToMessageBox
void systemAddToMessageBox(const QString &)
Definition: VP1MainWindow.cxx:1037
VP1MainWindow::updateEventControls
void updateEventControls()
Definition: VP1MainWindow.cxx:1816
python.DataFormatRates.env
env
Definition: DataFormatRates.py:32
VP1MainWindow::goToNextEvent
void goToNextEvent()
Definition: VP1MainWindow.cxx:898
VP1MainWindow::m_menu_loadPlugin
QMenu * m_menu_loadPlugin
Definition: VP1MainWindow.h:225
VP1MainWindow::m_defaultfont
QFont m_defaultfont
Definition: VP1MainWindow.h:245
VP1IncomingMessageDialog::updatependinginfo
void updatependinginfo()
Definition: VP1IncomingMessageDialog.cxx:132
python.TrigInDetArtSteps.timeout
timeout
Definition: TrigInDetArtSteps.py:35
VP1MainWindow::receivedExternalRequest
void receivedExternalRequest(VP1ExternalRequest)
Definition: VP1MainWindow.cxx:1449
VP1MainWindow::m_defaultfont_pointsize
double m_defaultfont_pointsize
Definition: VP1MainWindow.h:246
VP1MainWindow::m_inputdiractions
QList< QAction * > m_inputdiractions
Definition: VP1MainWindow.h:238
VP1AvailEvtsLocalDir
Definition: VP1AvailEvtsLocalDir.h:24
VP1TcpServer::isListening
bool isListening()
Definition: VP1TcpServer.cxx:81
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
IVP1System.h
InDetSecVtxTruthMatchUtils::Accepted
@ Accepted
Definition: InDetSecVtxTruthMatchTool.h:42
VP1MainWindow::inputDirectoryActionTriggered
void inputDirectoryActionTriggered()
Definition: VP1MainWindow.cxx:1846
VP1MainWindow::mustQuit
bool mustQuit() const
Definition: VP1MainWindow.cxx:564
VP1MainWindow::request_saveasConfig
void request_saveasConfig()
Definition: VP1MainWindow.cxx:667
VP1MainWindow::m_messages_blockedsenders
QList< QString > m_messages_blockedsenders
Definition: VP1MainWindow.h:176
VP1SelectEvent.h
VP1MainWindow::quickSetupTriggered
void quickSetupTriggered()
Definition: VP1MainWindow.cxx:1654
VP1MainWindow::m_userRequestedExit
bool m_userRequestedExit
Definition: VP1MainWindow.h:250
VP1MainWindow::channelAddToMessageBox
void channelAddToMessageBox(const QString &)
Definition: VP1MainWindow.cxx:1052
SUSY_SimplifiedModel_PreInclude.plugin
plugin
Definition: SUSY_SimplifiedModel_PreInclude.py:66
VP1ExpertSettings.h
beamspotman.fullpath
string fullpath
Definition: beamspotman.py:1039
VP1MainWindow::pluginDialogClosed
void pluginDialogClosed()
Definition: VP1MainWindow.cxx:838
IVP1ChannelWidget::information
const QString & information() const
Definition: IVP1ChannelWidget.cxx:185
IVP1ChannelWidget.h
VP1TabManager::channelToTab
QString channelToTab(IVP1ChannelWidget *)
Definition: VP1TabManager.cxx:1406
IVP1ChannelWidget::setAntiAliasing
virtual bool setAntiAliasing(bool aa)
Definition: IVP1ChannelWidget.h:104
VP1MainWindow::m_messages_blockedexactmessages
QList< VP1ExternalRequest > m_messages_blockedexactmessages
Definition: VP1MainWindow.h:177
VP1TabManager.h