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

#include <JetCollectionSettingsButton.h>

Inheritance diagram for JetCollectionSettingsButton:
Collaboration diagram for JetCollectionSettingsButton:

Classes

class  Imp
 

Public Slots

void showEditMaterialDialog ()
 
void setMaterialText (const QString &)
 

Signals

void cutAllowedPtChanged (const VP1Interval &)
 
void cutAllowedEtaChanged (const VP1Interval &)
 
void cutAllowedPhiChanged (const QList< VP1Interval > &)
 
void scaleChanged (const double &scale)
 
void randomJetColoursChanged (const bool &ra)
 
void rerandomise ()
 
void maxRChanged (const double &maxR)
 
void bTaggingEnabledChanged (const bool &)
 
void bTaggingTaggerChanged (const QString &)
 
void bTaggingCutChanged (const double &)
 
void bTaggingRenderingMaterialChanged (const bool &)
 
void bTaggingMaterialChanged ()
 
void bTaggingRenderingSkinChanged (bool)
 
void lastAppliedChanged ()
 

Public Member Functions

 JetCollectionSettingsButton (QWidget *parent=0, int dim=25, QString name="")
 
virtual ~JetCollectionSettingsButton ()
 
void setDimension (int dim)
 
VP1MaterialButtongetMaterialButton () const
 
virtual bool setMaterial (SoMaterial *)
 
virtual void copyValuesFromMaterial (SoMaterial *)
 
virtual double lastAppliedTransparency () const
 
virtual double lastAppliedShininess () const
 
virtual double lastAppliedBrightness () const
 
double lengthOf100GeV ()
 
bool randomJetColours () const
 
double maxR ()
 Returns -1 if disabled in GUI, or value in m if enabled. More...
 
VP1Interval cutAllowedPt () const
 
VP1Interval cutAllowedEta () const
 
QList< VP1IntervalcutAllowedPhi () const
 
bool bTaggingEnabled () const
 
QString bTaggingTagger () const
 
QString bTaggingSkin () const
 
double bTaggingCut () const
 
bool bTaggingRenderingSkin () const
 
bool bTaggingRenderingMaterial () const
 
SoMaterial * bTaggingMaterial () const
 
bool is_bTaggingSkinEnabled () const
 
bool is_bTaggingMaterialEnabled () const
 
QByteArray saveState () const
 fill out with the state of the object (used for drag and drop etc) More...
 
void restoreFromState (const QByteArray &)
 
SoMaterial * getMaterial (VP1MaterialButton *) const
 
SoMaterial * fallBackMaterial () const
 
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 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 updateButton ()
 

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void dropEvent (QDropEvent *event)
 
void dragEnterEvent (QDragEnterEvent *event)
 
void setHelperClassName (const QString &n)
 

Private Slots

void possibleChange_cutAllowedPt ()
 
void possibleChange_cutAllowedEta ()
 
void possibleChange_cutAllowedPhi ()
 
void possibleChange_scale ()
 
void possibleChange_randomJetColours ()
 
void possibleChange_maxR ()
 
void possibleChange_bTaggingEnabled (bool)
 
void possibleChange_bTaggingTagger ()
 
void possibleChange_bTaggingCut ()
 
void possibleChange_bTaggingRenderingMaterial (bool)
 
void possibleChange_bTaggingRenderingSkin (bool ok)
 
void enableMaxR (bool)
 
void enableRandomColours (bool)
 
void emitRerandomise ()
 
void checkSelection ()
 

Private Attributes

Impm_d
 
QString m_helpername
 
IVP1Systemm_system
 

Static Private Attributes

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

Detailed Description

Definition at line 14 of file JetCollectionSettingsButton.h.

Constructor & Destructor Documentation

◆ JetCollectionSettingsButton()

JetCollectionSettingsButton::JetCollectionSettingsButton ( QWidget *  parent = 0,
int  dim = 25,
QString  name = "" 
)

Definition at line 256 of file JetCollectionSettingsButton.cxx.

258 //: VP1CollectionSettingsButtonBase(parent,0,"VP1MaterialButton"), m_d(new Imp)
259 {
260  m_d->dim = dim;
261  m_d->name = name;
262 
263  m_d->theclass = this;
264  m_d->initEditWindow();
265 
266 
268  // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
270 
271 
272 
273 // //Draw Styles / Complexity:
274 // VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
275 // VP1QtInventorUtils::setValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth,1.0);
276 
277 // m_d->trackDrawStyle = new SoDrawStyle;
278 // m_d->trackDrawStyle->setName("JetDrawStyle");
279 // m_d->trackDrawStyle->pointSize=5.0;
280 // m_d->trackDrawStyle->ref();
281 // updateTrackDrawStyle();
282 // connect(m_d->editwindow_ui.horizontalSlider_trackWidth,SIGNAL(valueChanged(int)),this,SLOT(updateTrackDrawStyle()));
283 
284 // m_d->trackLightModel = new SoLightModel;
285 // m_d->trackLightModel->setName("JetLightModel");
286 // m_d->trackLightModel->ref();
287 // updateTrackLightModel(false);
288 // connect(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel,SIGNAL(toggled(bool)),this,SLOT(updateTrackLightModel(bool)));
289 //
290 // m_d->last_trackTubeRadius=trackTubeRadius();
291 // connect(m_d->editwindow_ui.checkBox_trackTubes,SIGNAL(toggled(bool)),this,SLOT(updateTrackTubeRadius()));
292 // connect(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM,SIGNAL(valueChanged(double)),this,SLOT(updateTrackTubeRadius()));
293 //
294 // connect(m_d->editwindow_ui.checkBox_hideactualpaths,SIGNAL(toggled(bool)),this,SLOT(updateHideActualTrackPath(bool)));
295 
296 // // -> parameters
297 // connect(m_d->editwindow_ui.checkBox_showparameters,SIGNAL(toggled(bool)),this,SLOT(possibleChange_showParameters()));
298 // connect(m_d->editwindow_ui.checkBox_parameters_colourByType,SIGNAL(toggled(bool)),this,SLOT(possibleChange_parameterColours()));
299 
300 
301  // -> scale
302  connect(m_d->ui_disp.doubleSpinBox_lengthOf100GeV,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_scale()));
303  connect(m_d->ui_disp.comboBox_energytype,SIGNAL(currentIndexChanged(int)),this,SLOT(possibleChange_scale()));
304 
305  // -> cutAllowedP/Pt
306  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
307  connect(m_d->editwindow_ui.checkBox_cut_maxpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
308  connect(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
309  connect(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
310  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
311  connect(m_d->editwindow_ui.comboBox_momtype,SIGNAL(currentIndexChanged(int)),this,SLOT(possibleChange_cutAllowedPt()));
312 
313  // -> cutAllowedEta
314  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)),this,SLOT(possibleChange_cutAllowedEta()));
315 
316  // -> cutAllowedPhi
317  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(possibleChange_cutAllowedPhi()));
318 
319  // random colors
320  connect(m_d->ui_disp.checkBox_randomColours, SIGNAL(toggled(bool)), this, SLOT(enableRandomColours(bool)));
321  connect(m_d->ui_disp.checkBox_randomColours, SIGNAL(toggled(bool)), this, SLOT(possibleChange_randomJetColours()));
322  connect(m_d->ui_disp.pushButton_colourbyrandom_rerandomise,SIGNAL(clicked()),this,SLOT(emitRerandomise()));
323  this->enableRandomColours(false);
324 
325  // maxR
326  connect(m_d->ui_disp.checkBox_maxR, SIGNAL(toggled(bool)), this, SLOT(enableMaxR(bool)));
327  connect(m_d->ui_disp.checkBox_maxR, SIGNAL(toggled(bool)), this, SLOT(possibleChange_maxR()));
328  connect(m_d->ui_disp.doubleSpinBox_maxR, SIGNAL(valueChanged(double)), this, SLOT(possibleChange_maxR()));
329  this->enableMaxR(false); // init
330 
331  // BTagging
332  connect(m_d->ui_disp.bTaggingCheckBox, SIGNAL(toggled(bool)), this, SLOT(possibleChange_bTaggingEnabled(bool)) );
333 
334  connect(m_d->ui_disp.bTaggingComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(possibleChange_bTaggingTagger()) );
335 
336  connect(m_d->ui_disp.bTaggingSpinBox, SIGNAL(valueChanged(double)), this, SLOT(possibleChange_bTaggingCut()) );
337 
338  connect(m_d->ui_disp.radioButton_material, SIGNAL(toggled(bool)), this, SLOT(possibleChange_bTaggingRenderingMaterial(bool)) );
339 
340  // not needed...
341  //connect(m_d->ui_disp.matButton_btaggedJets, SIGNAL(lastAppliedChanged()), this, SLOT(possibleChange_bTaggingMaterial()) );
342 
343  connect(m_d->ui_disp.radioButton_skins, SIGNAL(toggled(bool)), this, SLOT(possibleChange_bTaggingRenderingSkin(bool)) );
344 
345 
346  // Material button
347  connect(this,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
348  connect(m_d->editwindow_ui.pushButton_close,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
349  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SLOT(updateButton()));
350  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SIGNAL(lastAppliedChanged()));
351  setAcceptDrops(true);
352 
353  QTimer::singleShot(0, this, SLOT(updateButton()));
354 
356  // Custom Materials //
358 
359 
360  // create default material for b-jets
361  m_d->materialFallback = m_d->createMaterial(116,255,228, 0.2, 0.3); // light greenish-blue (R,G,B, brightness, transparency)
362  m_d->materialFallback->ref();
363 
364 
365 
366  // init material for b-tagged jet
367  m_d->ui_disp.matButton_btaggedJets->setMaterial(m_d->materialFallback);
368 
369 // updateButton();
370 
371 
372 }

◆ ~JetCollectionSettingsButton()

JetCollectionSettingsButton::~JetCollectionSettingsButton ( )
virtual

Definition at line 379 of file JetCollectionSettingsButton.cxx.

380 {
381  delete m_d->editwindow;
382 // m_d->trackDrawStyle->unref();
383 // m_d->trackLightModel->unref();
384  delete m_d;
385 }

Member Function Documentation

◆ bTaggingCut()

double JetCollectionSettingsButton::bTaggingCut ( ) const

Definition at line 211 of file JetCollectionSettingsButton.cxx.

211  {
212  return m_d->ui_disp.bTaggingSpinBox->value();
213 }

◆ bTaggingCutChanged

void JetCollectionSettingsButton::bTaggingCutChanged ( const double &  )
signal

◆ bTaggingEnabled()

bool JetCollectionSettingsButton::bTaggingEnabled ( ) const

Definition at line 227 of file JetCollectionSettingsButton.cxx.

227  {
228  return m_d->ui_disp.bTaggingCheckBox->isChecked();
229 }

◆ bTaggingEnabledChanged

void JetCollectionSettingsButton::bTaggingEnabledChanged ( const bool &  )
signal

◆ bTaggingMaterial()

SoMaterial * JetCollectionSettingsButton::bTaggingMaterial ( ) const

Definition at line 223 of file JetCollectionSettingsButton.cxx.

223  {
224  return getMaterial(m_d->ui_disp.matButton_btaggedJets);
225 }

◆ bTaggingMaterialChanged

void JetCollectionSettingsButton::bTaggingMaterialChanged ( )
signal

◆ bTaggingRenderingMaterial()

bool JetCollectionSettingsButton::bTaggingRenderingMaterial ( ) const

Definition at line 235 of file JetCollectionSettingsButton.cxx.

235  {
236  return m_d->ui_disp.radioButton_material->isChecked();
237 }

◆ bTaggingRenderingMaterialChanged

void JetCollectionSettingsButton::bTaggingRenderingMaterialChanged ( const bool &  )
signal

◆ bTaggingRenderingSkin()

bool JetCollectionSettingsButton::bTaggingRenderingSkin ( ) const

Definition at line 231 of file JetCollectionSettingsButton.cxx.

231  {
232  return m_d->ui_disp.radioButton_skins->isChecked();
233 }

◆ bTaggingRenderingSkinChanged

void JetCollectionSettingsButton::bTaggingRenderingSkinChanged ( bool  )
signal

◆ bTaggingSkin()

QString JetCollectionSettingsButton::bTaggingSkin ( ) const

Definition at line 219 of file JetCollectionSettingsButton.cxx.

219  {
220  return m_d->ui_disp.skinsComboBox->currentText();
221 }

◆ bTaggingTagger()

QString JetCollectionSettingsButton::bTaggingTagger ( ) const

Definition at line 215 of file JetCollectionSettingsButton.cxx.

215  {
216  return m_d->ui_disp.bTaggingComboBox->currentText();
217 }

◆ bTaggingTaggerChanged

void JetCollectionSettingsButton::bTaggingTaggerChanged ( const QString &  )
signal

◆ checkSelection

void JetCollectionSettingsButton::checkSelection ( )
privateslot

Definition at line 733 of file JetCollectionSettingsButton.cxx.

734 {
735  messageDebug("JetCollectionSettingsButton::checkSelection()");
736 
737  // -- b-tagging settings/cuts
738  messageDebug("updating b-tagging status for collection " + m_d->name + "...");
739  if (m_d->ui_disp.bTaggingCheckBox->isChecked()) {
740  possibleChange_bTaggingEnabled(true); // init the b-tagging toolbox as active
742  if (m_d->ui_disp.radioButton_material->isChecked())
744  else if (m_d->ui_disp.radioButton_skins->isChecked())
747  }
748  else
749  possibleChange_bTaggingEnabled(false); // init the b-tagging toolbox as not-active
750 
751  // -- other cuts
752  messageDebug("updating other selection cuts for collection " + m_d->name + "...");
759  //FIXME - anything else need updating?
760 }

◆ copyValuesFromMaterial()

void JetCollectionSettingsButton::copyValuesFromMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 427 of file JetCollectionSettingsButton.cxx.

428 {
429  if (!m_d->matButton) m_d->initEditWindow();
431 }

◆ cutAllowedEta()

VP1Interval JetCollectionSettingsButton::cutAllowedEta ( ) const

Definition at line 799 of file JetCollectionSettingsButton.cxx.

800 {
801  if (!m_d->editwindow)
802  m_d->initEditWindow();
803  return m_d->editwindow_ui.etaPhiCutWidget->allowedEta();
804 }

◆ cutAllowedEtaChanged

void JetCollectionSettingsButton::cutAllowedEtaChanged ( const VP1Interval )
signal

◆ cutAllowedPhi()

QList< VP1Interval > JetCollectionSettingsButton::cutAllowedPhi ( ) const

Definition at line 807 of file JetCollectionSettingsButton.cxx.

808 {
809  if (!m_d->editwindow)
810  m_d->initEditWindow();
811  return m_d->editwindow_ui.etaPhiCutWidget->allowedPhi();
812 }

◆ cutAllowedPhiChanged

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

◆ cutAllowedPt()

VP1Interval JetCollectionSettingsButton::cutAllowedPt ( ) const

Definition at line 763 of file JetCollectionSettingsButton.cxx.

764 {
765  if (!m_d->editwindow)
766  m_d->initEditWindow();
767  if (!m_d->editwindow_ui.checkBox_cut_minpt)
768  return VP1Interval();
769 
770  // will set range to negative if we have momcut=P
771  // if minCut unset then min=-inf
772  // if minCut set, and Pt selected, then min=-minCut
773  // if minCut set, and P selected, then min=-maxCut
774  // etc
775  bool isPCut = m_d->editwindow_ui.comboBox_momtype->currentText()=="P";
776 
777  const double minFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev->value()*1000;
778  const double maxFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev->value()*1000;
779 
780  double min=0.0,max=0.0;
781  if (!isPCut) {
782  //Pt cut
783  min = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? minFromInterface : -std::numeric_limits<double>::infinity());
784  max = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? maxFromInterface : std::numeric_limits<double>::infinity());
785  } else {
786  min = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? -maxFromInterface : -std::numeric_limits<double>::infinity());
787  max = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? -minFromInterface : std::numeric_limits<double>::infinity());
788  }
789 
790  //message("cutAllowedPt: min,max="+QString::number(min)+","+QString::number(max));
791 
792  if (max<min)
793  return VP1Interval();
794 
795  return VP1Interval( min, max );//fixme: closed interval??
796 }

◆ cutAllowedPtChanged

void JetCollectionSettingsButton::cutAllowedPtChanged ( const VP1Interval )
signal

◆ dragEnterEvent()

void JetCollectionSettingsButton::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 555 of file JetCollectionSettingsButton.cxx.

556 {
557  if (event->source()!=this && event->mimeData()->hasFormat("vp1/material"))
558  event->acceptProposedAction();
559 }

◆ dropEvent()

void JetCollectionSettingsButton::dropEvent ( QDropEvent *  event)
protected

Definition at line 614 of file JetCollectionSettingsButton.cxx.

615 {
616  QByteArray data = event->mimeData()->data("vp1/material");
617  event->acceptProposedAction();
619 }

◆ emitRerandomise

void JetCollectionSettingsButton::emitRerandomise ( )
privateslot

Definition at line 878 of file JetCollectionSettingsButton.cxx.

879 {
880  messageVerbose("JetCollectionSettingsButton - Emitting rerandomise");
881  emit rerandomise();
882 }

◆ enableMaxR

void JetCollectionSettingsButton::enableMaxR ( bool  bb)
privateslot

Definition at line 892 of file JetCollectionSettingsButton.cxx.

893 {
894  m_d->ui_disp.doubleSpinBox_maxR->setEnabled(bb);
895 }

◆ enableRandomColours

void JetCollectionSettingsButton::enableRandomColours ( bool  bb)
privateslot

Definition at line 865 of file JetCollectionSettingsButton.cxx.

866 {
867  m_d->ui_disp.pushButton_colourbyrandom_rerandomise->setEnabled(bb);
868 }

◆ fallBackMaterial()

SoMaterial * VP1CollectionSettingsButtonBase::fallBackMaterial ( ) const
inherited

Definition at line 52 of file VP1CollectionSettingsButtonBase.cxx.

53 {
54  if (!m_d->fallBackMaterial) {
55  m_d->fallBackMaterial = new SoMaterial;
56  m_d->fallBackMaterial->ref();
57  }
58  return m_d->fallBackMaterial;
59 }

◆ getMaterial()

SoMaterial * VP1CollectionSettingsButtonBase::getMaterial ( VP1MaterialButton mb) const
inherited

Definition at line 62 of file VP1CollectionSettingsButtonBase.cxx.

63 {
64  if (!mb) {
65  message("ERROR: Null material button pointer");
66  return fallBackMaterial();
67  }
68  QList<SoMaterial*> mats = mb->handledMaterials();
69  if (mats.count()!=1) {
70  message("ERROR: No material in button "+mb->objectName());
71  return fallBackMaterial();
72  }
73  return mats.at(0);
74 
75 
76 }

◆ getMaterialButton()

VP1MaterialButton * JetCollectionSettingsButton::getMaterialButton ( ) const

Definition at line 422 of file JetCollectionSettingsButton.cxx.

423 {
424  return m_d->matButton;
425 }

◆ helperClassName()

QString VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51 { return m_helpername; }

◆ is_bTaggingMaterialEnabled()

bool JetCollectionSettingsButton::is_bTaggingMaterialEnabled ( ) const

Definition at line 246 of file JetCollectionSettingsButton.cxx.

247 {
248  return m_d->ui_disp.radioButton_material->isChecked();
249 }

◆ is_bTaggingSkinEnabled()

bool JetCollectionSettingsButton::is_bTaggingSkinEnabled ( ) const

Definition at line 240 of file JetCollectionSettingsButton.cxx.

241 {
242  return m_d->ui_disp.radioButton_skins->isChecked();
243 }

◆ lastAppliedBrightness()

double JetCollectionSettingsButton::lastAppliedBrightness ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 442 of file JetCollectionSettingsButton.cxx.

443 {
444  if (!m_d->matButton) m_d->initEditWindow();
446 }

◆ lastAppliedChanged

void VP1MaterialButtonBase::lastAppliedChanged ( )
signalinherited

◆ lastAppliedShininess()

double JetCollectionSettingsButton::lastAppliedShininess ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 437 of file JetCollectionSettingsButton.cxx.

438 {
439  if (!m_d->matButton) m_d->initEditWindow();
441 }

◆ lastAppliedTransparency()

double JetCollectionSettingsButton::lastAppliedTransparency ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 432 of file JetCollectionSettingsButton.cxx.

433 {
434  if (!m_d->matButton) m_d->initEditWindow();
436 }

◆ lengthOf100GeV()

double JetCollectionSettingsButton::lengthOf100GeV ( )

Definition at line 192 of file JetCollectionSettingsButton.cxx.

193 {
194  double val = m_d->ui_disp.doubleSpinBox_lengthOf100GeV->value();
195  bool isEt = m_d->ui_disp.comboBox_energytype->currentText()=="Et";
196  val = val * ( isEt ? 1:-1);
197  VP1Msg::messageVerbose("JetCollectionSettingsButton::lengthOf100GeV() - value: " + QString::number(val));
198  return val;
199 }

◆ maxR()

double JetCollectionSettingsButton::maxR ( )

Returns -1 if disabled in GUI, or value in m if enabled.

Definition at line 202 of file JetCollectionSettingsButton.cxx.

203 {
204  double val = m_d->ui_disp.checkBox_maxR->isChecked() ? (m_d->ui_disp.doubleSpinBox_maxR->value() ) : -1; //m_d->ui_disp.doubleSpinBox_maxR->value();
205  VP1Msg::messageVerbose("JetCollectionSettingsButton::maxR() - value: " + QString::number(val));
206  return val;
207 }

◆ maxRChanged

void JetCollectionSettingsButton::maxRChanged ( const double &  maxR)
signal

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

◆ mouseMoveEvent()

void JetCollectionSettingsButton::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 562 of file JetCollectionSettingsButton.cxx.

563 {
564  if (!(event->buttons() & Qt::LeftButton))
565  return;
566  if ((event->pos() - m_d->dragStartPosition).manhattanLength()
567  < QApplication::startDragDistance())
568  return;
569 
570  QDrag *drag = new QDrag(this);
571  QMimeData *mimeData = new QMimeData;
572 
574  // For dragging state onto other material buttons: //
576 
577  QByteArray byteArray = saveState();
578 
579  // buffer.close();
580  mimeData->setData("vp1/material", byteArray);
581 
582  // ////////////////////////////////////////////////////////
583  // // For dragging c++ code for defining this material //
584  // // into e.g. an editor: //
585  // ////////////////////////////////////////////////////////
586  //
587  // QString s = "SoMaterial * mat = new SoMaterial;\n";
588  // QString str_ambient = m_d->toSbColTxt(m_d->lastapplied_ambient);
589  // if (str_ambient!="SbColor(0.2,0.2,0.2)")
590  // s += "mat->ambientColor.setValue("+str_ambient+");\n";
591  // QString str_diffuse = m_d->toSbColTxt(m_d->lastapplied_diffuse);
592  // if (str_diffuse!="SbColor(0.8,0.8,0.8)")
593  // s += "mat->diffuseColor.setValue("+str_diffuse+");\n";
594  // QString str_specular = m_d->toSbColTxt(m_d->lastapplied_specular);
595  // if (str_specular!="SbColor(0,0,0)")
596  // s += "mat->specularColor.setValue("+str_specular+");\n";
597  // QString str_emissive = m_d->toSbColTxt(m_d->lastapplied_emissive);
598  // if (str_emissive!="SbColor(0,0,0)")
599  // s += "mat->emissiveColor.setValue("+str_emissive+");\n";
600  // QString str_shininess = m_d->printFloat(m_d->lastapplied_shininess/100.0);
601  // if (str_shininess!="0.2")
602  // s += "mat->shininess.setValue("+str_shininess+");\n";
603  // QString str_transparency = m_d->printFloat(m_d->lastapplied_transparency/100.0);
604  // if (str_transparency!="0")
605  // s += "mat->transparency.setValue("+str_transparency+");\n";
606  // mimeData->setText(s);
607 
608  //Execute drag:
609  drag->setMimeData(mimeData);//drag assumes ownership of mimeData
610  drag->exec(Qt::CopyAction | Qt::MoveAction);
611 }

◆ mousePressEvent()

void JetCollectionSettingsButton::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 547 of file JetCollectionSettingsButton.cxx.

548 {
549  if (event->button() == Qt::LeftButton)
550  m_d->dragStartPosition = event->pos();
551  QPushButton::mousePressEvent(event);
552 }

◆ possibleChange_bTaggingCut

void JetCollectionSettingsButton::possibleChange_bTaggingCut ( )
privateslot

Definition at line 934 of file JetCollectionSettingsButton.cxx.

935 {
936  messageVerbose("possibleChange_bTaggingCut() - " + QString::number(bTaggingCut()) );
937 
938  if (m_d->last_bTaggingCut == bTaggingCut() ) return;
939 
940  messageVerbose("bTaggingSpinBox changed");
942 
944 }

◆ possibleChange_bTaggingEnabled

void JetCollectionSettingsButton::possibleChange_bTaggingEnabled ( bool  bb)
privateslot

Definition at line 914 of file JetCollectionSettingsButton.cxx.

915 {
916  messageVerbose("possibleChange_bTaggingEnabled() - "+str(bb));
917 
918  m_d->ui_disp.bTaggingAlgLabel->setEnabled(bb);
919  m_d->ui_disp.bTagginWeightCutLabel->setEnabled(bb);
920  m_d->ui_disp.bTaggingComboBox->setEnabled(bb);
921  m_d->ui_disp.bTaggingSpinBox->setEnabled(bb);
922  m_d->ui_disp.groupBox_btagging_render->setEnabled(bb);
923  m_d->ui_disp.matButton_btaggedJets->setEnabled(bb);
924  emit bTaggingEnabledChanged(bb);
925 }

◆ possibleChange_bTaggingRenderingMaterial

void JetCollectionSettingsButton::possibleChange_bTaggingRenderingMaterial ( bool  ok)
privateslot

Definition at line 949 of file JetCollectionSettingsButton.cxx.

950 {
951  messageVerbose("possibleChange_bTaggingRenderingMaterial()");
952  messageVerbose("radioButton_material changed - " + QString::number(ok) );
953 
955 }

◆ possibleChange_bTaggingRenderingSkin

void JetCollectionSettingsButton::possibleChange_bTaggingRenderingSkin ( bool  ok)
privateslot

Definition at line 980 of file JetCollectionSettingsButton.cxx.

981 {
982  messageVerbose("possibleChange_bTaggingRenderingSkin()");
983  messageVerbose("radioButton_skins changed - " + QString::number(ok) );
984 
986 }

◆ possibleChange_bTaggingTagger

void JetCollectionSettingsButton::possibleChange_bTaggingTagger ( )
privateslot

Definition at line 928 of file JetCollectionSettingsButton.cxx.

929 {
930  messageVerbose("possibleChange_bTaggingTagger() - " + bTaggingTagger() );
932 }

◆ possibleChange_cutAllowedEta

void JetCollectionSettingsButton::possibleChange_cutAllowedEta ( )
privateslot

Definition at line 826 of file JetCollectionSettingsButton.cxx.

827 {
828  if (m_d->last_cutAllowedEta==cutAllowedEta()) return;
829  messageVerbose("cutAllowedEta() changed");
832 }

◆ possibleChange_cutAllowedPhi

void JetCollectionSettingsButton::possibleChange_cutAllowedPhi ( )
privateslot

Definition at line 834 of file JetCollectionSettingsButton.cxx.

835 {
836  if (m_d->last_cutAllowedPhi==cutAllowedPhi()) return;
837  messageVerbose("cutAllowedPhi() changed");
840 }

◆ possibleChange_cutAllowedPt

void JetCollectionSettingsButton::possibleChange_cutAllowedPt ( )
privateslot

Definition at line 816 of file JetCollectionSettingsButton.cxx.

817 {
818  messageVerbose("possibleChange_cutAllowedPt() ");
819 
820  if (m_d->last_cutAllowedPt==cutAllowedPt()) return;
821  messageVerbose("cutAllowedPt() changed");
824 }

◆ possibleChange_maxR

void JetCollectionSettingsButton::possibleChange_maxR ( )
privateslot

Definition at line 898 of file JetCollectionSettingsButton.cxx.

899 {
900  messageVerbose("possibleChange_maxR() ");
901 
902  if ( ! m_d->ui_disp.checkBox_maxR->isChecked() ) {
903  messageVerbose("maxR unchecked --> setting maxR=0.0 and returning");
904  emit maxRChanged(0.0); // setting marR=0.0 disables the maxR option in handleJet
905  return;
906  }
907 
908  messageDebug("setting maxR: "+QString::number(maxR()));
909  m_d->last_maxR = maxR();
910  emit maxRChanged(m_d->last_maxR);
911 }

◆ possibleChange_randomJetColours

void JetCollectionSettingsButton::possibleChange_randomJetColours ( )
privateslot

Definition at line 853 of file JetCollectionSettingsButton.cxx.

854 {
855  messageVerbose("possibleChange_randomJetColours() ");
856 
857  if (m_d->last_randomJetColours == randomJetColours() ) return;
858  messageVerbose("checkBox_randomColours changed");
861 }

◆ possibleChange_scale

void JetCollectionSettingsButton::possibleChange_scale ( )
privateslot

Definition at line 842 of file JetCollectionSettingsButton.cxx.

843 {
844  messageVerbose("possibleChange_scale() ");
845  if (m_d->last_scale == lengthOf100GeV()) return;
846 
847  messageVerbose("lengthOf100GeV changed");
849  emit scaleChanged(m_d->last_scale);
850 }

◆ randomJetColours()

bool JetCollectionSettingsButton::randomJetColours ( ) const

Definition at line 871 of file JetCollectionSettingsButton.cxx.

872 {
873  return m_d->ui_disp.checkBox_randomColours->isChecked();
874 }

◆ randomJetColoursChanged

void JetCollectionSettingsButton::randomJetColoursChanged ( const bool &  ra)
signal

◆ rerandomise

void JetCollectionSettingsButton::rerandomise ( )
signal

◆ restoreFromState()

void JetCollectionSettingsButton::restoreFromState ( const QByteArray &  ba)
virtual

Reimplemented from VP1CollectionSettingsButtonBase.

Definition at line 672 of file JetCollectionSettingsButton.cxx.

672  {
673 
674  messageDebug("JetCollectionSettingsButton::restoreFromState()");
675 
676  VP1Deserialise state(ba,systemBase());
677  if (state.version()<0||state.version()>1) {
678  messageDebug("restoreFromState() - ignoring...");
679  return;//Ignore silently
680  }
681  state.restore(m_d->matButton);
682 
683 
684  // COMMON SETTINGS
685  state.restore(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
686  state.restore(m_d->editwindow_ui.checkBox_cut_minpt);
687  state.restore(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev);
688  state.restore(m_d->editwindow_ui.checkBox_cut_maxpt);
689  state.restore(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev);
690  state.restore(m_d->editwindow_ui.comboBox_momtype);
691 
692  // ETA-PHI CUTS (from VP1Base/VP1EtaPhiCutWidget.cxx)
693  state.restore(m_d->editwindow_ui.etaPhiCutWidget);
694 
695  // JET SETTINGS
696  state.restore(m_d->ui_disp.checkBox_randomColours);
697  state.restore(m_d->ui_disp.doubleSpinBox_lengthOf100GeV);
698  state.restore(m_d->ui_disp.comboBox_energytype);
699  state.restore(m_d->ui_disp.checkBox_maxR);
700  state.restore(m_d->ui_disp.doubleSpinBox_maxR);
701 
702  state.restore(m_d->ui_disp.groupBox_IDprojection);
703  state.restore(m_d->ui_disp.checkBox_radialScale);
704  state.restore(m_d->ui_disp.doubleSpinBox_radialScale);
705 
706  state.restore(m_d->ui_disp.bTaggingCheckBox);
707  state.restore(m_d->ui_disp.bTaggingComboBox);
708  state.restore(m_d->ui_disp.bTaggingSpinBox);
709  state.restore(m_d->ui_disp.radioButton_material, m_d->ui_disp.radioButton_skins);
710  state.restore(m_d->ui_disp.matButton_btaggedJets);
711  state.restore(m_d->ui_disp.skinsComboBox);
712 
713 
714  // // Parameters
715 // state.restore(m_d->editwindow_ui.checkBox_showparameters);
716 // state.restore(m_d->editwindow_ui.checkBox_parameters_colourByType);
717 
718  state.widgetHandled(this);
719  state.warnUnrestored(this);
720 
721 // updateTrackTubeRadius();
722 // updateTrackLightModel(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
723 
724  updateButton();
725 
726  // after restoring the state, check status of selection cuts
727  checkSelection();
728 
729 
730 }

◆ saveState()

QByteArray JetCollectionSettingsButton::saveState ( ) const
virtual

fill out with the state of the object (used for drag and drop etc)

Reimplemented from VP1CollectionSettingsButtonBase.

Definition at line 622 of file JetCollectionSettingsButton.cxx.

622  {
623 
624  messageDebug("JetCollectionSettingsButton::saveState()");
625 
626  // messageVerbose("getState");
627  // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!");
628  VP1Serialise serialise(1/*version*/);
629 
630 
631  serialise.save(m_d->matButton);
632  //serialise.disableUnsavedChecks(); // TODO: what this does??
633 
634  // COMMON SETTINGS
635  serialise.save(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
636  serialise.save(m_d->editwindow_ui.checkBox_cut_minpt);
637  serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev);
638  serialise.save(m_d->editwindow_ui.checkBox_cut_maxpt);
639  serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev);
640  serialise.save(m_d->editwindow_ui.comboBox_momtype);
641 
642  // ETA-PHI CUTS (from VP1Base/VP1EtaPhiCutWidget.cxx)
643  serialise.save(m_d->editwindow_ui.etaPhiCutWidget);
644 
645  // JET SETTINGS
646  serialise.save(m_d->ui_disp.checkBox_randomColours);
647  serialise.save(m_d->ui_disp.doubleSpinBox_lengthOf100GeV);
648  serialise.save(m_d->ui_disp.comboBox_energytype);
649  serialise.save(m_d->ui_disp.checkBox_maxR);
650  serialise.save(m_d->ui_disp.doubleSpinBox_maxR);
651 
652  serialise.save(m_d->ui_disp.groupBox_IDprojection);
653  serialise.save(m_d->ui_disp.checkBox_radialScale);
654  serialise.save(m_d->ui_disp.doubleSpinBox_radialScale);
655 
656  serialise.save(m_d->ui_disp.bTaggingCheckBox);
657  serialise.save(m_d->ui_disp.bTaggingComboBox);
658  serialise.save(m_d->ui_disp.bTaggingSpinBox);
659  serialise.save(m_d->ui_disp.radioButton_material, m_d->ui_disp.radioButton_skins);
660  serialise.save(m_d->ui_disp.matButton_btaggedJets);
661  serialise.save(m_d->ui_disp.skinsComboBox);
662 
663  // Parameters
664 // serialise.save(m_d->editwindow_ui.checkBox_showparameters);
665 // serialise.save(m_d->editwindow_ui.checkBox_parameters_colourByType);
666 
667  serialise.widgetHandled(this);
668  serialise.warnUnsaved(this);
669  return serialise.result();
670 }

◆ scaleChanged

void JetCollectionSettingsButton::scaleChanged ( const double &  scale)
signal

◆ setDimension()

void JetCollectionSettingsButton::setDimension ( int  dim)

Definition at line 395 of file JetCollectionSettingsButton.cxx.

396 {
397  if (m_d->dim == dim)
398  return;
399  m_d->dim = dim;
400  updateButton();
401 }

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

59 { m_helpername = n; }

◆ setMaterial()

bool JetCollectionSettingsButton::setMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 414 of file JetCollectionSettingsButton.cxx.

415 {
416  // std::cout<<"JetCollectionSettingsButton::setMaterial with mat="<<mat<<std::endl;
417  if (!m_d->matButton) m_d->initEditWindow();
419  return true;
420 }

◆ setMaterialText

void JetCollectionSettingsButton::setMaterialText ( const QString &  t)
slot

Definition at line 181 of file JetCollectionSettingsButton.cxx.

182 {
183  VP1Msg::messageVerbose("JetCollectionSettingsButton::setMaterialText()");
184  if (m_d->editwindow)
185  m_d->editwindow->setWindowTitle(t);
186  setToolTip(t);
187 }

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

◆ showEditMaterialDialog

void JetCollectionSettingsButton::showEditMaterialDialog ( )
slot

Definition at line 403 of file JetCollectionSettingsButton.cxx.

404 {
405  if (!m_d->editwindow)
406  m_d->initEditWindow();
407 
408  if (m_d->editwindow->isHidden())
409  m_d->editwindow->show();
410  else
411  m_d->editwindow->hide();
412 }

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

◆ updateButton

void JetCollectionSettingsButton::updateButton ( )
protectedslot

Definition at line 387 of file JetCollectionSettingsButton.cxx.

388 {
389  if (objectName().isEmpty())
390  setObjectName("JetCollectionSettingsButton");
391  messageVerbose("jet - setColButtonProperties: color=" + str(m_d->matButton->lastAppliedDiffuseColour()));
393 }

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

Member Data Documentation

◆ m_d

Imp* JetCollectionSettingsButton::m_d
private

Definition at line 114 of file JetCollectionSettingsButton.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.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
JetCollectionSettingsButton::bTaggingRenderingSkinChanged
void bTaggingRenderingSkinChanged(bool)
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
JetCollectionSettingsButton::bTaggingTagger
QString bTaggingTagger() const
Definition: JetCollectionSettingsButton.cxx:215
JetCollectionSettingsButton::Imp::ui_disp
Ui::JetSysSettingsDisplayForm ui_disp
Definition: JetCollectionSettingsButton.cxx:55
JetCollectionSettingsButton::cutAllowedEta
VP1Interval cutAllowedEta() const
Definition: JetCollectionSettingsButton.cxx:799
JetCollectionSettingsButton::possibleChange_cutAllowedPhi
void possibleChange_cutAllowedPhi()
Definition: JetCollectionSettingsButton.cxx:834
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
VP1Serialise
Definition: VP1Serialise.h:45
max
#define max(a, b)
Definition: cfImp.cxx:41
JetCollectionSettingsButton::bTaggingCut
double bTaggingCut() const
Definition: JetCollectionSettingsButton.cxx:211
JetCollectionSettingsButton::Imp::last_cutAllowedPhi
QList< VP1Interval > last_cutAllowedPhi
Definition: JetCollectionSettingsButton.cxx:69
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
JetCollectionSettingsButton::possibleChange_maxR
void possibleChange_maxR()
Definition: JetCollectionSettingsButton.cxx:898
hist_file_dump.d
d
Definition: hist_file_dump.py:137
JetCollectionSettingsButton::Imp::initEditWindow
void initEditWindow()
Definition: JetCollectionSettingsButton.cxx:122
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
VP1HelperClassBase::m_helpername
QString m_helpername
Definition: VP1HelperClassBase.h:67
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
JetCollectionSettingsButton::Imp::last_scale
double last_scale
Definition: JetCollectionSettingsButton.cxx:70
VP1HelperClassBase::s_vp1verbose
static const bool s_vp1verbose
Definition: VP1HelperClassBase.h:69
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
JetCollectionSettingsButton::m_d
Imp * m_d
Definition: JetCollectionSettingsButton.h:113
JetCollectionSettingsButton::lengthOf100GeV
double lengthOf100GeV()
Definition: JetCollectionSettingsButton.cxx:192
JetCollectionSettingsButton::possibleChange_bTaggingCut
void possibleChange_bTaggingCut()
Definition: JetCollectionSettingsButton.cxx:934
skel.it
it
Definition: skel.GENtoEVGEN.py:396
JetCollectionSettingsButton::cutAllowedEtaChanged
void cutAllowedEtaChanged(const VP1Interval &)
JetCollectionSettingsButton::cutAllowedPtChanged
void cutAllowedPtChanged(const VP1Interval &)
JetCollectionSettingsButton::bTaggingCutChanged
void bTaggingCutChanged(const double &)
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
JetCollectionSettingsButton::randomJetColours
bool randomJetColours() const
Definition: JetCollectionSettingsButton.cxx:871
JetCollectionSettingsButton::updateButton
void updateButton()
Definition: JetCollectionSettingsButton.cxx:387
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
JetCollectionSettingsButton::Imp::editwindow_ui
Ui::IParticleCollectionSettingsForm editwindow_ui
Definition: JetCollectionSettingsButton.cxx:54
VP1HelperClassBase::m_system
IVP1System * m_system
Definition: VP1HelperClassBase.h:68
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
VP1MaterialButton::lastAppliedDiffuseColour
QColor lastAppliedDiffuseColour() const
Definition: VP1MaterialButton.cxx:167
JetCollectionSettingsButton::cutAllowedPt
VP1Interval cutAllowedPt() const
Definition: JetCollectionSettingsButton.cxx:763
JetCollectionSettingsButton::Imp::dragStartPosition
QPoint dragStartPosition
Definition: JetCollectionSettingsButton.cxx:102
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
VP1ColorSelectButton::setColButtonProperties
static void setColButtonProperties(QPushButton *, const QColor &col, int dim)
Definition: VP1ColorSelectButton.cxx:49
JetCollectionSettingsButton::cutAllowedPhi
QList< VP1Interval > cutAllowedPhi() const
Definition: JetCollectionSettingsButton.cxx:807
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
JetCollectionSettingsButton::possibleChange_bTaggingEnabled
void possibleChange_bTaggingEnabled(bool)
Definition: JetCollectionSettingsButton.cxx:914
VP1CollectionSettingsButtonBase::m_d
Imp * m_d
Definition: VP1CollectionSettingsButtonBase.h:38
JetCollectionSettingsButton::showEditMaterialDialog
void showEditMaterialDialog()
Definition: JetCollectionSettingsButton.cxx:403
JetCollectionSettingsButton::possibleChange_cutAllowedEta
void possibleChange_cutAllowedEta()
Definition: JetCollectionSettingsButton.cxx:826
JetCollectionSettingsButton::Imp::last_bTaggingCut
double last_bTaggingCut
Definition: JetCollectionSettingsButton.cxx:83
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
JetCollectionSettingsButton::Imp::editwindow
QWidget * editwindow
Definition: JetCollectionSettingsButton.cxx:53
JetCollectionSettingsButton::scaleChanged
void scaleChanged(const double &scale)
JetCollectionSettingsButton::bTaggingTaggerChanged
void bTaggingTaggerChanged(const QString &)
JetCollectionSettingsButton::Imp::last_cutAllowedPt
VP1Interval last_cutAllowedPt
Definition: JetCollectionSettingsButton.cxx:66
JetCollectionSettingsButton::emitRerandomise
void emitRerandomise()
Definition: JetCollectionSettingsButton.cxx:878
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
VP1CollectionSettingsButtonBase::getMaterial
SoMaterial * getMaterial(VP1MaterialButton *) const
Definition: VP1CollectionSettingsButtonBase.cxx:62
JetCollectionSettingsButton::enableMaxR
void enableMaxR(bool)
Definition: JetCollectionSettingsButton.cxx:892
JetCollectionSettingsButton::Imp::last_maxR
double last_maxR
Definition: JetCollectionSettingsButton.cxx:74
beamspotman.n
n
Definition: beamspotman.py:731
VP1MaterialButton::lastAppliedBrightness
double lastAppliedBrightness() const
Definition: VP1MaterialButton.cxx:173
JetCollectionSettingsButton::maxR
double maxR()
Returns -1 if disabled in GUI, or value in m if enabled.
Definition: JetCollectionSettingsButton.cxx:202
JetCollectionSettingsButton::possibleChange_scale
void possibleChange_scale()
Definition: JetCollectionSettingsButton.cxx:842
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
JetCollectionSettingsButton::possibleChange_bTaggingTagger
void possibleChange_bTaggingTagger()
Definition: JetCollectionSettingsButton.cxx:928
hist_file_dump.f
f
Definition: hist_file_dump.py:135
JetCollectionSettingsButton::checkSelection
void checkSelection()
Definition: JetCollectionSettingsButton.cxx:733
JetCollectionSettingsButton::Imp::name
QString name
Definition: JetCollectionSettingsButton.cxx:101
VP1CollectionSettingsButtonBase::VP1CollectionSettingsButtonBase
VP1CollectionSettingsButtonBase(QWidget *parent=0, int dim=25)
Definition: VP1CollectionSettingsButtonBase.cxx:34
VP1CollectionSettingsButtonBase::fallBackMaterial
SoMaterial * fallBackMaterial() const
Definition: VP1CollectionSettingsButtonBase.cxx:52
VP1Deserialise
Definition: VP1Deserialise.h:44
JetCollectionSettingsButton::maxRChanged
void maxRChanged(const double &maxR)
JetCollectionSettingsButton::Imp::last_cutAllowedEta
VP1Interval last_cutAllowedEta
Definition: JetCollectionSettingsButton.cxx:68
JetCollectionSettingsButton::Imp::materialFallback
SoMaterial * materialFallback
Definition: JetCollectionSettingsButton.cxx:92
min
#define min(a, b)
Definition: cfImp.cxx:40
JetCollectionSettingsButton::saveState
QByteArray saveState() const
fill out with the state of the object (used for drag and drop etc)
Definition: JetCollectionSettingsButton.cxx:622
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1142
VP1MaterialButton::setMaterial
bool setMaterial(SoMaterial *)
Definition: VP1MaterialButton.cxx:447
JetCollectionSettingsButton::rerandomise
void rerandomise()
JetCollectionSettingsButton::cutAllowedPhiChanged
void cutAllowedPhiChanged(const QList< VP1Interval > &)
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:221
JetCollectionSettingsButton::Imp::theclass
JetCollectionSettingsButton * theclass
Definition: JetCollectionSettingsButton.cxx:50
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
JetCollectionSettingsButton::restoreFromState
void restoreFromState(const QByteArray &)
Definition: JetCollectionSettingsButton.cxx:672
VP1Msg::messageVerbose
static void messageVerbose(const QString &)
Definition: VP1Msg.cxx:84
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
JetCollectionSettingsButton::possibleChange_cutAllowedPt
void possibleChange_cutAllowedPt()
Definition: JetCollectionSettingsButton.cxx:816
VP1MaterialButton::lastAppliedShininess
double lastAppliedShininess() const
Definition: VP1MaterialButton.cxx:172
python.PyAthena.v
v
Definition: PyAthena.py:154
JetCollectionSettingsButton::Imp::last_randomJetColours
bool last_randomJetColours
Definition: JetCollectionSettingsButton.cxx:72
VP1Msg::prefix_verbose
static const char * prefix_verbose()
Definition: VP1Msg.h:59
VP1Interval
Definition: VP1Interval.h:23
y
#define y
TRT_PAI_physicsConstants::mb
const double mb
1mb to cm2
Definition: TRT_PAI_physicsConstants.h:15
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
JetCollectionSettingsButton::Imp::dim
int dim
Definition: JetCollectionSettingsButton.cxx:100
JetCollectionSettingsButton::possibleChange_bTaggingRenderingMaterial
void possibleChange_bTaggingRenderingMaterial(bool)
Definition: JetCollectionSettingsButton.cxx:949
JetCollectionSettingsButton::Imp::matButton
VP1MaterialButton * matButton
Definition: JetCollectionSettingsButton.cxx:57
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
JetCollectionSettingsButton::randomJetColoursChanged
void randomJetColoursChanged(const bool &ra)
str
Definition: BTagTrackIpAccessor.cxx:11
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
JetCollectionSettingsButton::possibleChange_bTaggingRenderingSkin
void possibleChange_bTaggingRenderingSkin(bool ok)
Definition: JetCollectionSettingsButton.cxx:980
JetCollectionSettingsButton::enableRandomColours
void enableRandomColours(bool)
Definition: JetCollectionSettingsButton.cxx:865
JetCollectionSettingsButton::Imp::createMaterial
SoMaterial * createMaterial(int r, int g, int b) const
Definition: JetCollectionSettingsButton.cxx:109
VP1MaterialButton::lastAppliedTransparency
double lastAppliedTransparency() const
Definition: VP1MaterialButton.cxx:171
JetCollectionSettingsButton::possibleChange_randomJetColours
void possibleChange_randomJetColours()
Definition: JetCollectionSettingsButton.cxx:853
python.compressB64.c
def c
Definition: compressB64.py:93
JetCollectionSettingsButton::bTaggingRenderingMaterialChanged
void bTaggingRenderingMaterialChanged(const bool &)
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
VP1CollectionSettingsButtonBase::Imp::fallBackMaterial
SoMaterial * fallBackMaterial
Definition: VP1CollectionSettingsButtonBase.cxx:29
VP1MaterialButtonBase::lastAppliedChanged
void lastAppliedChanged()
JetCollectionSettingsButton::bTaggingEnabledChanged
void bTaggingEnabledChanged(const bool &)