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
VertexSysController Class Reference

#include <VertexSysController.h>

Inheritance diagram for VertexSysController:
Collaboration diagram for VertexSysController:

Classes

class  Imp
 

Public Slots

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

Signals

void rerandomise ()
 
void truthCutAllowedEtaChanged (const VP1Interval &)
 
void truthCutAllowedPhiChanged (const QList< VP1Interval > &)
 
void truthCutPrimaryVertexOnlyChanged (bool)
 
void truthCutQuantityChanged (const QPair< VertexCommonFlags::QUANTITY, VP1Interval > &)
 
void truthCrossLengthChanged (QPair< VertexCommonFlags::QUANTITY, double >)
 
void reconCutAllowedTypesChanged (VertexCommonFlags::ReconVertexTypeFlags)
 
void reconVertexRepresentationChanged (const double &)
 
void dummyUpdateTrigger ()
 

Public Member Functions

 VertexSysController (IVP1System *sys)
 
virtual ~VertexSysController ()
 
void actualRestoreSettings (VP1Deserialise &)
 
int currentSettingsVersion () const
 
void actualSaveSettings (VP1Serialise &) const
 
VP1CollectionWidgetcollWidget () const
 
SoGroup * drawOptions () const
 
bool printInfoOnClick () const
 
bool printVerboseInfoOnClick () const
 
bool zoomOnClick () const
 
bool truthCutPrimaryVertexOnly () const
 
QPair< VertexCommonFlags::QUANTITY, VP1IntervaltruthCutQuantity () const
 
VP1Interval truthCutAllowedEta () const
 
QList< VP1IntervaltruthCutAllowedPhi () const
 
QPair< VertexCommonFlags::QUANTITY, double > truthCrossLength () const
 
VertexCommonFlags::ReconVertexTypeFlags reconCutAllowedTypes () const
 
double reconVertexRepresentation () const
 
void initLastVars ()
 
QByteArray saveSettings () const
 
void restoreSettings (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
 
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 (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 emitRerandomise ()
 
void possibleChange_truthCutAllowedEta ()
 
void possibleChange_truthCutAllowedPhi ()
 
void possibleChange_truthCutPrimaryVertexOnly ()
 
void possibleChange_truthCutQuantity ()
 
void possibleChange_truthCrossLength ()
 
void possibleChange_reconCutAllowedTypes ()
 
void possibleChange_reconVertexRepresentation ()
 

Static Private Member Functions

template<class T >
static QString toString (const T &t)
 
static QString toString (const VertexCommonFlags::QUANTITY &par)
 
static QString toString (const QPair< VertexCommonFlags::QUANTITY, VP1Interval > &)
 
static QString toString (const QPair< VertexCommonFlags::QUANTITY, double > &)
 

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 24 of file VertexSysController.h.

Constructor & Destructor Documentation

◆ VertexSysController()

VertexSysController::VertexSysController ( IVP1System sys)

Definition at line 48 of file VertexSysController.cxx.

49  : VP1Controller(sys,"VertexSysController"), m_d(new Imp)
50 {
51  m_d->ui.setupUi(this);
52 
54  setupCollWidgetInScrollArea(m_d->ui.collWidgetScrollArea,m_d->collWidget);
55 
56  initDialog(m_d->ui_display, m_d->ui.pushButton_settings_display);
57  initDialog(m_d->ui_int, m_d->ui.pushButton_settings_interactions);
58  initDialog(m_d->ui_cuts, m_d->ui.pushButton_settings_cuts);
59 
60  m_d->ui_cuts.etaPhiCutWidget->setEtaCutEnabled(false);
61  m_d->ui_display.widget_drawOptions->setBaseLightingDisabled();
62 
63  defineRadioButtonGroup(m_d->ui_display.radioButton_truthCrossSize_ProptoQuantity,
64  m_d->ui_display.radioButton_truthCrossSize_Fixed);
65  m_d->ui_display.radioButton_truthCrossSize_Fixed->setChecked(true);
66 
67  defineRadioButtonGroup(m_d->ui_display.radioButton_truthCrossSize_quantityIsEnergy,
68  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsMomentum,
69  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsTransverseMomentum,
70  m_d->ui_display.radioButton_truthCrossSize_quantityIsMass);
71  m_d->ui_display.radioButton_truthCrossSize_quantityIsEnergy->setChecked(true);
72 
74  connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)));
75 
77  connectToLastUpdateSlot(m_d->ui_cuts.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)));
78 
80  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_truthcut_primaryonly);
81 
83  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_truthcut_incomingParticleRequirement);
84  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_truthcut_quantity_min);
85  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_truthcut_quantity_max);
86  connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_min_gev);
87  connectToLastUpdateSlot(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_max_gev);
88  connectToLastUpdateSlot(m_d->ui_cuts.radioButton_truthcut_quantityIsEnergy);
89  connectToLastUpdateSlot(m_d->ui_cuts.radioButton_truthcut_quantityIsAbsMomentum);
90  connectToLastUpdateSlot(m_d->ui_cuts.radioButton_truthcut_quantityIsAbsTransverseMomentum);
91  connectToLastUpdateSlot(m_d->ui_cuts.radioButton_truthcut_quantityIsMass);
92 
94  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_ProptoQuantity);
95  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_truthCrossSize_ProptoQuantity);
96  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_quantityIsEnergy);
97  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsMomentum);
98  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsTransverseMomentum);
99  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_quantityIsMass);
100  connectToLastUpdateSlot(m_d->ui_display.radioButton_truthCrossSize_Fixed);
101  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_truthCrossSize_fixed);
102 
104  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcuts_onlyShowTypes);
105  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_primary);
106  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_secondary);
107  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_v0);
108  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_conversion);
109  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_kink);
110  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_pileup);
111  connectToLastUpdateSlot(m_d->ui_cuts.checkBox_reconcut_type_other);
112 
114  connectToLastUpdateSlot(m_d->ui_display.radioButton_reconVert_point);
115  connectToLastUpdateSlot(m_d->ui_display.radioButton_reconVert_sphere);
116  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_reconVert_sphereRadius_mm);
117  connectToLastUpdateSlot(m_d->ui_display.radioButton_reconVert_ellipsoid);
118  connectToLastUpdateSlot(m_d->ui_display.doubleSpinBox_reconVert_ellipsoid_nsigma);
119  // Special: -> rerandomise
120  connect(m_d->ui_display.pushButton_colourbyrandom_rerandomise,SIGNAL(clicked()),this,SLOT(emitRerandomise()));
121 
122  initLastVars();
123 }

◆ ~VertexSysController()

VertexSysController::~VertexSysController ( )
virtual

Definition at line 126 of file VertexSysController.cxx.

127 {
128  delete m_d;
129 }

Member Function Documentation

◆ actualRestoreSettings()

void VertexSysController::actualRestoreSettings ( VP1Deserialise s)
virtual

Implements VP1Controller.

Definition at line 184 of file VertexSysController.cxx.

185 {
186  if (s.version()<0||s.version()>0) {
187  message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
188  return;
189  }
190 
191  //Display:
192  s.restore(m_d->ui_display.widget_drawOptions);
193  s.restore(m_d->ui_display.radioButton_reconVert_point,
194  m_d->ui_display.radioButton_reconVert_sphere,
195  m_d->ui_display.radioButton_reconVert_ellipsoid);
196  s.restore(m_d->ui_display.doubleSpinBox_reconVert_sphereRadius_mm);
197  s.restore(m_d->ui_display.doubleSpinBox_reconVert_ellipsoid_nsigma);
198  s.restore(m_d->ui_display.radioButton_truthCrossSize_ProptoQuantity,
199  m_d->ui_display.radioButton_truthCrossSize_Fixed);
200  s.restore(m_d->ui_display.radioButton_truthCrossSize_quantityIsEnergy,
201  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsMomentum,
202  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsTransverseMomentum,
203  m_d->ui_display.radioButton_truthCrossSize_quantityIsMass);
204  s.restore(m_d->ui_display.doubleSpinBox_truthCrossSize_fixed);
205  s.restore(m_d->ui_display.doubleSpinBox_truthCrossSize_ProptoQuantity);
206 
207  //Interactions:
208  s.restore(m_d->ui_int.checkBox_printinfo);
209  s.restore(m_d->ui_int.checkBox_printinfo_verbose);
210  s.restore(m_d->ui_int.checkBox_zoom);
211 
212  //Cuts:
213  s.restore(m_d->ui_cuts.etaPhiCutWidget);
214  s.restore(m_d->ui_cuts.checkBox_truthcut_primaryonly);
215  s.restore(m_d->ui_cuts.checkBox_truthcut_incomingParticleRequirement);
216  s.restore(m_d->ui_cuts.checkBox_truthcut_quantity_min);
217  s.restore(m_d->ui_cuts.checkBox_truthcut_quantity_max);
218  s.restore(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_min_gev);
219  s.restore(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_max_gev);
220  s.restore(m_d->ui_cuts.radioButton_truthcut_quantityIsEnergy,
221  m_d->ui_cuts.radioButton_truthcut_quantityIsAbsMomentum,
222  m_d->ui_cuts.radioButton_truthcut_quantityIsAbsTransverseMomentum,
223  m_d->ui_cuts.radioButton_truthcut_quantityIsMass);
224  s.restore(m_d->ui_cuts.checkBox_reconcuts_onlyShowTypes);
225  s.restore(m_d->ui_cuts.checkBox_reconcut_type_primary);
226  s.restore(m_d->ui_cuts.checkBox_reconcut_type_secondary);
227  s.restore(m_d->ui_cuts.checkBox_reconcut_type_v0);
228  s.restore(m_d->ui_cuts.checkBox_reconcut_type_conversion);
229  s.restore(m_d->ui_cuts.checkBox_reconcut_type_kink);
230  s.restore(m_d->ui_cuts.checkBox_reconcut_type_pileup);
231  s.restore(m_d->ui_cuts.checkBox_reconcut_type_other);
232 }

◆ actualSaveSettings()

void VertexSysController::actualSaveSettings ( VP1Serialise s) const
virtual

Implements VP1Controller.

Definition at line 138 of file VertexSysController.cxx.

139 {
140  //Display:
141  s.save(m_d->ui_display.widget_drawOptions);
142  s.save(m_d->ui_display.radioButton_reconVert_point,
143  m_d->ui_display.radioButton_reconVert_sphere,
144  m_d->ui_display.radioButton_reconVert_ellipsoid);
145  s.save(m_d->ui_display.doubleSpinBox_reconVert_sphereRadius_mm);
146  s.save(m_d->ui_display.doubleSpinBox_reconVert_ellipsoid_nsigma);
147  s.save(m_d->ui_display.radioButton_truthCrossSize_ProptoQuantity,
148  m_d->ui_display.radioButton_truthCrossSize_Fixed);
149  s.save(m_d->ui_display.radioButton_truthCrossSize_quantityIsEnergy,
150  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsMomentum,
151  m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsTransverseMomentum,
152  m_d->ui_display.radioButton_truthCrossSize_quantityIsMass);
153  s.save(m_d->ui_display.doubleSpinBox_truthCrossSize_fixed);
154  s.save(m_d->ui_display.doubleSpinBox_truthCrossSize_ProptoQuantity);
155 
156  //Interactions:
157  s.save(m_d->ui_int.checkBox_printinfo);
158  s.save(m_d->ui_int.checkBox_printinfo_verbose);
159  s.save(m_d->ui_int.checkBox_zoom);
160 
161  //Cuts:
162  s.save(m_d->ui_cuts.etaPhiCutWidget);
163  s.save(m_d->ui_cuts.checkBox_truthcut_primaryonly);
164  s.save(m_d->ui_cuts.checkBox_truthcut_incomingParticleRequirement);
165  s.save(m_d->ui_cuts.checkBox_truthcut_quantity_min);
166  s.save(m_d->ui_cuts.checkBox_truthcut_quantity_max);
167  s.save(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_min_gev);
168  s.save(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_max_gev);
169  s.save(m_d->ui_cuts.radioButton_truthcut_quantityIsEnergy,
170  m_d->ui_cuts.radioButton_truthcut_quantityIsAbsMomentum,
171  m_d->ui_cuts.radioButton_truthcut_quantityIsAbsTransverseMomentum,
172  m_d->ui_cuts.radioButton_truthcut_quantityIsMass);
173  s.save(m_d->ui_cuts.checkBox_reconcuts_onlyShowTypes);
174  s.save(m_d->ui_cuts.checkBox_reconcut_type_primary);
175  s.save(m_d->ui_cuts.checkBox_reconcut_type_secondary);
176  s.save(m_d->ui_cuts.checkBox_reconcut_type_v0);
177  s.save(m_d->ui_cuts.checkBox_reconcut_type_conversion);
178  s.save(m_d->ui_cuts.checkBox_reconcut_type_kink);
179  s.save(m_d->ui_cuts.checkBox_reconcut_type_pileup);
180  s.save(m_d->ui_cuts.checkBox_reconcut_type_other);
181 }

◆ 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 * VertexSysController::collWidget ( ) const

Definition at line 253 of file VertexSysController.cxx.

253 { return m_d->collWidget; }

◆ 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 VertexSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 132 of file VertexSysController.cxx.

133 {
134  return 0;
135 }

◆ customTourEditor()

static VP1CustomTourEditor* VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61 {return m_customTourEditor;}

◆ defineRadioButtonGroup() [1/2]

QButtonGroup * VP1Controller::defineRadioButtonGroup ( 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 * VertexSysController::drawOptions ( ) const

Definition at line 247 of file VertexSysController.cxx.

248 {
249  return m_d->ui_display.widget_drawOptions->drawOptionsGroup();
250 }

◆ dummyUpdateTrigger

void VP1Controller::dummyUpdateTrigger ( )
signalinherited

◆ emitRerandomise

void VertexSysController::emitRerandomise ( )
privateslot

Definition at line 343 of file VertexSysController.cxx.

344 {
345  messageVerbose("Emitting rerandomise");
346  emit rerandomise();
347 }

◆ 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 }

◆ 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()

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 (QString s : l)
139  message(addtostart+s);
140  } else {
141  for (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 (QString s : l)
95  message(s);
96  } else {
97  for (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 (QString s : l)
157  messageDebug(addtostart+s);
158  } else {
159  for (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 (QString s : l)
109  messageDebug(s);
110  } else {
111  for (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 (QString s : l)
175  messageVerbose(addtostart+s);
176  } else {
177  for (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 (QString s : l)
123  messageVerbose(s);
124  } else {
125  for (QString s : l)
126  messageVerbose(s+addtoend);
127  }
128 }

◆ possibleChange_reconCutAllowedTypes

void VertexSysController::possibleChange_reconCutAllowedTypes ( )
privateslot

◆ possibleChange_reconVertexRepresentation

void VertexSysController::possibleChange_reconVertexRepresentation ( )
privateslot

◆ possibleChange_truthCrossLength

void VertexSysController::possibleChange_truthCrossLength ( )
privateslot

◆ possibleChange_truthCutAllowedEta

void VertexSysController::possibleChange_truthCutAllowedEta ( )
privateslot

◆ possibleChange_truthCutAllowedPhi

void VertexSysController::possibleChange_truthCutAllowedPhi ( )
privateslot

◆ possibleChange_truthCutPrimaryVertexOnly

void VertexSysController::possibleChange_truthCutPrimaryVertexOnly ( )
privateslot

◆ possibleChange_truthCutQuantity

void VertexSysController::possibleChange_truthCutQuantity ( )
privateslot

◆ printInfoOnClick()

bool VertexSysController::printInfoOnClick ( ) const

Definition at line 254 of file VertexSysController.cxx.

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

◆ printVerboseInfoOnClick()

bool VertexSysController::printVerboseInfoOnClick ( ) const

Definition at line 255 of file VertexSysController.cxx.

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

◆ reconCutAllowedTypes()

VertexCommonFlags::ReconVertexTypeFlags VertexSysController::reconCutAllowedTypes ( ) const

Definition at line 318 of file VertexSysController.cxx.

319 {
320  if (!m_d->ui_cuts.checkBox_reconcuts_onlyShowTypes->isChecked())
322 
323  VertexCommonFlags::ReconVertexTypeFlags f;
324 
325  if (m_d->ui_cuts.checkBox_reconcut_type_primary->isChecked())
327  if (m_d->ui_cuts.checkBox_reconcut_type_secondary->isChecked())
329  if (m_d->ui_cuts.checkBox_reconcut_type_v0->isChecked())
331  if (m_d->ui_cuts.checkBox_reconcut_type_conversion->isChecked())
333  if (m_d->ui_cuts.checkBox_reconcut_type_kink->isChecked())
335  if (m_d->ui_cuts.checkBox_reconcut_type_pileup->isChecked())
337  if (m_d->ui_cuts.checkBox_reconcut_type_other->isChecked())
339  return f;
340 }

◆ reconCutAllowedTypesChanged

void VertexSysController::reconCutAllowedTypesChanged ( VertexCommonFlags::ReconVertexTypeFlags  )
signal

◆ reconVertexRepresentation()

double VertexSysController::reconVertexRepresentation ( ) const

Definition at line 308 of file VertexSysController.cxx.

309 {
310  if (m_d->ui_display.radioButton_reconVert_point->isChecked())
311  return 0.0;
312  if (m_d->ui_display.radioButton_reconVert_sphere->isChecked())
313  return - m_d->ui_display.doubleSpinBox_reconVert_sphereRadius_mm->value()*Gaudi::Units::mm;
314  return m_d->ui_display.doubleSpinBox_reconVert_ellipsoid_nsigma->value();
315 }

◆ reconVertexRepresentationChanged

void VertexSysController::reconVertexRepresentationChanged ( const double &  )
signal

◆ rerandomise

void VertexSysController::rerandomise ( )
signal

◆ restoreSettings()

void VP1Controller::restoreSettings ( 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 }

◆ 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 }

◆ 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/7]

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

Definition at line 100 of file VP1Controller.cxx.

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

◆ toString() [2/7]

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/7]

QString VertexSysController::toString ( const QPair< VertexCommonFlags::QUANTITY, double > &  par)
staticprivate

Definition at line 241 of file VertexSysController.cxx.

242 {
243  return "<"+VertexCommonFlags::toString(par.first)+", "+str(par.second)+">";
244 }

◆ toString() [4/7]

QString VertexSysController::toString ( const QPair< VertexCommonFlags::QUANTITY, VP1Interval > &  par)
staticprivate

Definition at line 235 of file VertexSysController.cxx.

236 {
237  return "<"+VertexCommonFlags::toString(par.first)+", "+str(par.second)+">";
238 }

◆ toString() [5/7]

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

Definition at line 83 of file VertexSysController.h.

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

◆ toString() [6/7]

static QString VertexSysController::toString ( const VertexCommonFlags::QUANTITY par)
inlinestaticprivate

Definition at line 84 of file VertexSysController.h.

◆ toString() [7/7]

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 }

◆ truthCrossLength()

QPair< VertexCommonFlags::QUANTITY, double > VertexSysController::truthCrossLength ( ) const

Definition at line 262 of file VertexSysController.cxx.

263 {
265  double range(0);
266  if (m_d->ui_display.radioButton_truthCrossSize_Fixed->isChecked()) {
267  range = - m_d->ui_display.doubleSpinBox_truthCrossSize_fixed->value()*Gaudi::Units::mm;
268  } else {
269  range = m_d->ui_display.doubleSpinBox_truthCrossSize_ProptoQuantity->value()*(Gaudi::Units::mm/Gaudi::Units::GeV);
270  if (m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsMomentum->isChecked())
271  quantity = VertexCommonFlags::MOMENTUM;
272  else if (m_d->ui_display.radioButton_truthCrossSize_quantityIsAbsTransverseMomentum->isChecked())
274  else if (m_d->ui_display.radioButton_truthCrossSize_quantityIsMass->isChecked())
275  quantity = VertexCommonFlags::MASS;
276  }
277  return QPair<VertexCommonFlags::QUANTITY,double>(quantity,range);
278 }

◆ truthCrossLengthChanged

void VertexSysController::truthCrossLengthChanged ( QPair< VertexCommonFlags::QUANTITY, double >  )
signal

◆ truthCutAllowedEta()

VP1Interval VertexSysController::truthCutAllowedEta ( ) const

Definition at line 257 of file VertexSysController.cxx.

257 { return m_d->ui_cuts.etaPhiCutWidget->allowedEta(); }

◆ truthCutAllowedEtaChanged

void VertexSysController::truthCutAllowedEtaChanged ( const VP1Interval )
signal

◆ truthCutAllowedPhi()

QList< VP1Interval > VertexSysController::truthCutAllowedPhi ( ) const

Definition at line 258 of file VertexSysController.cxx.

258 { return m_d->ui_cuts.etaPhiCutWidget->allowedPhi(); }

◆ truthCutAllowedPhiChanged

void VertexSysController::truthCutAllowedPhiChanged ( const QList< VP1Interval > &  )
signal

◆ truthCutPrimaryVertexOnly()

bool VertexSysController::truthCutPrimaryVertexOnly ( ) const

Definition at line 259 of file VertexSysController.cxx.

259 { return m_d->ui_cuts.checkBox_truthcut_primaryonly->isChecked(); }

◆ truthCutPrimaryVertexOnlyChanged

void VertexSysController::truthCutPrimaryVertexOnlyChanged ( bool  )
signal

◆ truthCutQuantity()

QPair< VertexCommonFlags::QUANTITY, VP1Interval > VertexSysController::truthCutQuantity ( ) const

Definition at line 281 of file VertexSysController.cxx.

282 {
285 
286  if (!m_d->ui_cuts.checkBox_truthcut_incomingParticleRequirement->isChecked())
287  return QPair<VertexCommonFlags::QUANTITY,VP1Interval>(quantity,range);
288 
289  if (m_d->ui_cuts.checkBox_truthcut_quantity_min->isChecked())
290  range.setLower(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_min_gev->value()*Gaudi::Units::GeV);
291  if (m_d->ui_cuts.checkBox_truthcut_quantity_max->isChecked())
292  range.setUpper(m_d->ui_cuts.doubleSpinBox_truthcut_quantity_max_gev->value()*Gaudi::Units::GeV);
293 
294  if (range.isAllR())
295  return QPair<VertexCommonFlags::QUANTITY,VP1Interval>(quantity,range);
296 
297  if (m_d->ui_cuts.radioButton_truthcut_quantityIsAbsMomentum->isChecked())
298  quantity = VertexCommonFlags::MOMENTUM;
299  else if (m_d->ui_cuts.radioButton_truthcut_quantityIsAbsTransverseMomentum->isChecked())
301  else if (m_d->ui_cuts.radioButton_truthcut_quantityIsMass->isChecked())
302  quantity = VertexCommonFlags::MASS;
303 
304  return QPair<VertexCommonFlags::QUANTITY,VP1Interval>(quantity,range);
305 }

◆ truthCutQuantityChanged

void VertexSysController::truthCutQuantityChanged ( const QPair< VertexCommonFlags::QUANTITY, VP1Interval > &  )
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 VertexSysController::zoomOnClick ( ) const

Definition at line 256 of file VertexSysController.cxx.

256 { 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* VertexSysController::m_d
private

Definition at line 81 of file VertexSysController.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
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
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.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
VertexSysController::possibleChange_truthCrossLength
void possibleChange_truthCrossLength()
StandaloneBunchgroupHandler.bg
bg
Definition: StandaloneBunchgroupHandler.py:243
VertexCommonFlags::MOMENTUM
@ MOMENTUM
Definition: VertexCommonFlags.h:37
VP1Controller::Imp::lastUpdateSlot
const char * lastUpdateSlot
Definition: VP1Controller.cxx:49
VP1Controller::dummyUpdateTrigger
void dummyUpdateTrigger()
VertexCommonFlags::RVT_Primary
@ RVT_Primary
Definition: VertexCommonFlags.h:26
VP1Controller::VP1Controller
VP1Controller(IVP1System *sys, const QString &classname)
Definition: VP1Controller.cxx:76
VertexCommonFlags::ENERGY
@ ENERGY
Definition: VertexCommonFlags.h:37
WriteCellNoiseToCool.rb
rb
Definition: WriteCellNoiseToCool.py:229
VertexSysController::possibleChange_truthCutQuantity
void possibleChange_truthCutQuantity()
hist_file_dump.d
d
Definition: hist_file_dump.py:137
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
VP1Controller::initDialog
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
Definition: VP1Controller.h:144
VertexCommonFlags::RVT_Kink
@ RVT_Kink
Definition: VertexCommonFlags.h:30
VP1Controller::Imp::collWidget
VP1CollectionWidget * collWidget
Definition: VP1Controller.cxx:50
skel.it
it
Definition: skel.GENtoEVGEN.py:423
VertexSysController::possibleChange_truthCutPrimaryVertexOnly
void possibleChange_truthCutPrimaryVertexOnly()
VP1Controller::actualSaveSettings
virtual void actualSaveSettings(VP1Serialise &) const =0
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
python.sizes.txt
string txt
Definition: sizes.py:141
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
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
VertexSysController::rerandomise
void rerandomise()
VP1Controller::connectToLastUpdateSlot
void connectToLastUpdateSlot(QObject *sender, const char *signal)
Definition: VP1Controller.cxx:327
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
VertexCommonFlags::RVT_Other
@ RVT_Other
Definition: VertexCommonFlags.h:32
VertexCommonFlags::toString
static QString toString(const QUANTITY &)
Definition: VertexCommonFlags.cxx:18
VertexSysController::possibleChange_reconVertexRepresentation
void possibleChange_reconVertexRepresentation()
TruthTest.itE
itE
Definition: TruthTest.py:25
VertexCommonFlags::RVT_Secondary
@ RVT_Secondary
Definition: VertexCommonFlags.h:27
VP1Controller::initVarsMode
bool initVarsMode() const
Definition: VP1Controller.h:97
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
VertexCommonFlags::RVT_V0
@ RVT_V0
Definition: VertexCommonFlags.h:28
lumiFormat.i
int i
Definition: lumiFormat.py:92
z
#define z
VP1Controller::Imp::fallBackMaterial
SoMaterial * fallBackMaterial
Definition: VP1Controller.cxx:64
VP1Interval::inf
static double inf()
Definition: VP1Interval.h:25
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
beamspotman.n
n
Definition: beamspotman.py:731
VertexCommonFlags::MASS
@ MASS
Definition: VertexCommonFlags.h:37
VP1Controller::m_d
Imp * m_d
Definition: VP1Controller.h:127
VP1Controller::m_initVarsMode
bool m_initVarsMode
Definition: VP1Controller.h:129
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
VP1CollectionWidget::appropriateFixedWidth
int appropriateFixedWidth() const
Definition: VP1CollectionWidget.cxx:276
VP1Deserialise
Definition: VP1Deserialise.h:44
VertexSysController::emitRerandomise
void emitRerandomise()
Definition: VertexSysController.cxx:343
CloseEventEater
Definition: CloseEventEater.h:12
VertexSysController::Imp::ui_display
Ui::VertexSysSettingsColouringForm ui_display
Definition: VertexSysController.cxx:35
VertexCommonFlags::RVT_Conversion
@ RVT_Conversion
Definition: VertexCommonFlags.h:29
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1140
keylayer_zslicemap.sb
sb
Definition: keylayer_zslicemap.py:192
VertexCommonFlags::RVT_Any
@ RVT_Any
Definition: VertexCommonFlags.h:33
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:64
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:195
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
VertexSysController::m_d
Imp * m_d
Definition: VertexSysController.h:80
VertexSysController::possibleChange_reconCutAllowedTypes
void possibleChange_reconCutAllowedTypes()
VP1Controller::Imp::dialogs
QList< DialogInfo * > dialogs
Definition: VP1Controller.cxx:62
VP1Controller::actualRestoreSettings
virtual void actualRestoreSettings(VP1Deserialise &)=0
VertexCommonFlags::TRANSVERSE_MOM
@ TRANSVERSE_MOM
Definition: VertexCommonFlags.h:37
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
python.PyAthena.v
v
Definition: PyAthena.py:157
VertexCommonFlags::QUANTITY
QUANTITY
Definition: VertexCommonFlags.h:37
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
VertexSysController::Imp::collWidget
VP1CollectionWidget * collWidget
Definition: VertexSysController.cxx:36
VP1Controller::testForChanges
void testForChanges()
Definition: VP1Controller.h:112
VertexSysController::Imp::ui_int
Ui::VertexSysSettingsInteractionsForm ui_int
Definition: VertexSysController.cxx:34
TRT_PAI_physicsConstants::mb
const double mb
1mb to cm2
Definition: TRT_PAI_physicsConstants.h:15
VertexSysController::possibleChange_truthCutAllowedPhi
void possibleChange_truthCutAllowedPhi()
VP1Controller::collWidgetContentChanged
void collWidgetContentChanged()
Definition: VP1Controller.cxx:232
VertexSysController::Imp::ui
Ui::VP1VertexControllerForm ui
Definition: VertexSysController.cxx:32
VP1Controller::enabledButtonStateChanged
void enabledButtonStateChanged()
Definition: VP1Controller.cxx:167
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
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
VP1Controller::toggleDialogState
void toggleDialogState(QObject *widget=0)
Definition: VP1Controller.cxx:194
VertexSysController::possibleChange_truthCutAllowedEta
void possibleChange_truthCutAllowedEta()
VertexCommonFlags::RVT_Pileup
@ RVT_Pileup
Definition: VertexCommonFlags.h:31
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
python.compressB64.c
def c
Definition: compressB64.py:93
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
VertexSysController::Imp::ui_cuts
Ui::VertexSysSettingsCutsForm ui_cuts
Definition: VertexSysController.cxx:33
VP1Controller::currentSettingsVersion
virtual int currentSettingsVersion() const =0