ATLAS Offline Software
Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
AdvancedTab Class Reference

#include <VP1ExpertSettings.h>

Inheritance diagram for AdvancedTab:
Collaboration diagram for AdvancedTab:

Signals

void signalPluginPathChanged (const QString &path)
 
void signalFileSelectDirChanged (const QString &path)
 
void signalAuthLogChanged (const QString &path)
 

Public Member Functions

 AdvancedTab (QWidget *parent=0)
 

Private Slots

void on_browseButton1_clicked ()
 
void on_browseButton2_clicked ()
 
void on_browseButton3_clicked ()
 
void slotPluginPathChanged (const QString &path)
 
void slotFileSelectDirChanged (const QString &path)
 
void slotAuthLogChanged (const QString &path)
 
void setExpertSetting (const QString &name)
 

Private Attributes

QPushButton * m_browseButton1
 
QPushButton * m_browseButton2
 
QPushButton * m_browseButton3
 
QCheckBox * m_checkboxEnableInformOnEndOfJob
 
QCheckBox * m_checkboxHardExitAtEnd
 
QCheckBox * m_checkboxDevelShowAllCruiseAndEventControls
 
QLineEdit * m_lineEdit1
 
QLineEdit * m_lineEdit2
 
QLineEdit * m_lineEdit3
 

Detailed Description

Definition at line 93 of file VP1ExpertSettings.h.

Constructor & Destructor Documentation

◆ AdvancedTab()

AdvancedTab::AdvancedTab ( QWidget *  parent = 0)
explicit

Definition at line 369 of file VP1ExpertSettings.cxx.

370  : QWidget(parent)
371 {
372  QGroupBox *checkBoxGroup = new QGroupBox(tr("Advanced settings"));
373 
374  m_checkboxEnableInformOnEndOfJob = new QCheckBox("&Enable inform on end of job", this);
375  m_checkboxEnableInformOnEndOfJob->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
376  " <div style=\"width: 300px;\">By default, VP1 simply exits at the end of the ATHENA job, which might be confusing to some. When this variable is set, VP1 will show an dialog, letting the user know that the end of the job has been reached.</div>"
377  " </html>", 0
378  ));
379  #if defined BUILDVP1LIGHT
380  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_ENABLE_INFORM_ON_END_OF_JOB")){
381  m_checkboxEnableInformOnEndOfJob->setChecked(true);
382  }
383  connect(m_checkboxEnableInformOnEndOfJob, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_ENABLE_INFORM_ON_END_OF_JOB");});
384  #else
385  if(VP1QtUtils::environmentVariableIsOn("VP1_ENABLE_INFORM_ON_END_OF_JOB")){
386  m_checkboxEnableInformOnEndOfJob->setChecked(true);
387  }
388  connect(m_checkboxEnableInformOnEndOfJob, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_ENABLE_INFORM_ON_END_OF_JOB");});
389  #endif
390 
391  m_checkboxHardExitAtEnd = new QCheckBox("&Hard exit at end", this);
392  m_checkboxHardExitAtEnd->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
393  " <div style=\"width: 300px;\">By default, the VP1 algorithm simply tells ATHENA to end the job when VP1 is being closed. This means that ATHENA will shut down with its usual procedure, calling finalise on algorithms, generating summaries, etc. If this variable is set, then VP1 will make the process end immediately and abrubtly instead - saving the user some time.</div>"
394  " </html>", 0
395  ));
396  #if defined BUILDVP1LIGHT
397  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_HARD_EXIT_AT_END")){
398  m_checkboxHardExitAtEnd->setChecked(true);
399  }
400  connect(m_checkboxHardExitAtEnd, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_HARD_EXIT_AT_END");});
401  #else
402  if(VP1QtUtils::environmentVariableIsOn("VP1_HARD_EXIT_AT_END")){
403  m_checkboxHardExitAtEnd->setChecked(true);
404  }
405  connect(m_checkboxHardExitAtEnd, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_HARD_EXIT_AT_END");});
406  #endif
407 
408  m_checkboxDevelShowAllCruiseAndEventControls = new QCheckBox("&Show all cruise and event controls", this);
409  m_checkboxDevelShowAllCruiseAndEventControls->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
410  " <div style=\"width: 300px;\">Use to enable a few controls related to VP1 cruise-mode, which have presently been disabled.</div>"
411  " </html>", 0
412  ));
413  #if defined BUILDVP1LIGHT
414  if(VP1QtUtils::expertSettingIsOn("expert","ExpertSettings/VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS")){
416  }
417  connect(m_checkboxDevelShowAllCruiseAndEventControls, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("expert","ExpertSettings/VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");});
418  #else
419  if(VP1QtUtils::environmentVariableIsOn("VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS")){
421  }
422  connect(m_checkboxDevelShowAllCruiseAndEventControls, &QCheckBox::toggled, [this](){AdvancedTab::setExpertSetting("VP1_DEVEL_SHOW_ALL_CRUISE_AND_EVENT_CONTROLS");});
423  #endif
424 
425 
426  QGroupBox *directoryGroup = new QGroupBox(tr("Directory settings"));
427 
428  m_browseButton1 = new QPushButton(tr("&Browse..."), this);
429  connect(m_browseButton1, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton1_clicked);
430  m_lineEdit1 = new QLineEdit("", this);
431 
432  #if defined BUILDVP1LIGHT
433  if(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH")==""){
434  #ifdef MACBUNDLE
435  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../Frameworks");
436  #else
437  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../lib");
438  #endif
439  } else {
440  m_lineEdit1->setText(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1PLUGINPATH"));
441  }
442  #else
443  if(VP1QtUtils::environmentVariableValue("VP1PLUGINPATH")==""){
444  m_lineEdit1->setText(QCoreApplication::applicationDirPath()+"/../lib");
445  } else {
446  m_lineEdit1->setText(VP1QtUtils::environmentVariableValue("VP1PLUGINPATH"));
447  }
448  #endif
449  m_lineEdit1->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
450  " <div style=\"width: 300px;\">Select the directory that contains the plugin libraries.</div>"
451  " </html>", 0
452  ));
453  connect(m_lineEdit1, &QLineEdit::textChanged, this, &AdvancedTab::slotPluginPathChanged);
454 
455  m_browseButton2 = new QPushButton(tr("B&rowse..."), this);
456  connect(m_browseButton2, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton2_clicked);
457  #if defined BUILDVP1LIGHT
458  m_lineEdit2 = new QLineEdit(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_FILESELECTDIR"), this);
459  #else
460  m_lineEdit2 = new QLineEdit(VP1QtUtils::environmentVariableValue("VP1_FILESELECTDIR"), this);
461  #endif
462  m_lineEdit2->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
463  " <div style=\"width: 300px;\">By default, the various VP1 file selectors starts in the job run-directory. Setting this variable to a directory ensures that that directory is used by default instead.</div>"
464  " </html>", 0
465  ));
466  connect(m_lineEdit2, &QLineEdit::textChanged, this, &AdvancedTab::slotFileSelectDirChanged);
467 
468  m_browseButton3 = new QPushButton(tr("Br&owse..."), this);
469  connect(m_browseButton3, &QAbstractButton::clicked, this, &AdvancedTab::on_browseButton3_clicked);
470  #if defined BUILDVP1LIGHT
471  m_lineEdit3 = new QLineEdit(VP1QtUtils::expertSettingValue("expert","ExpertSettings/VP1_AUTH_ENABLELOG"), this);
472  #else
473  m_lineEdit3 = new QLineEdit(VP1QtUtils::environmentVariableValue("VP1_AUTH_ENABLELOG"), this);
474  #endif
475  m_lineEdit3->setToolTip( QApplication::translate(__FUNCTION__, " <html>\n"
476  " <div style=\"width: 300px;\">Enables creation of an authentication log file for VP1 live.</div>"
477  " </html>", 0
478  ));
479  connect(m_lineEdit3, &QLineEdit::textChanged, this, &AdvancedTab::slotAuthLogChanged);
480 
481 
482  QVBoxLayout *checkBoxLayout = new QVBoxLayout;
483  checkBoxLayout->addWidget(m_checkboxEnableInformOnEndOfJob);
484  checkBoxLayout->addWidget(m_checkboxHardExitAtEnd);
485  checkBoxLayout->addWidget(m_checkboxDevelShowAllCruiseAndEventControls);
486  checkBoxGroup->setLayout(checkBoxLayout);
487 
488  QGridLayout *gridLayout = new QGridLayout(this);
489  gridLayout->addWidget(new QLabel(tr("Plugin path:")), 0, 0);
490  gridLayout->addWidget(m_lineEdit1,1,0);
491  gridLayout->addWidget(m_browseButton1,1,1);
492  gridLayout->addWidget(new QLabel(tr("File selection directory:")), 2, 0);
493  gridLayout->addWidget(m_lineEdit2,3,0);
494  gridLayout->addWidget(m_browseButton2,3,1);
495  gridLayout->addWidget(new QLabel(tr("Authentication log directory:")), 4, 0);
496  gridLayout->addWidget(m_lineEdit3,5,0);
497  gridLayout->addWidget(m_browseButton3,5,1);
498  directoryGroup->setLayout(gridLayout);
499 
500  QVBoxLayout *mainLayout = new QVBoxLayout;
501  mainLayout->addWidget(checkBoxGroup);
502  mainLayout->addWidget(directoryGroup);
503  mainLayout->addStretch(1);
504  setLayout(mainLayout);
505 }

Member Function Documentation

◆ on_browseButton1_clicked

void AdvancedTab::on_browseButton1_clicked ( )
privateslot

Definition at line 507 of file VP1ExpertSettings.cxx.

508 {
509  QString fileName = QFileDialog::getExistingDirectory(this,
510  tr("Select Plugin Path"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
511 
512  m_lineEdit1->setText(fileName);
513 }

◆ on_browseButton2_clicked

void AdvancedTab::on_browseButton2_clicked ( )
privateslot

Definition at line 515 of file VP1ExpertSettings.cxx.

516 {
517  QString fileName = QFileDialog::getExistingDirectory(this,
518  tr("Select file directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
519 
520  m_lineEdit2->setText(fileName);
521 }

◆ on_browseButton3_clicked

void AdvancedTab::on_browseButton3_clicked ( )
privateslot

Definition at line 523 of file VP1ExpertSettings.cxx.

524 {
525  QString fileName = QFileDialog::getExistingDirectory(this,
526  tr("Select authentication directory"), QDir::currentPath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
527 
528  m_lineEdit3->setText(fileName);
529 }

◆ setExpertSetting

void AdvancedTab::setExpertSetting ( const QString &  name)
privateslot

Definition at line 552 of file VP1ExpertSettings.cxx.

552  {
555  } else {
557  }
558 }

◆ signalAuthLogChanged

void AdvancedTab::signalAuthLogChanged ( const QString &  path)
signal

◆ signalFileSelectDirChanged

void AdvancedTab::signalFileSelectDirChanged ( const QString &  path)
signal

◆ signalPluginPathChanged

void AdvancedTab::signalPluginPathChanged ( const QString &  path)
signal

◆ slotAuthLogChanged

void AdvancedTab::slotAuthLogChanged ( const QString &  path)
privateslot

Definition at line 539 of file VP1ExpertSettings.cxx.

539  {
541 }

◆ slotFileSelectDirChanged

void AdvancedTab::slotFileSelectDirChanged ( const QString &  path)
privateslot

Definition at line 535 of file VP1ExpertSettings.cxx.

535  {
537 }

◆ slotPluginPathChanged

void AdvancedTab::slotPluginPathChanged ( const QString &  path)
privateslot

Definition at line 531 of file VP1ExpertSettings.cxx.

531  {
533 }

Member Data Documentation

◆ m_browseButton1

QPushButton* AdvancedTab::m_browseButton1
private

Definition at line 119 of file VP1ExpertSettings.h.

◆ m_browseButton2

QPushButton* AdvancedTab::m_browseButton2
private

Definition at line 120 of file VP1ExpertSettings.h.

◆ m_browseButton3

QPushButton* AdvancedTab::m_browseButton3
private

Definition at line 121 of file VP1ExpertSettings.h.

◆ m_checkboxDevelShowAllCruiseAndEventControls

QCheckBox* AdvancedTab::m_checkboxDevelShowAllCruiseAndEventControls
private

Definition at line 124 of file VP1ExpertSettings.h.

◆ m_checkboxEnableInformOnEndOfJob

QCheckBox* AdvancedTab::m_checkboxEnableInformOnEndOfJob
private

Definition at line 122 of file VP1ExpertSettings.h.

◆ m_checkboxHardExitAtEnd

QCheckBox* AdvancedTab::m_checkboxHardExitAtEnd
private

Definition at line 123 of file VP1ExpertSettings.h.

◆ m_lineEdit1

QLineEdit* AdvancedTab::m_lineEdit1
private

Definition at line 125 of file VP1ExpertSettings.h.

◆ m_lineEdit2

QLineEdit* AdvancedTab::m_lineEdit2
private

Definition at line 126 of file VP1ExpertSettings.h.

◆ m_lineEdit3

QLineEdit* AdvancedTab::m_lineEdit3
private

Definition at line 127 of file VP1ExpertSettings.h.


The documentation for this class was generated from the following files:
VP1QtUtils::setEnvironmentVariable
static void setEnvironmentVariable(const QString &name, const QString &content)
Definition: VP1QtUtils.cxx:146
AdvancedTab::m_browseButton2
QPushButton * m_browseButton2
Definition: VP1ExpertSettings.h:120
AdvancedTab::slotPluginPathChanged
void slotPluginPathChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:531
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
AdvancedTab::signalAuthLogChanged
void signalAuthLogChanged(const QString &path)
AdvancedTab::m_lineEdit3
QLineEdit * m_lineEdit3
Definition: VP1ExpertSettings.h:127
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
AdvancedTab::m_lineEdit2
QLineEdit * m_lineEdit2
Definition: VP1ExpertSettings.h:126
AdvancedTab::m_lineEdit1
QLineEdit * m_lineEdit1
Definition: VP1ExpertSettings.h:125
VP1QtUtils::expertSettingValue
static QString expertSettingValue(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:43
AdvancedTab::m_checkboxDevelShowAllCruiseAndEventControls
QCheckBox * m_checkboxDevelShowAllCruiseAndEventControls
Definition: VP1ExpertSettings.h:124
VP1QtUtils::environmentVariableValue
static QString environmentVariableValue(const QString &name)
Definition: VP1QtUtils.cxx:117
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
VP1QtUtils::environmentVariableIsOn
static bool environmentVariableIsOn(const QString &name)
Definition: VP1QtUtils.cxx:127
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AdvancedTab::m_checkboxEnableInformOnEndOfJob
QCheckBox * m_checkboxEnableInformOnEndOfJob
Definition: VP1ExpertSettings.h:122
AdvancedTab::slotAuthLogChanged
void slotAuthLogChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:539
VP1QtUtils::expertSettingIsOn
static bool expertSettingIsOn(const QString &type, const QString &name)
Definition: VP1QtUtils.cxx:60
AdvancedTab::slotFileSelectDirChanged
void slotFileSelectDirChanged(const QString &path)
Definition: VP1ExpertSettings.cxx:535
AdvancedTab::on_browseButton1_clicked
void on_browseButton1_clicked()
Definition: VP1ExpertSettings.cxx:507
AdvancedTab::m_checkboxHardExitAtEnd
QCheckBox * m_checkboxHardExitAtEnd
Definition: VP1ExpertSettings.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AdvancedTab::on_browseButton2_clicked
void on_browseButton2_clicked()
Definition: VP1ExpertSettings.cxx:515
VP1QtUtils::unsetEnvironmentVariable
static void unsetEnvironmentVariable(const QString &name)
Definition: VP1QtUtils.cxx:161
AdvancedTab::m_browseButton3
QPushButton * m_browseButton3
Definition: VP1ExpertSettings.h:121
AdvancedTab::m_browseButton1
QPushButton * m_browseButton1
Definition: VP1ExpertSettings.h:119
AdvancedTab::on_browseButton3_clicked
void on_browseButton3_clicked()
Definition: VP1ExpertSettings.cxx:523
AdvancedTab::setExpertSetting
void setExpertSetting(const QString &name)
Definition: VP1ExpertSettings.cxx:552
AdvancedTab::signalPluginPathChanged
void signalPluginPathChanged(const QString &path)
AdvancedTab::signalFileSelectDirChanged
void signalFileSelectDirChanged(const QString &path)