ATLAS Offline Software
Loading...
Searching...
No Matches
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 (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 (std::unique_ptr< 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 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
53 m_d->collWidget = new VP1CollectionWidget;
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}
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
void connectToLastUpdateSlot(QObject *sender, const char *signal)
void setupCollWidgetInScrollArea(QScrollArea *scrollarea, VP1CollectionWidget *collWidget)
const char * addUpdateSlot(const char *slot)
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)
VP1Controller(IVP1System *sys, const QString &classname)
void possibleChange_truthCutPrimaryVertexOnly()
void possibleChange_truthCutQuantity()
void possibleChange_truthCrossLength()
void possibleChange_truthCutAllowedPhi()
void possibleChange_reconVertexRepresentation()
void possibleChange_truthCutAllowedEta()
void possibleChange_reconCutAllowedTypes()

◆ ~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}
void message(const QString &) const
static QString str(const QString &s)
Definition VP1String.h:49

◆ 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 320 of file VP1Controller.cxx.

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

◆ changed()

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

Definition at line 152 of file VP1Controller.h.

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

◆ 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 234 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [1/10]

void VP1Controller::connectToLastUpdateSlot ( QButtonGroup * bg)
protectedinherited

Definition at line 371 of file VP1Controller.cxx.

372{
373 connectToLastUpdateSlot(bg,SIGNAL(buttonClicked(int)));
374}

◆ connectToLastUpdateSlot() [2/10]

void VP1Controller::connectToLastUpdateSlot ( QCheckBox * cb)
protectedinherited

Definition at line 335 of file VP1Controller.cxx.

336{
337 connectToLastUpdateSlot(cb,SIGNAL(toggled(bool)));
338}

◆ connectToLastUpdateSlot() [3/10]

void VP1Controller::connectToLastUpdateSlot ( QComboBox * cb)
protectedinherited

Definition at line 341 of file VP1Controller.cxx.

342{
343 connectToLastUpdateSlot(cb,SIGNAL(currentIndexChanged(int)));
344}

◆ connectToLastUpdateSlot() [4/10]

void VP1Controller::connectToLastUpdateSlot ( QDoubleSpinBox * dsb)
protectedinherited

Definition at line 359 of file VP1Controller.cxx.

360{
361 connectToLastUpdateSlot(dsb,SIGNAL(valueChanged(double)));
362}

◆ connectToLastUpdateSlot() [5/10]

void VP1Controller::connectToLastUpdateSlot ( QGroupBox * gb)
protectedinherited

Definition at line 347 of file VP1Controller.cxx.

348{
349 connectToLastUpdateSlot(gb,SIGNAL(toggled(bool)));
350}

◆ connectToLastUpdateSlot() [6/10]

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

Definition at line 329 of file VP1Controller.cxx.

330{
331 connect(sender,signal,this,m_d->lastUpdateSlot);
332}

◆ connectToLastUpdateSlot() [7/10]

void VP1Controller::connectToLastUpdateSlot ( QRadioButton * rb)
protectedinherited

Definition at line 365 of file VP1Controller.cxx.

366{
367 connectToLastUpdateSlot(rb,SIGNAL(toggled(bool)));
368}

◆ connectToLastUpdateSlot() [8/10]

void VP1Controller::connectToLastUpdateSlot ( QSlider * s)
protectedinherited

Definition at line 377 of file VP1Controller.cxx.

378{
379 connectToLastUpdateSlot(s,SIGNAL(valueChanged(int)));
380}

◆ connectToLastUpdateSlot() [9/10]

void VP1Controller::connectToLastUpdateSlot ( QSpinBox * sb)
protectedinherited

Definition at line 353 of file VP1Controller.cxx.

354{
355 connectToLastUpdateSlot(sb,SIGNAL(valueChanged(int)));
356}

◆ connectToLastUpdateSlot() [10/10]

void VP1Controller::connectToLastUpdateSlot ( VP1ColorSelectButton * csb)
protectedinherited

Definition at line 383 of file VP1Controller.cxx.

384{
385 connectToLastUpdateSlot(csb,SIGNAL(colorChanged(const QColor&)));
386}

◆ currentSettingsVersion()

int VertexSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 132 of file VertexSysController.cxx.

133{
134 return 0;
135}

◆ customTourEditor()

VP1CustomTourEditor * VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 62 of file VP1Controller.h.

62{return m_customTourEditor;}
static VP1CustomTourEditor * m_customTourEditor

◆ defineRadioButtonGroup() [1/2]

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

Definition at line 302 of file VP1Controller.cxx.

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

◆ 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 290 of file VP1Controller.cxx.

294{
295 QList<QRadioButton *> l;
296 l << rb0 << rb1 << rb2 << rb3 << rb4 << rb5 << rb6 << rb7 << rb8 << rb9;
297 l.removeAll(0);
298 return defineRadioButtonGroup(l);
299}
l
Printing final latex table to .tex output file.

◆ 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 169 of file VP1Controller.cxx.

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

◆ fallBackMaterial()

SoMaterial * VP1Controller::fallBackMaterial ( ) const
protectedinherited

Definition at line 429 of file VP1Controller.cxx.

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

◆ getMaterial()

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

Definition at line 439 of file VP1Controller.cxx.

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

◆ 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 ( std::unique_ptr< 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 dialogPtr->setWindowTitle(txt+" ["+systemBase()->name()+"]");
128 dialogPtr->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 auto di = std::make_unique<Imp::DialogInfo>(launchButton,std::move(dialogPtr),enabledButton);
144 QWidget* dialog = di->dialogWidget.get();
145 m_d->dialogs << di.release();
146
147 connect(launchButton,SIGNAL(clicked()),this,SLOT(toggleDialogState()));
148 if (enabledButton)
149 connect(enabledButton,SIGNAL(toggled(bool)),this,SLOT(enabledButtonStateChanged()));
150 CloseEventEater* closeEventEater = new CloseEventEater(this);
151 dialog->installEventFilter(closeEventEater);
152
153 if(closeButton) {
154 closeButton->setText("&Close");
155 closeButton->setToolTip("Close this dialog [Esc]");
156 connect(closeButton,SIGNAL(clicked()),dialog,SLOT(close()));
157 }
158 connect(new QShortcut(QKeySequence(Qt::Key_Escape), dialog),SIGNAL(activated()),dialog,SLOT(close()));
159
160 //To avoid an extra call in the code we do this a few times more than necessary (fixme: put in initLastVars!!):
161 int maxwidth(0);
162 for (Imp::DialogInfo* di : m_d->dialogs)
163 maxwidth = std::max(maxwidth,di->launchButton->sizeHint().width());
164 for (Imp::DialogInfo* di : m_d->dialogs)
165 di->launchButton->setMinimumWidth(maxwidth);
166}
void toggleDialogState(QObject *widget=0)
void enabledButtonStateChanged()
IVP1System * systemBase() const

◆ initDialog() [2/2]

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

Definition at line 145 of file VP1Controller.h.

145 {
146 auto w = std::make_unique<QWidget>(nullptr,Qt::WindowStaysOnTopHint);
147 theUI.setupUi(w.get());
148 initDialog(std::move(w), launchbutton, theUI.pushButton_close,enabledButton);
149}

◆ initLastVars()

void VP1Controller::initLastVars ( )
inherited

Definition at line 68 of file VP1Controller.cxx.

69{
70 m_initVarsMode = true;
72 m_initVarsMode = false;
73}
void testForChanges()

◆ initVarsMode()

bool VP1Controller::initVarsMode ( ) const
inlineprotectedinherited

Definition at line 98 of file VP1Controller.h.

98{ 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)
53 m_system->message(str);
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}
static const char * prefix_msg()
Definition VP1Msg.h:56

◆ 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}
static bool debug()
Definition VP1Msg.h:32
static const char * prefix_debug()
Definition VP1Msg.h:57

◆ 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}
void messageDebug(const QString &) const

◆ 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}
static bool verbose()
Definition VP1Msg.h:31
static const char * prefix_verbose()
Definition VP1Msg.h:59

◆ 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)
124 } else {
125 for (const 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 ( const QByteArray & ba)
inherited

Definition at line 389 of file VP1Controller.cxx.

390{
391 messageDebug("VP1Controller::restoreSettings()");
392
393 VP1Deserialise s(ba,systemBase());
395
396 //warn unrestored:
397 if (m_d->collWidget)
398 s.ignoreWidget(m_d->collWidget);
399 s.warnUnrestored(static_cast<QWidget*>(this));
400 for (Imp::DialogInfo* di : m_d->dialogs)
401 s.warnUnrestored(di->dialogWidget.get());
402
403 QTimer::singleShot(0, this, SLOT(testForChanges()));
404}
virtual void actualRestoreSettings(VP1Deserialise &)=0

◆ saveSettings()

QByteArray VP1Controller::saveSettings ( ) const
inherited

Definition at line 407 of file VP1Controller.cxx.

408{
409 messageDebug("VP1Controller::saveSettings()");
410
411 VP1Serialise s(currentSettingsVersion(),systemBase());
412
413 messageDebug("calling actualSaveSettings()...");
415
416 //Warn unsaved:
417 if (m_d->collWidget)
418 s.ignoreWidget(m_d->collWidget);
419
420 s.warnUnsaved(static_cast<const QWidget*>(this));
421 for (Imp::DialogInfo* di : m_d->dialogs)
422 s.warnUnsaved(di->dialogWidget.get());
423
424 return s.result();
425
426}
virtual void actualSaveSettings(VP1Serialise &) const =0
virtual int currentSettingsVersion() const =0

◆ setCustomTourEditor()

void VP1Controller::setCustomTourEditor ( VP1CustomTourEditor * editor)
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61{ m_customTourEditor=editor;}

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

◆ 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}
static std::map< VP1HelperClassBase *, QString > vp1helperclassbase_instanceMap

◆ setupCollWidgetInScrollArea()

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

Definition at line 257 of file VP1Controller.cxx.

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

◆ str() [1/30]

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]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

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

◆ str() [3/30]

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

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

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

Definition at line 81 of file VP1String.h.

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

◆ str() [5/30]

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

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}
static QColor sbcol2qcol(const SbColor &)

◆ 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)+")"; }
#define y
#define x

◆ 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)+")"; }
#define 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>
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]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

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

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

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

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

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

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

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

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

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

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

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

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

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

◆ str() [30/30]

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 113 of file VP1Controller.h.

◆ toggleDialogState

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

Definition at line 196 of file VP1Controller.cxx.

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

◆ toString() [1/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}
static QString toString(const QUANTITY &)

◆ toString() [2/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() [3/7]

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

Definition at line 83 of file VertexSysController.h.

83{ return VP1Controller::toString(t); }//unhide base methods
static QString toString(const T &par)

◆ toString() [4/7]

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

Definition at line 84 of file VertexSysController.h.

84{ return VertexCommonFlags::toString(par); }

◆ toString() [5/7]

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

Definition at line 100 of file VP1Controller.cxx.

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

◆ toString() [6/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() [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}
static Double_t a
int r
Definition globals.cxx:22

◆ 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())
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{
283 VP1Interval range(-VP1Interval::inf(),VP1Interval::inf());
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())
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}
static double inf()
Definition VP1Interval.h:25

◆ truthCutQuantityChanged

void VertexSysController::truthCutQuantityChanged ( const QPair< VertexCommonFlags::QUANTITY, VP1Interval > & )
signal

◆ verbose()

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
static const bool s_vp1verbose

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

184{
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 126 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 130 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: