ATLAS Offline Software
Classes | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | Private Slots | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CaloClusterSysController Class Reference

#include <CaloClusterSysController.h>

Inheritance diagram for CaloClusterSysController:
Collaboration diagram for CaloClusterSysController:

Classes

class  Imp
 

Public Slots

void possibleChange_scale ()
 
void toggleDialogState (QObject *widget=0)
 
void enabledButtonStateChanged ()
 
void collWidgetContentChanged ()
 

Signals

void scaleChanged (const QPair< bool, double > &)
 
void cutAllowedEnergiesChanged (const VP1Interval &)
 
void cutAllowedEtaChanged (const VP1Interval &)
 
void cutAllowedPhiChanged (const QList< VP1Interval > &)
 
void showVolumeOutLinesChanged (bool)
 
void useTransverseEnergiesChanged (bool)
 
void dummyUpdateTrigger ()
 

Public Member Functions

 CaloClusterSysController (IVP1System *sys)
 
virtual ~CaloClusterSysController ()
 
void actualRestoreSettings (VP1Deserialise &)
 
int currentSettingsVersion () const
 
void actualSaveSettings (VP1Serialise &) const
 
VP1CollectionWidgetcollWidget () const
 
SoGroup * drawOptions () const
 
bool printInfoOnClick () const
 
bool printVerboseInfoOnClick () const
 
bool zoomOnClick () const
 
QPair< bool, double > scale () const
 
VP1Interval cutAllowedEnergies () const
 
VP1Interval cutAllowedEta () const
 
QList< VP1IntervalcutAllowedPhi () const
 
bool showVolumeOutLines () const
 
bool useTransverseEnergies () const
 
void initLastVars ()
 
QByteArray saveSettings () const
 
void restoreSettings (const QByteArray &)
 
void setSystemBasePointer (IVP1System *sys)
 
void message (const QString &) const
 
void message (const QStringList &, const QString &addtoend="") const
 
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &) const
 
void messageDebug (const QStringList &, const QString &addtoend="") const
 
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &) const
 
void messageVerbose (const QStringList &, const QString &addtoend="") const
 
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
 
IVP1SystemsystemBase () const
 
const QString & helperClassName () const
 

Static Public Member Functions

static void setCustomTourEditor (VP1CustomTourEditor *editor)
 
static VP1CustomTourEditorcustomTourEditor ()
 
static bool verbose ()
 
static void warnUndeletedInstances ()
 
static QString str (const QString &s)
 
static QString str (const char *c)
 
static QString str (const bool b)
 
static QString str (const QColor &)
 
static QString str (const SbColor &)
 
static QString str (const VP1Interval &)
 
static QString str (const SbVec2d &)
 
static QString str (const SbVec2f &)
 
static QString str (const SbVec2s &)
 
static QString str (const SbVec3d &)
 
static QString str (const SbVec3f &)
 
static QString str (const SbVec3s &)
 
static QString str (const SbVec4d &)
 
static QString str (const SbVec4f &)
 
static QString str (short int n)
 
static QString str (unsigned short int n)
 
static QString str (long n)
 
static QString str (ulong n)
 
static QString str (int n)
 
static QString str (uint n)
 
static QString str (qlonglong n)
 
static QString str (qulonglong n)
 
static QString str (const double &d)
 
static QString str (const float &f)
 
static QString str (const void *)
 
template<class T >
static QString str (const T *t)
 
template<class T >
static QString str (const QFlags< T > &f)
 
template<class T >
static QString str (const HepGeom::BasicVector3D< T > &t)
 
static QString str (const Amg::Vector3D &t)
 
template<class T >
static QString str (const QList< T > &t)
 

Protected Slots

void testForChanges ()
 

Protected Member Functions

template<class T >
bool changed (T &lastval, const T &newval)
 
template<class T >
void initDialog (T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
 
void initDialog (QWidget *dialog, QPushButton *launchbutton, QPushButton *closebutton, QAbstractButton *enabledButton=0)
 
void setupCollWidgetInScrollArea (QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
 
const char * addUpdateSlot (const char *slot)
 
void connectToLastUpdateSlot (QObject *sender, const char *signal)
 
void connectToLastUpdateSlot (QCheckBox *)
 
void connectToLastUpdateSlot (QComboBox *)
 
void connectToLastUpdateSlot (QGroupBox *)
 
void connectToLastUpdateSlot (QSpinBox *)
 
void connectToLastUpdateSlot (QDoubleSpinBox *)
 
void connectToLastUpdateSlot (QRadioButton *)
 
void connectToLastUpdateSlot (QButtonGroup *)
 
void connectToLastUpdateSlot (QSlider *)
 
void connectToLastUpdateSlot (VP1ColorSelectButton *)
 
bool initVarsMode () const
 
QButtonGroup * defineRadioButtonGroup (QRadioButton *rb0, QRadioButton *rb1, QRadioButton *rb2=0, QRadioButton *rb3=0, QRadioButton *rb4=0, QRadioButton *rb5=0, QRadioButton *rb6=0, QRadioButton *rb7=0, QRadioButton *rb8=0, QRadioButton *rb9=0)
 
QButtonGroup * defineRadioButtonGroup (const QList< QRadioButton * > &)
 
SoMaterial * getMaterial (VP1MaterialButton *) const
 
SoMaterial * fallBackMaterial () const
 
void setHelperClassName (const QString &n)
 

Static Protected Member Functions

static QString toString (const bool &par)
 
static QString toString (const QList< VP1Interval > &l)
 
static QString toString (SbColor4f)
 

Private Slots

void possibleChange_cutAllowedEnergies ()
 
void possibleChange_cutAllowedEta ()
 
void possibleChange_cutAllowedPhi ()
 
void possibleChange_showVolumeOutLines ()
 
void possibleChange_useTransverseEnergies ()
 
void etaCutPresetButtonTriggered ()
 

Static Private Member Functions

template<class T >
static QString toString (const T &t)
 
static QString toString (const QPair< bool, double > &par)
 

Private Attributes

Impm_d
 
bool m_initVarsMode
 
QString m_helpername
 
IVP1Systemm_system
 

Static Private Attributes

static VP1CustomTourEditorm_customTourEditor =0
 
static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
 

Detailed Description

Definition at line 23 of file CaloClusterSysController.h.

Constructor & Destructor Documentation

◆ CaloClusterSysController()

CaloClusterSysController::CaloClusterSysController ( IVP1System sys)

Definition at line 55 of file CaloClusterSysController.cxx.

56  : VP1Controller(sys,"CaloClusterSysController"), m_d(new Imp)
57 {
58  m_d->ui.setupUi(this);
60 
62  setupCollWidgetInScrollArea(m_d->ui.collWidgetScrollArea,m_d->collWidget);
63 
64  initDialog(m_d->ui_display, m_d->ui.pushButton_settings_display);
65  initDialog(m_d->ui_int, m_d->ui.pushButton_settings_interactions);
66  initDialog(m_d->ui_cuts, m_d->ui.pushButton_settings_cuts);
67 
68  m_d->ui_display.widget_drawOptions->setLineWidths(2.0);
69  m_d->ui_display.widget_drawOptions->setPointSizesDisabled();
70  m_d->ui_display.widget_drawOptions->setBaseLightingDisabled();
71  m_d->ui_display.widget_drawOptions->setComplexityDisabled();
72 
73  m_d->ui_cuts.etaPhiCutWidget->setEtaCutEnabled(false);
74 
76  // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
78 
79  // -> Eta cut presets:
80  connect(m_d->ui_cuts.toolButton_quicketa_barrel,SIGNAL(clicked()),this,SLOT(etaCutPresetButtonTriggered()));
81  connect(m_d->ui_cuts.toolButton_quicketa_endcapA,SIGNAL(clicked()),this,SLOT(etaCutPresetButtonTriggered()));
82  connect(m_d->ui_cuts.toolButton_quicketa_endcapC,SIGNAL(clicked()),this,SLOT(etaCutPresetButtonTriggered()));
83 
84  // -> scale:
86  connectToLastUpdateSlot(m_d->ui_display.checkBox_logscale);
87  connectToLastUpdateSlot(m_d->ui_display.radioButton_relativeScale);
88  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_lengthOfMostEnergetic);
89  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_lengthOf10GeV);
90 
91  // -> cutAllowedEnergies:
93  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_Emin);
94  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_Emax);
95  connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_Emin);
96  connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_Emax);
97 
98  // -> cutAllowedEta:
100  connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)));
101 
102  // -> cutAllowedPhi:
104  connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)));
105 
106  // -> showVolumeOutLines
108  connectToLastUpdateSlot(m_d->ui_display.checkBox_showVolumeOutLines);
109 
110  // -> useTransverseEnergies
112  connectToLastUpdateSlot(m_d->ui.radioButton_energyMode_Et);
113  connectToLastUpdateSlot(m_d->ui.radioButton_energyMode_E);
114 
115  initLastVars();
116 }

◆ ~CaloClusterSysController()

CaloClusterSysController::~CaloClusterSysController ( )
virtual

Definition at line 119 of file CaloClusterSysController.cxx.

120 {
121  delete m_d;
122 }

Member Function Documentation

◆ actualRestoreSettings()

void CaloClusterSysController::actualRestoreSettings ( VP1Deserialise s)
virtual

Implements VP1Controller.

Definition at line 153 of file CaloClusterSysController.cxx.

154 {
155  if (s.version()<0||s.version()>3) {
156  message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
157  return;
158  }
159  if (s.version()==0)
160  s.ignoreInt();
161  s.restore(m_d->ui_display.checkBox_logscale);
162  s.restore(m_d->ui_display.radioButton_relativeScale,m_d->ui_display.radioButton_absoluteScale);
163  s.restore(m_d->ui_display.doubleSpinBox_lengthOfMostEnergetic);
164  s.restore(m_d->ui_display.doubleSpinBox_lengthOf10GeV);
165  s.restore(m_d->ui_cuts.checkBox_Emin);
166  s.restore(m_d->ui_cuts.doubleSpinBox_Emin);
167  s.restore(m_d->ui_cuts.checkBox_Emax);
168  s.restore(m_d->ui_cuts.doubleSpinBox_Emax);
169  s.restore(m_d->ui_cuts.etaPhiCutWidget);
170  if (s.version()>=1) {
171  s.restore(m_d->ui_int.checkBox_printinfo);
172  s.restore(m_d->ui_int.checkBox_printinfo_verbose);
173  s.restore(m_d->ui_int.checkBox_zoom);
174  }
175  if (s.version()>=2) {
176  s.restore(m_d->ui_display.checkBox_showVolumeOutLines);
177  s.restore(m_d->ui_display.widget_drawOptions);
178  }
179  if (s.version()>=3)
180  s.restore(m_d->ui.radioButton_energyMode_Et,m_d->ui.radioButton_energyMode_E);
181 }

◆ actualSaveSettings()

void CaloClusterSysController::actualSaveSettings ( VP1Serialise s) const
virtual

Implements VP1Controller.

Definition at line 132 of file CaloClusterSysController.cxx.

133 {
134  //version 0 had an integer here
135  s.save(m_d->ui_display.checkBox_logscale);
136  s.save(m_d->ui_display.radioButton_relativeScale,m_d->ui_display.radioButton_absoluteScale);
137  s.save(m_d->ui_display.doubleSpinBox_lengthOfMostEnergetic);
138  s.save(m_d->ui_display.doubleSpinBox_lengthOf10GeV);
139  s.save(m_d->ui_cuts.checkBox_Emin);
140  s.save(m_d->ui_cuts.doubleSpinBox_Emin);
141  s.save(m_d->ui_cuts.checkBox_Emax);
142  s.save(m_d->ui_cuts.doubleSpinBox_Emax);
143  s.save(m_d->ui_cuts.etaPhiCutWidget);
144  s.save(m_d->ui_int.checkBox_printinfo);//Version 1+
145  s.save(m_d->ui_int.checkBox_printinfo_verbose);//Version 1+
146  s.save(m_d->ui_int.checkBox_zoom);//Version 1+
147  s.save(m_d->ui_display.checkBox_showVolumeOutLines);//Version 2+
148  s.save(m_d->ui_display.widget_drawOptions);//Version 2+
149  s.save(m_d->ui.radioButton_energyMode_Et,m_d->ui.radioButton_energyMode_E);//Version 3+
150 }

◆ addUpdateSlot()

const char * VP1Controller::addUpdateSlot ( const char *  slot)
protectedinherited

Definition at line 318 of file VP1Controller.cxx.

319 {
320  messageVerbose("Adding update slot: "+QString(slot));
321  connect(this,SIGNAL(dummyUpdateTrigger()),this,slot);
322  m_d->lastUpdateSlot = slot;
323  return slot;
324 }

◆ changed()

template<class T >
bool VP1Controller::changed ( T &  lastval,
const T &  newval 
)
protectedinherited

Definition at line 151 of file VP1Controller.h.

152 {
153  if (initVarsMode()) {
154  lastval=newval;
155  return false;
156  }
157  if (lastval==newval)
158  return false;
159  lastval = newval;
160  return true;
161 }

◆ collWidget()

VP1CollectionWidget * CaloClusterSysController::collWidget ( ) const

Definition at line 184 of file CaloClusterSysController.cxx.

185 {
186  return m_d->collWidget;
187 }

◆ collWidgetContentChanged

void VP1Controller::collWidgetContentChanged ( )
slotinherited

Definition at line 232 of file VP1Controller.cxx.

233 {
234  if (sender()!=m_d->collWidget||!m_d->collWidget) {
235  message("ERROR: Unexpected signal in collWidgetContentChanged slot!!");
236  return;
237  }
238  QScrollArea* scrollarea = dynamic_cast<QScrollArea*>(m_d->collWidget->parent());
239  if (!scrollarea&&m_d->collWidget->parent())
240  scrollarea = dynamic_cast<QScrollArea*>(m_d->collWidget->parent()->parent());
241  if (!scrollarea) {
242  message("ERROR: m_d->collWidget not child or grandchild of a scroll area!!");
243  return;
244  }
246  m_d->collWidget->setMinimumWidth(width);
247  m_d->collWidget->setMaximumWidth(width);
248  QScrollBar * sb = scrollarea->verticalScrollBar();
249  if (sb)
250  width+=sb->sizeHint().width();
251  scrollarea->setMinimumWidth(width+2);//2 is just some margin
252 }

◆ connectToLastUpdateSlot() [1/10]

void VP1Controller::connectToLastUpdateSlot ( QButtonGroup *  bg)
protectedinherited

Definition at line 369 of file VP1Controller.cxx.

370 {
371  connectToLastUpdateSlot(bg,SIGNAL(buttonClicked(int)));
372 }

◆ connectToLastUpdateSlot() [2/10]

void VP1Controller::connectToLastUpdateSlot ( QCheckBox *  cb)
protectedinherited

Definition at line 333 of file VP1Controller.cxx.

334 {
335  connectToLastUpdateSlot(cb,SIGNAL(toggled(bool)));
336 }

◆ connectToLastUpdateSlot() [3/10]

void VP1Controller::connectToLastUpdateSlot ( QComboBox *  cb)
protectedinherited

Definition at line 339 of file VP1Controller.cxx.

340 {
341  connectToLastUpdateSlot(cb,SIGNAL(currentIndexChanged(int)));
342 }

◆ connectToLastUpdateSlot() [4/10]

void VP1Controller::connectToLastUpdateSlot ( QDoubleSpinBox *  dsb)
protectedinherited

Definition at line 357 of file VP1Controller.cxx.

358 {
359  connectToLastUpdateSlot(dsb,SIGNAL(valueChanged(double)));
360 }

◆ connectToLastUpdateSlot() [5/10]

void VP1Controller::connectToLastUpdateSlot ( QGroupBox *  gb)
protectedinherited

Definition at line 345 of file VP1Controller.cxx.

346 {
347  connectToLastUpdateSlot(gb,SIGNAL(toggled(bool)));
348 }

◆ connectToLastUpdateSlot() [6/10]

void VP1Controller::connectToLastUpdateSlot ( QObject *  sender,
const char *  signal 
)
protectedinherited

Definition at line 327 of file VP1Controller.cxx.

328 {
329  connect(sender,signal,this,m_d->lastUpdateSlot);
330 }

◆ connectToLastUpdateSlot() [7/10]

void VP1Controller::connectToLastUpdateSlot ( QRadioButton *  rb)
protectedinherited

Definition at line 363 of file VP1Controller.cxx.

364 {
365  connectToLastUpdateSlot(rb,SIGNAL(toggled(bool)));
366 }

◆ connectToLastUpdateSlot() [8/10]

void VP1Controller::connectToLastUpdateSlot ( QSlider *  s)
protectedinherited

Definition at line 375 of file VP1Controller.cxx.

376 {
377  connectToLastUpdateSlot(s,SIGNAL(valueChanged(int)));
378 }

◆ connectToLastUpdateSlot() [9/10]

void VP1Controller::connectToLastUpdateSlot ( QSpinBox *  sb)
protectedinherited

Definition at line 351 of file VP1Controller.cxx.

352 {
353  connectToLastUpdateSlot(sb,SIGNAL(valueChanged(int)));
354 }

◆ connectToLastUpdateSlot() [10/10]

void VP1Controller::connectToLastUpdateSlot ( VP1ColorSelectButton csb)
protectedinherited

Definition at line 381 of file VP1Controller.cxx.

382 {
383  connectToLastUpdateSlot(csb,SIGNAL(colorChanged(const QColor&)));
384 }

◆ currentSettingsVersion()

int CaloClusterSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 126 of file CaloClusterSysController.cxx.

127 {
128  return 3;
129 }

◆ customTourEditor()

static VP1CustomTourEditor* VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61 {return m_customTourEditor;}

◆ cutAllowedEnergies()

VP1Interval CaloClusterSysController::cutAllowedEnergies ( ) const

Definition at line 255 of file CaloClusterSysController.cxx.

256 {
257  const double min = (m_d->ui_cuts.checkBox_Emin->isChecked() ? m_d->ui_cuts.doubleSpinBox_Emin->value()*CLHEP::GeV : -std::numeric_limits<double>::infinity());
258  const double max = (m_d->ui_cuts.checkBox_Emax->isChecked() ? m_d->ui_cuts.doubleSpinBox_Emax->value()*CLHEP::GeV : std::numeric_limits<double>::infinity());
259  if (max<min)
260  return VP1Interval();
261  return VP1Interval( min, max );
262 }

◆ cutAllowedEnergiesChanged

void CaloClusterSysController::cutAllowedEnergiesChanged ( const VP1Interval )
signal

◆ cutAllowedEta()

VP1Interval CaloClusterSysController::cutAllowedEta ( ) const

Definition at line 265 of file CaloClusterSysController.cxx.

266 {
267  return m_d->ui_cuts.etaPhiCutWidget->allowedEta();
268 }

◆ cutAllowedEtaChanged

void CaloClusterSysController::cutAllowedEtaChanged ( const VP1Interval )
signal

◆ cutAllowedPhi()

QList< VP1Interval > CaloClusterSysController::cutAllowedPhi ( ) const

Definition at line 271 of file CaloClusterSysController.cxx.

272 {
273  return m_d->ui_cuts.etaPhiCutWidget->allowedPhi();
274 }

◆ cutAllowedPhiChanged

void CaloClusterSysController::cutAllowedPhiChanged ( const QList< VP1Interval > &  )
signal

◆ defineRadioButtonGroup() [1/2]

QButtonGroup * VP1Controller::defineRadioButtonGroup ( const QList< QRadioButton * > &  l)
protectedinherited

Definition at line 300 of file VP1Controller.cxx.

301 {
302  QRadioButton * rb_checked(0);
303  for (QRadioButton *rb : l) {
304  if (rb->isChecked()) {
305  rb_checked = rb;
306  break;
307  }
308  }
309  QButtonGroup * radiogroup = new QButtonGroup(this);
310  for (QRadioButton *rb : l)
311  radiogroup->addButton(rb);
312  if (rb_checked)
313  rb_checked->setChecked(true);
314  return radiogroup;
315 }

◆ defineRadioButtonGroup() [2/2]

QButtonGroup * VP1Controller::defineRadioButtonGroup ( QRadioButton *  rb0,
QRadioButton *  rb1,
QRadioButton *  rb2 = 0,
QRadioButton *  rb3 = 0,
QRadioButton *  rb4 = 0,
QRadioButton *  rb5 = 0,
QRadioButton *  rb6 = 0,
QRadioButton *  rb7 = 0,
QRadioButton *  rb8 = 0,
QRadioButton *  rb9 = 0 
)
protectedinherited

Definition at line 288 of file VP1Controller.cxx.

292 {
293  QList<QRadioButton *> l;
294  l << rb0 << rb1 << rb2 << rb3 << rb4 << rb5 << rb6 << rb7 << rb8 << rb9;
295  l.removeAll(0);
296  return defineRadioButtonGroup(l);
297 }

◆ drawOptions()

SoGroup * CaloClusterSysController::drawOptions ( ) const

Definition at line 210 of file CaloClusterSysController.cxx.

211 {
212  return m_d->ui_display.widget_drawOptions->drawOptionsGroup();
213 }

◆ dummyUpdateTrigger

void VP1Controller::dummyUpdateTrigger ( )
signalinherited

◆ enabledButtonStateChanged

void VP1Controller::enabledButtonStateChanged ( )
slotinherited

Definition at line 167 of file VP1Controller.cxx.

168 {
169  Imp::DialogInfo * di(0);
170  for (Imp::DialogInfo* di2 : m_d->dialogs) {
171  if (di2->enabledButton==sender()) {
172  di = di2;
173  break;
174  }
175  }
176  if (!di) {
177  message("ERROR: enabledButtonStateChanged() triggered with unrecognised sender() ="
178  +QString(sender()?sender()->objectName():"NULL"));
179  return;
180  }
181 
182  bool on(di->enabledButton->isChecked());
183  if (di->launchButton->isEnabled()!=on)
184  di->launchButton->setEnabled(on);
185  if (!on) {
186  if (di->dialogWidget->isVisible())
187  di->dialogWidget->setVisible(false);
188  if (di->dialogWidget->windowState()==Qt::WindowMinimized)
189  di->dialogWidget->setWindowState(Qt::WindowNoState);
190  }
191 }

◆ etaCutPresetButtonTriggered

void CaloClusterSysController::etaCutPresetButtonTriggered ( )
privateslot

Definition at line 191 of file CaloClusterSysController.cxx.

192 {
193  const double cracketa = VP1CaloClusterCollection::crackEta();
194  bool save = m_d->ui_cuts.etaPhiCutWidget->blockSignals(true);
195 
196  if (sender()==m_d->ui_cuts.toolButton_quicketa_barrel)
197  m_d->ui_cuts.etaPhiCutWidget->setEtaCut(cracketa);
198  else if (sender()==m_d->ui_cuts.toolButton_quicketa_endcapA)
199  m_d->ui_cuts.etaPhiCutWidget->setEtaCut(cracketa,9.0);
200  else if (sender()==m_d->ui_cuts.toolButton_quicketa_endcapC)
201  m_d->ui_cuts.etaPhiCutWidget->setEtaCut(-9.0,-cracketa);
202  else
203  message("ERROR: Unknown sender() in etaCutPresetButtonTriggered() slot.");
204 
205  m_d->ui_cuts.etaPhiCutWidget->blockSignals(save);
207 }

◆ fallBackMaterial()

SoMaterial * VP1Controller::fallBackMaterial ( ) const
protectedinherited

Definition at line 427 of file VP1Controller.cxx.

428 {
429  if (!m_d->fallBackMaterial) {
430  m_d->fallBackMaterial = new SoMaterial;
431  m_d->fallBackMaterial->ref();
432  }
433  return m_d->fallBackMaterial;
434 }

◆ getMaterial()

SoMaterial * VP1Controller::getMaterial ( VP1MaterialButton mb) const
protectedinherited

Definition at line 437 of file VP1Controller.cxx.

438 {
439  if (!mb) {
440  message("ERROR: Null material button pointer");
441  return fallBackMaterial();
442  }
443  QList<SoMaterial*> mats = mb->handledMaterials();
444  if (mats.count()!=1) {
445  message("ERROR: No material in button "+mb->objectName());
446  return fallBackMaterial();
447  }
448  return mats.at(0);
449 
450 
451 }

◆ helperClassName()

const QString& VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51 { return m_helpername; }

◆ initDialog() [1/2]

void VP1Controller::initDialog ( QWidget *  dialog,
QPushButton *  launchbutton,
QPushButton *  closebutton,
QAbstractButton *  enabledButton = 0 
)
protectedinherited

Definition at line 123 of file VP1Controller.cxx.

124 {
125  QString txt(enabledButton?enabledButton->text():launchButton->text());
126  txt.replace("&&","&");
127  dialog->setWindowTitle(txt+" ["+systemBase()->name()+"]");
128  dialog->setWindowIcon(QIcon(QString(":/vp1/icons/icons/3d_32x32.png")));
129  launchButton->setMaximumHeight(static_cast<int>(0.5+QFontMetricsF(launchButton->font()).height()*1.05+2));
130  launchButton->setMinimumHeight(launchButton->maximumHeight());
131  launchButton->setCheckable(true);
132 
133  QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
134  sizePolicy.setHorizontalStretch(0);
135  sizePolicy.setVerticalStretch(0);
136  sizePolicy.setHeightForWidth(launchButton->sizePolicy().hasHeightForWidth());
137  launchButton->setSizePolicy(sizePolicy);
138  launchButton->setFocusPolicy(Qt::NoFocus);
139 
140  if (enabledButton)
141  launchButton->setEnabled(enabledButton->isChecked());
142 
143  m_d->dialogs << new Imp::DialogInfo(launchButton,dialog,enabledButton);
144 
145  connect(launchButton,SIGNAL(clicked()),this,SLOT(toggleDialogState()));
146  if (enabledButton)
147  connect(enabledButton,SIGNAL(toggled(bool)),this,SLOT(enabledButtonStateChanged()));
148  CloseEventEater* closeEventEater = new CloseEventEater(this);
149  dialog->installEventFilter(closeEventEater);
150 
151  if(closeButton) {
152  closeButton->setText("&Close");
153  closeButton->setToolTip("Close this dialog [Esc]");
154  connect(closeButton,SIGNAL(clicked()),dialog,SLOT(close()));
155  }
156  connect(new QShortcut(QKeySequence(Qt::Key_Escape), dialog),SIGNAL(activated()),dialog,SLOT(close()));
157 
158  //To avoid an extra call in the code we do this a few times more than necessary (fixme: put in initLastVars!!):
159  int maxwidth(0);
160  for (Imp::DialogInfo* di : m_d->dialogs)
161  maxwidth = std::max(maxwidth,di->launchButton->sizeHint().width());
162  for (Imp::DialogInfo* di : m_d->dialogs)
163  di->launchButton->setMinimumWidth(maxwidth);
164 }

◆ initDialog() [2/2]

template<class T >
void VP1Controller::initDialog ( T &  theUI,
QPushButton *  launchbutton,
QAbstractButton *  enabledButton = 0 
)
protectedinherited

Definition at line 144 of file VP1Controller.h.

144  {
145  QWidget * w = new QWidget(0,Qt::WindowStaysOnTopHint);
146  theUI.setupUi(w);
147  initDialog(w, launchbutton, theUI.pushButton_close,enabledButton);
148 }

◆ initLastVars()

void VP1Controller::initLastVars ( )
inherited

Definition at line 68 of file VP1Controller.cxx.

69 {
70  m_initVarsMode = true;
72  m_initVarsMode = false;
73 }

◆ initVarsMode()

bool VP1Controller::initVarsMode ( ) const
inlineprotectedinherited

Definition at line 97 of file VP1Controller.h.

97 { return m_initVarsMode; }

◆ message() [1/3]

void VP1HelperClassBase::message ( const QString &  str) const
inherited

Definition at line 49 of file VP1HelperClassBase.cxx.

50 {
51  if (m_helpername.isEmpty()) {
52  if (m_system)
54  else
55  std::cout<<VP1Msg::prefix_msg()<<" [nameless helper class]: "<<str.toStdString()<<std::endl;
56  } else {
57  if (m_system)
58  m_system->message("["+m_helpername+"] " + str);
59  else
60  std::cout<<VP1Msg::prefix_msg()<<" ["<<m_helpername.toStdString()<<"]: "<<str.toStdString()<<std::endl;
61  }
62 }

◆ message() [2/3]

void VP1HelperClassBase::message ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 131 of file VP1HelperClassBase.cxx.

132 {
133  if (addtostart.isEmpty()) {
134  message(l,addtoend);
135  return;
136  }
137  if (addtoend.isEmpty()) {
138  for (const QString& s : l)
139  message(addtostart+s);
140  } else {
141  for (const QString& s : l)
142  message(addtostart+s+addtoend);
143  }
144 }

◆ message() [3/3]

void VP1HelperClassBase::message ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 91 of file VP1HelperClassBase.cxx.

92 {
93  if (addtoend.isEmpty()) {
94  for (const QString& s : l)
95  message(s);
96  } else {
97  for (const QString& s : l)
98  message(s+addtoend);
99  }
100 }

◆ messageDebug() [1/3]

void VP1HelperClassBase::messageDebug ( const QString &  str) const
inherited

Definition at line 65 of file VP1HelperClassBase.cxx.

66 {
67  if (!VP1Msg::debug())
68  return;
69  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
70  if (m_helpername.isEmpty()) {
71  std::cout<<VP1Msg::prefix_debug()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
72  } else {
73  std::cout<<VP1Msg::prefix_debug()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
74  }
75 }

◆ messageDebug() [2/3]

void VP1HelperClassBase::messageDebug ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 147 of file VP1HelperClassBase.cxx.

148 {
149  if (!VP1Msg::debug())
150  return;
151  if (addtostart.isEmpty()) {
152  messageDebug(l,addtoend);
153  return;
154  }
155  if (addtoend.isEmpty()) {
156  for (const QString& s : l)
157  messageDebug(addtostart+s);
158  } else {
159  for (const QString& s : l)
160  messageDebug(addtostart+s+addtoend);
161  }
162 }

◆ messageDebug() [3/3]

void VP1HelperClassBase::messageDebug ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 103 of file VP1HelperClassBase.cxx.

104 {
105  if (!VP1Msg::debug())
106  return;
107  if (addtoend.isEmpty()) {
108  for (const QString& s : l)
109  messageDebug(s);
110  } else {
111  for (const QString& s : l)
112  messageDebug(s+addtoend);
113  }
114 }

◆ messageVerbose() [1/3]

void VP1HelperClassBase::messageVerbose ( const QString &  str) const
inherited

Definition at line 78 of file VP1HelperClassBase.cxx.

79 {
80  if (!VP1Msg::verbose())
81  return;
82  std::string sysstring(m_system ? " in "+m_system->name().toStdString() : std::string(""));
83  if (m_helpername.isEmpty()) {
84  std::cout<<VP1Msg::prefix_verbose()<<" [helper"<<sysstring<<"]: "<<str.toStdString()<<std::endl;
85  } else {
86  std::cout<<VP1Msg::prefix_verbose()<<" ["<<m_helpername.toStdString()<<sysstring<<"]: "<<str.toStdString()<<std::endl;
87  }
88 }

◆ messageVerbose() [2/3]

void VP1HelperClassBase::messageVerbose ( const QString &  addtostart,
const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 165 of file VP1HelperClassBase.cxx.

166 {
167  if (!VP1Msg::verbose())
168  return;
169  if (addtostart.isEmpty()) {
170  messageVerbose(l,addtoend);
171  return;
172  }
173  if (addtoend.isEmpty()) {
174  for (const QString& s : l)
175  messageVerbose(addtostart+s);
176  } else {
177  for (const QString& s : l)
178  messageVerbose(addtostart+s+addtoend);
179  }
180 }

◆ messageVerbose() [3/3]

void VP1HelperClassBase::messageVerbose ( const QStringList &  l,
const QString &  addtoend = "" 
) const
inherited

Definition at line 117 of file VP1HelperClassBase.cxx.

118 {
119  if (!VP1Msg::verbose())
120  return;
121  if (addtoend.isEmpty()) {
122  for (const QString& s : l)
123  messageVerbose(s);
124  } else {
125  for (const QString& s : l)
126  messageVerbose(s+addtoend);
127  }
128 }

◆ possibleChange_cutAllowedEnergies

void CaloClusterSysController::possibleChange_cutAllowedEnergies ( )
privateslot

◆ possibleChange_cutAllowedEta

void CaloClusterSysController::possibleChange_cutAllowedEta ( )
privateslot

◆ possibleChange_cutAllowedPhi

void CaloClusterSysController::possibleChange_cutAllowedPhi ( )
privateslot

◆ possibleChange_scale

void CaloClusterSysController::possibleChange_scale ( )
slot

◆ possibleChange_showVolumeOutLines

void CaloClusterSysController::possibleChange_showVolumeOutLines ( )
privateslot

◆ possibleChange_useTransverseEnergies

void CaloClusterSysController::possibleChange_useTransverseEnergies ( )
privateslot

◆ printInfoOnClick()

bool CaloClusterSysController::printInfoOnClick ( ) const

Definition at line 216 of file CaloClusterSysController.cxx.

216 { return m_d->ui_int.checkBox_printinfo->isChecked(); }

◆ printVerboseInfoOnClick()

bool CaloClusterSysController::printVerboseInfoOnClick ( ) const

Definition at line 217 of file CaloClusterSysController.cxx.

217 { return m_d->ui_int.checkBox_printinfo_verbose->isChecked(); }

◆ restoreSettings()

void VP1Controller::restoreSettings ( const QByteArray &  ba)
inherited

Definition at line 387 of file VP1Controller.cxx.

388 {
389  messageDebug("VP1Controller::restoreSettings()");
390 
393 
394  //warn unrestored:
395  if (m_d->collWidget)
396  s.ignoreWidget(m_d->collWidget);
397  s.warnUnrestored((QWidget*)(this));
398  for (Imp::DialogInfo* di : m_d->dialogs)
399  s.warnUnrestored(di->dialogWidget);
400 
401  QTimer::singleShot(0, this, SLOT(testForChanges()));
402 }

◆ saveSettings()

QByteArray VP1Controller::saveSettings ( ) const
inherited

Definition at line 405 of file VP1Controller.cxx.

406 {
407  messageDebug("VP1Controller::saveSettings()");
408 
410 
411  messageDebug("calling actualSaveSettings()...");
413 
414  //Warn unsaved:
415  if (m_d->collWidget)
416  s.ignoreWidget(m_d->collWidget);
417 
418  s.warnUnsaved((QWidget*)(this));
419  for (Imp::DialogInfo* di : m_d->dialogs)
420  s.warnUnsaved(di->dialogWidget);
421 
422  return s.result();
423 
424 }

◆ scale()

QPair< bool, double > CaloClusterSysController::scale ( ) const

Definition at line 221 of file CaloClusterSysController.cxx.

222 {
223  const bool relative = m_d->ui_display.radioButton_relativeScale->isChecked();
224  const bool logscale = m_d->ui_display.checkBox_logscale->isChecked();
225 
226  double highestvisibleenergy=0*CLHEP::eV;
228  VP1CaloClusterCollection* col = dynamic_cast<VP1CaloClusterCollection*>(stdcol);
229  if ( col && highestvisibleenergy < col->highestVisibleClusterEnergy() )
230  highestvisibleenergy = col->highestVisibleClusterEnergy();
231  }
232  if (m_d->gui_mostEnergetic!=highestvisibleenergy) {
233  m_d->gui_mostEnergetic=highestvisibleenergy;
234  m_d->ui_display.label_current_most_energetic->setText("Current value: "+QString::number(m_d->gui_mostEnergetic/CLHEP::GeV,'f',2)+" GeV");
235  }
236 
237  const double length = (relative ? m_d->ui_display.doubleSpinBox_lengthOfMostEnergetic->value()*CLHEP::m
238  : m_d->ui_display.doubleSpinBox_lengthOf10GeV->value()*CLHEP::m );
239  const double energy = relative ? highestvisibleenergy : 10*CLHEP::GeV;
240  const double minscale = 1*CLHEP::mm/(1*CLHEP::GeV);
241  const double maxscale = 1*CLHEP::m/(1*CLHEP::MeV);
242  double scl;
243  if (energy<=0)
244  scl = maxscale;
245  else
246  scl = logscale ? length/log(1+fabs(energy)) :length/energy;
247  if (scl!=scl||scl>maxscale)
248  scl = maxscale;
249  if (scl<minscale)
250  scl = minscale;
251  return QPair<bool,double>(logscale,scl);
252 }

◆ scaleChanged

void CaloClusterSysController::scaleChanged ( const QPair< bool, double > &  )
signal

◆ setCustomTourEditor()

static void VP1Controller::setCustomTourEditor ( VP1CustomTourEditor editor)
inlinestaticinherited

Definition at line 60 of file VP1Controller.h.

60 { m_customTourEditor=editor;}

◆ setHelperClassName()

void VP1HelperClassBase::setHelperClassName ( const QString &  n)
inlineprotectedinherited

Definition at line 59 of file VP1HelperClassBase.h.

59 { m_helpername = n; }

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

198 {
199  m_system = sys;
200  if (VP1Msg::verbose()){
201  vp1helperclassbase_instanceMap[this] = (m_system?m_system->name():QString(""));
202  }
203 }

◆ setupCollWidgetInScrollArea()

void VP1Controller::setupCollWidgetInScrollArea ( QScrollArea *  scrollarea,
VP1CollectionWidget collWidget 
)
protectedinherited

Definition at line 255 of file VP1Controller.cxx.

256 {
257  if (!scrollarea || !collWidget) {
258  message("ERROR: NULL scrollarea or collWidget");
259  return;
260  }
261  QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
262  sizePolicy.setHorizontalStretch(0);
263  sizePolicy.setVerticalStretch(scrollarea->sizePolicy().verticalStretch());
264  sizePolicy.setHeightForWidth(scrollarea->sizePolicy().hasHeightForWidth());
265  scrollarea->setSizePolicy(sizePolicy);
266 
267  collWidget->setContentsMargins(0,0,0,0);
268  if (!collWidget->children().isEmpty()&&collWidget->children().at(0)->isWidgetType()) {
269  static_cast<QWidget*>(collWidget->children().at(0))->setContentsMargins(0,0,0,0);
270  }
271  scrollarea->setContentsMargins(0,0,0,0);
272 
273  scrollarea->setWidgetResizable(true);
274  scrollarea->setFrameShape(QFrame::NoFrame);
275  scrollarea->setFrameShadow(QFrame::Plain);
276  collWidget->setParent(scrollarea);
277  scrollarea->setWidget(collWidget);
278  scrollarea->viewport()->setContentsMargins(0,0,0,0);
279  scrollarea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
280  collWidget->setObjectName(objectName()+"_CollWidget");
281  scrollarea->setObjectName(objectName()+"_CollWidgetScrollArea");
282  m_d->collWidget = collWidget;
283  connect(collWidget,SIGNAL(visibleContentsChanged()),this,SLOT(collWidgetContentChanged()));
284 }

◆ showVolumeOutLines()

bool CaloClusterSysController::showVolumeOutLines ( ) const

Definition at line 277 of file CaloClusterSysController.cxx.

278 {
279  return m_d->ui_display.checkBox_showVolumeOutLines->isChecked();
280 }

◆ showVolumeOutLinesChanged

void CaloClusterSysController::showVolumeOutLinesChanged ( bool  )
signal

◆ str() [1/30]

static QString VP1String::str ( const Amg::Vector3D t)
inlinestaticinherited

Definition at line 98 of file VP1String.h.

98 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [2/30]

static QString VP1String::str ( const bool  b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

53 { return b?"True":"False"; }

◆ str() [3/30]

static QString VP1String::str ( const char *  c)
inlinestaticinherited

Definition at line 50 of file VP1String.h.

50 { return c; }

◆ str() [4/30]

static QString VP1String::str ( const double &  d)
inlinestaticinherited

Definition at line 81 of file VP1String.h.

81 { return QString::number(d); }

◆ str() [5/30]

static QString VP1String::str ( const float &  f)
inlinestaticinherited

Definition at line 82 of file VP1String.h.

82 { return QString::number(f); }

◆ str() [6/30]

template<class T >
static QString VP1String::str ( const HepGeom::BasicVector3D< T > &  t)
inlinestaticinherited

Definition at line 95 of file VP1String.h.

95 { return "("+str(t.x())+", "+str(t.y())+", "+str(t.z())+")"; }

◆ str() [7/30]

QString VP1String::str ( const QColor &  c)
staticinherited

Definition at line 30 of file VP1String.cxx.

31 {
32  return c.isValid() ? c.name() : "Invalid";
33 }

◆ str() [8/30]

template<class T >
static QString VP1String::str ( const QFlags< T > &  f)
inlinestaticinherited

Definition at line 91 of file VP1String.h.

91 { return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }

◆ str() [9/30]

template<class T >
static QString VP1String::str ( const QList< T > &  t)
inlinestaticinherited

Definition at line 102 of file VP1String.h.

102 { return "QList of size"+QString::number(t.size()); }

◆ str() [10/30]

static QString VP1String::str ( const QString &  s)
inlinestaticinherited

Definition at line 49 of file VP1String.h.

49 { return s; }

◆ str() [11/30]

QString VP1String::str ( const SbColor &  c)
staticinherited

Definition at line 36 of file VP1String.cxx.

37 {
39 }

◆ str() [12/30]

QString VP1String::str ( const SbVec2d &  v)
staticinherited

Definition at line 61 of file VP1String.cxx.

61 { double x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [13/30]

QString VP1String::str ( const SbVec2f &  v)
staticinherited

Definition at line 62 of file VP1String.cxx.

62 { float x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [14/30]

QString VP1String::str ( const SbVec2s &  v)
staticinherited

Definition at line 63 of file VP1String.cxx.

63 { short x,y; v.getValue(x,y); return "("+str(x)+", "+str(y)+")"; }

◆ str() [15/30]

QString VP1String::str ( const SbVec3d &  v)
staticinherited

Definition at line 64 of file VP1String.cxx.

64 { double x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [16/30]

QString VP1String::str ( const SbVec3f &  v)
staticinherited

Definition at line 65 of file VP1String.cxx.

65 { float x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [17/30]

QString VP1String::str ( const SbVec3s &  v)
staticinherited

Definition at line 66 of file VP1String.cxx.

66 { short x,y,z; v.getValue(x,y,z); return "("+str(x)+", "+str(y)+", "+str(z)+")"; }

◆ str() [18/30]

QString VP1String::str ( const SbVec4d &  v)
staticinherited

Definition at line 67 of file VP1String.cxx.

67 { double x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [19/30]

QString VP1String::str ( const SbVec4f &  v)
staticinherited

Definition at line 68 of file VP1String.cxx.

68 { float x,y,z,t; v.getValue(x,y,z,t); return "("+str(x)+", "+str(y)+", "+str(z)+", "+str(t)+")"; }

◆ str() [20/30]

template<class T >
static QString VP1String::str ( const T *  t)
inlinestaticinherited

Definition at line 87 of file VP1String.h.

87 { return str(static_cast<const void* >(t)); }

◆ str() [21/30]

QString VP1String::str ( const void *  p)
staticinherited

Definition at line 48 of file VP1String.cxx.

49 {
50  if (p) {
51  std::ostringstream s;
52  s << p;
53  // Explicitly naming QString here avoids a cppcheck warning.
54  return QString (s.str().c_str());
55  } else {
56  return "NULL";
57  }
58 }

◆ str() [22/30]

QString VP1String::str ( const VP1Interval i)
staticinherited

Definition at line 42 of file VP1String.cxx.

43 {
44  return i.toString();
45 }

◆ str() [23/30]

static QString VP1String::str ( int  n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

77 { return QString::number(n); }

◆ str() [24/30]

static QString VP1String::str ( long  n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

75 { return QString::number(n); }

◆ str() [25/30]

static QString VP1String::str ( qlonglong  n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

79 { return QString::number(n); }

◆ str() [26/30]

static QString VP1String::str ( qulonglong  n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

80 { return QString::number(n); }

◆ str() [27/30]

static QString VP1String::str ( short int  n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

73 { return QString::number(n); }

◆ str() [28/30]

static QString VP1String::str ( uint  n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

78 { return QString::number(n); }

◆ str() [29/30]

static QString VP1String::str ( ulong  n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

76 { return QString::number(n); }

◆ str() [30/30]

static QString VP1String::str ( unsigned short int  n)
inlinestaticinherited

Definition at line 74 of file VP1String.h.

74 { return QString::number(n); }

◆ systemBase()

IVP1System* VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50 { return m_system; }

◆ testForChanges

void VP1Controller::testForChanges ( )
inlineprotectedslotinherited

Definition at line 112 of file VP1Controller.h.

112 { dummyUpdateTrigger(); }

◆ toggleDialogState

void VP1Controller::toggleDialogState ( QObject *  widget = 0)
slotinherited

Definition at line 194 of file VP1Controller.cxx.

195 {
196  Imp::DialogInfo * di(0);
197  for (Imp::DialogInfo* di2 : m_d->dialogs) {
198  if (di2->launchButton==sender() || (widget && di2->dialogWidget==widget)) {
199  di = di2;
200  break;
201  }
202  }
203 
204  if (!di) {
205  message("ERROR: toggleDialogState() triggered with unrecognised sender() ="
206  +QString(sender()?sender()->objectName():"NULL"));
207  return;
208  }
209 
210  bool oldvis = di->dialogWidget->isVisible();
211 
212  if (oldvis&&di->dialogWidget->windowState()==Qt::WindowMinimized) {
213  di->dialogWidget->setWindowState(Qt::WindowNoState);
214  } else {
215  di->dialogWidget->setVisible(!oldvis);
216  if (!oldvis && di->neverShown) {
217  di->neverShown = false;
218  //do stuff
219  // QSize size(955, 717);
220  // size = size.expandedTo(VP1MainWindow->minimumSizeHint());
221  // di->dialogWidget->resize(di->dialogWidget->minimumSizeHint());
222  }
223  }
224 
225  //synchronise toggle button state (for example if this was called by CloseEventEater)
226  if (di->launchButton->isCheckable() && oldvis){
227  di->launchButton->setChecked(false);
228  }
229 }

◆ toString() [1/5]

QString VP1Controller::toString ( const bool &  par)
staticprotectedinherited

Definition at line 100 of file VP1Controller.cxx.

101 {
102  return par?"On":"Off";
103 }

◆ toString() [2/5]

QString VP1Controller::toString ( const QList< VP1Interval > &  l)
staticprotectedinherited

Definition at line 106 of file VP1Controller.cxx.

107 {
108  QString s;
109  for(int i=0;i<l.count();++i)
110  s+= l.at(i).toString()+(i==l.count()-1?"":", ");
111  return s;
112 }

◆ toString() [3/5]

QString CaloClusterSysController::toString ( const QPair< bool, double > &  par)
staticprivate

Definition at line 49 of file CaloClusterSysController.cxx.

50 {
51  return "<"+QString(par.first?"log":"linear")+", "+QString::number(par.second/(CLHEP::cm/CLHEP::GeV))+" cm/GeV>";
52 }

◆ toString() [4/5]

template<class T >
static QString CaloClusterSysController::toString ( const T &  t)
inlinestaticprivate

Definition at line 84 of file CaloClusterSysController.h.

84 { return VP1Controller::toString(t); }//unhide base methods

◆ toString() [5/5]

QString VP1Controller::toString ( SbColor4f  p)
staticprotectedinherited

Definition at line 115 of file VP1Controller.cxx.

116 {
117  float r, g, b, a;
118  p.getValue(r, g, b, a);
119  return "("+str(r)+", "+str(g)+", "+str(b)+", "+str(1-a)+")";
120 }

◆ useTransverseEnergies()

bool CaloClusterSysController::useTransverseEnergies ( ) const

Definition at line 282 of file CaloClusterSysController.cxx.

283 {
284  return m_d->ui.radioButton_energyMode_Et->isChecked();
285 }

◆ useTransverseEnergiesChanged

void CaloClusterSysController::useTransverseEnergiesChanged ( bool  )
signal

◆ verbose()

static bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

32 { return s_vp1verbose; } // Returns true if env var VP1_VERBOSE_OUTPUT=1

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184 {
185  if (vp1helperclassbase_instanceMap.empty())
186  return;
187  std::cout << "WARNING: Detected "<<vp1helperclassbase_instanceMap.size()<<" undeleted helper class instances:"<<std::endl;
188 
189  std::map<VP1HelperClassBase*,QString>::iterator it,itE(vp1helperclassbase_instanceMap.end());
190  for (it = vp1helperclassbase_instanceMap.begin();it!=itE;++it) {
191  std::cout << " ==> "<<it->first<<": "<<it->first->m_helpername.toStdString()
192  << (it->second.isEmpty()?QString(""):" (in system "+it->second+")").toStdString()<<std::endl;
193  }
194 }

◆ zoomOnClick()

bool CaloClusterSysController::zoomOnClick ( ) const

Definition at line 218 of file CaloClusterSysController.cxx.

218 { return m_d->ui_int.checkBox_zoom->isChecked(); }

Member Data Documentation

◆ m_customTourEditor

VP1CustomTourEditor * VP1Controller::m_customTourEditor =0
staticprivateinherited

Definition at line 125 of file VP1Controller.h.

◆ m_d

Imp* CaloClusterSysController::m_d
private

Definition at line 81 of file CaloClusterSysController.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_initVarsMode

bool VP1Controller::m_initVarsMode
privateinherited

Definition at line 129 of file VP1Controller.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

const bool VP1HelperClassBase::s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")
staticprivateinherited

Definition at line 69 of file VP1HelperClassBase.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1Controller::defineRadioButtonGroup
QButtonGroup * defineRadioButtonGroup(QRadioButton *rb0, QRadioButton *rb1, QRadioButton *rb2=0, QRadioButton *rb3=0, QRadioButton *rb4=0, QRadioButton *rb5=0, QRadioButton *rb6=0, QRadioButton *rb7=0, QRadioButton *rb8=0, QRadioButton *rb9=0)
Definition: VP1Controller.cxx:288
VP1Controller::addUpdateSlot
const char * addUpdateSlot(const char *slot)
Definition: VP1Controller.cxx:318
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
VP1Controller::setupCollWidgetInScrollArea
void setupCollWidgetInScrollArea(QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
Definition: VP1Controller.cxx:255
CaloClusterSysController::possibleChange_cutAllowedEta
void possibleChange_cutAllowedEta()
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
VP1Controller::toString
static QString toString(const T &par)
Definition: VP1Controller.h:138
VP1Serialise
Definition: VP1Serialise.h:45
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
StandaloneBunchgroupHandler.bg
bg
Definition: StandaloneBunchgroupHandler.py:243
VP1Controller::Imp::lastUpdateSlot
const char * lastUpdateSlot
Definition: VP1Controller.cxx:49
VP1Controller::dummyUpdateTrigger
void dummyUpdateTrigger()
VP1Controller::VP1Controller
VP1Controller(IVP1System *sys, const QString &classname)
Definition: VP1Controller.cxx:76
CaloClusterSysController::Imp::collWidget
VP1CollectionWidget * collWidget
Definition: CaloClusterSysController.cxx:36
WriteCellNoiseToCool.rb
rb
Definition: WriteCellNoiseToCool.py:229
hist_file_dump.d
d
Definition: hist_file_dump.py:137
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
CaloClusterSysController::possibleChange_cutAllowedEnergies
void possibleChange_cutAllowedEnergies()
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
VP1HelperClassBase::m_helpername
QString m_helpername
Definition: VP1HelperClassBase.h:67
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
VP1Controller::fallBackMaterial
SoMaterial * fallBackMaterial() const
Definition: VP1Controller.cxx:427
VP1HelperClassBase::s_vp1verbose
static const bool s_vp1verbose
Definition: VP1HelperClassBase.h:69
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
VP1Controller::initDialog
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
Definition: VP1Controller.h:144
VP1Controller::Imp::collWidget
VP1CollectionWidget * collWidget
Definition: VP1Controller.cxx:50
skel.it
it
Definition: skel.GENtoEVGEN.py:396
VP1Controller::actualSaveSettings
virtual void actualSaveSettings(VP1Serialise &) const =0
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
VP1HelperClassBase::m_system
IVP1System * m_system
Definition: VP1HelperClassBase.h:68
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloClusterSysController::Imp::ui
Ui::VP1CaloClusterControllerForm ui
Definition: CaloClusterSysController.cxx:32
x
#define x
VP1String::str
static QString str(const QString &s)
Definition: VP1String.h:49
VP1HelperClassBase::messageDebug
void messageDebug(const QString &) const
Definition: VP1HelperClassBase.cxx:65
VP1Controller::connectToLastUpdateSlot
void connectToLastUpdateSlot(QObject *sender, const char *signal)
Definition: VP1Controller.cxx:327
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
VP1Controller::initVarsMode
bool initVarsMode() const
Definition: VP1Controller.h:97
CaloClusterSysController::Imp::ui_cuts
Ui::CaloClusterSysSettingsCutsForm ui_cuts
Definition: CaloClusterSysController.cxx:33
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloClusterSysController::possibleChange_scale
void possibleChange_scale()
CaloClusterSysController::Imp::gui_mostEnergetic
double gui_mostEnergetic
Definition: CaloClusterSysController.cxx:38
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1Controller::Imp::fallBackMaterial
SoMaterial * fallBackMaterial
Definition: VP1Controller.cxx:64
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
VP1CaloClusterCollection
Definition: VP1CaloClusterCollection.h:28
VP1Controller::m_d
Imp * m_d
Definition: VP1Controller.h:127
VP1Controller::m_initVarsMode
bool m_initVarsMode
Definition: VP1Controller.h:129
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
hist_file_dump.f
f
Definition: hist_file_dump.py:135
VP1CollectionWidget::appropriateFixedWidth
int appropriateFixedWidth() const
Definition: VP1CollectionWidget.cxx:276
VP1Deserialise
Definition: VP1Deserialise.h:44
CaloClusterSysController::etaCutPresetButtonTriggered
void etaCutPresetButtonTriggered()
Definition: CaloClusterSysController.cxx:191
CaloClusterSysController::m_d
Imp * m_d
Definition: CaloClusterSysController.h:80
CloseEventEater
Definition: CloseEventEater.h:12
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1142
CaloClusterSysController::Imp::ui_display
Ui::CaloClusterSysSettingsDisplayForm ui_display
Definition: CaloClusterSysController.cxx:35
keylayer_zslicemap.sb
sb
Definition: keylayer_zslicemap.py:192
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
python.SystemOfUnits.eV
int eV
Definition: SystemOfUnits.py:155
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1CollectionWidget::visibleStdCollections
QList< VP1StdCollection * > visibleStdCollections() const
Definition: VP1CollectionWidget.cxx:330
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
VP1CaloClusterCollection::crackEta
static double crackEta()
Definition: VP1CaloClusterCollection.cxx:158
query_example.col
col
Definition: query_example.py:7
VP1Controller::Imp::dialogs
QList< DialogInfo * > dialogs
Definition: VP1Controller.cxx:62
VP1Controller::actualRestoreSettings
virtual void actualRestoreSettings(VP1Deserialise &)=0
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
python.PyAthena.v
v
Definition: PyAthena.py:154
CaloClusterSysController::possibleChange_useTransverseEnergies
void possibleChange_useTransverseEnergies()
VP1Msg::prefix_verbose
static const char * prefix_verbose()
Definition: VP1Msg.h:59
VP1Interval
Definition: VP1Interval.h:23
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
VP1CollectionWidget
Definition: VP1CollectionWidget.h:32
VP1Controller::testForChanges
void testForChanges()
Definition: VP1Controller.h:112
TRT_PAI_physicsConstants::mb
const double mb
1mb to cm2
Definition: TRT_PAI_physicsConstants.h:15
CaloClusterSysController::Imp::ui_int
Ui::CaloClusterSysSettingsInteractionsForm ui_int
Definition: CaloClusterSysController.cxx:34
VP1Controller::collWidgetContentChanged
void collWidgetContentChanged()
Definition: VP1Controller.cxx:232
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
VP1Controller::enabledButtonStateChanged
void enabledButtonStateChanged()
Definition: VP1Controller.cxx:167
CaloClusterSysController::possibleChange_showVolumeOutLines
void possibleChange_showVolumeOutLines()
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
str
Definition: BTagTrackIpAccessor.cxx:11
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
VP1StdCollection
Definition: VP1StdCollection.h:31
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
VP1Controller::toggleDialogState
void toggleDialogState(QObject *widget=0)
Definition: VP1Controller.cxx:194
CaloClusterSysController::possibleChange_cutAllowedPhi
void possibleChange_cutAllowedPhi()
python.compressB64.c
def c
Definition: compressB64.py:93
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
VP1Controller::initLastVars
void initLastVars()
Definition: VP1Controller.cxx:68
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
VP1Controller::m_customTourEditor
static VP1CustomTourEditor * m_customTourEditor
Definition: VP1Controller.h:125
VP1Controller::currentSettingsVersion
virtual int currentSettingsVersion() const =0