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

#include <TrackCollectionSettingsButton.h>

Inheritance diagram for TrackCollectionSettingsButton:
Collaboration diagram for TrackCollectionSettingsButton:

Classes

class  Imp
 

Public Slots

void showEditMaterialDialog ()
 
void setText (const QString &)
 

Signals

void trackTubeRadiusChanged (const double &)
 
void lastAppliedChanged ()
 
void hideActualTrackPathChanged (bool)
 
void useDefaultCutsChanged (bool)
 
void cutAllowedPtChanged (const VP1Interval &)
 
void cutAllowedEtaChanged (const VP1Interval &)
 
void cutAllowedPhiChanged (const QList< VP1Interval > &)
 
void cutRequiredNHitsChanged (const QList< unsigned > &)
 
void cutRequiredDetectorElementChanged (const QString &)
 
void cutTruthFromIROnlyChanged (bool)
 
void cutExcludeBarcodeZeroChanged (bool)
 
void cutTruthExcludeNeutralsChanged (bool)
 
void cutOnlyVertexAssocTracksChanged (bool)
 

Public Member Functions

 TrackCollectionSettingsButton (QWidget *parent=0, int dim=25)
 
virtual ~TrackCollectionSettingsButton ()
 
void setDimension (int dim)
 
virtual bool setMaterial (SoMaterial *)
 
virtual void copyValuesFromMaterial (SoMaterial *)
 
virtual double lastAppliedTransparency () const
 
virtual double lastAppliedShininess () const
 
virtual double lastAppliedBrightness () const
 
double trackTubeRadius () const
 
bool hideActualTrackPath () const
 
bool useDefaultCuts () const
 
bool cutOnlyVertexAssocTracks () const
 Return true if this collection should only should tracks associated to a vertex. More...
 
VP1Interval cutAllowedPt () const
 
VP1Interval cutAllowedEta () const
 
QList< VP1IntervalcutAllowedPhi () const
 
QList< unsigned > cutRequiredNHits () const
 
QString cutRequiredDetectorElement () const
 
bool cutTruthFromIROnly () const
 
bool cutExcludeBarcodeZero () const
 
bool cutTruthExcludeNeutrals () const
 
SoDrawStyle * trackDrawStyle () const
 
SoLightModel * trackLightModel () const
 
QByteArray saveState () const
 fill out with the state of the object (used for drag and drop etc) More...
 
void restoreFromState (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 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 updateTrackDrawStyle ()
 
void updateTrackLightModel (bool)
 
void updateTrackTubeRadius ()
 
void updateHideActualTrackPath (bool)
 
void possibleChange_useDefaultCuts ()
 
void possibleChange_cutAllowedPt ()
 
void possibleChange_cutAllowedEta ()
 
void possibleChange_cutAllowedPhi ()
 
void possibleChange_cutRequiredNHits ()
 
void possibleChange_cutRequiredDetectorElement ()
 
void possibleChange_cutTruthFromIROnly ()
 
void possibleChange_cutExcludeBarcodeZero ()
 
void possibleChange_cutTruthExcludeNeutrals ()
 
void possibleChange_cutOnlyVertexAssocTracks ()
 

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 13 of file TrackCollectionSettingsButton.h.

Constructor & Destructor Documentation

◆ TrackCollectionSettingsButton()

TrackCollectionSettingsButton::TrackCollectionSettingsButton ( QWidget *  parent = 0,
int  dim = 25 
)

Definition at line 92 of file TrackCollectionSettingsButton.cxx.

93  : VP1MaterialButtonBase(parent,nullptr,"VP1MaterialButton"), m_d(new Imp)
94 {
95  m_d->dim = dim;
96 
97  m_d->theclass = this;
99 
100  // declare the current serialization version number
102 
103 
104  //Draw Styles / Complexity:
105  VP1QtInventorUtils::setLimitsLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
106  VP1QtInventorUtils::setValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth,1.0);
107 
108  m_d->trackDrawStyle = new SoDrawStyle;
109  m_d->trackDrawStyle->setName("TrackDrawStyle");
110  m_d->trackDrawStyle->ref();
112  connect(m_d->editwindow_ui.horizontalSlider_trackWidth,SIGNAL(valueChanged(int)),this,SLOT(updateTrackDrawStyle()));
113 
114  m_d->trackLightModel = new SoLightModel;
115  m_d->trackLightModel->setName("TrackLightModel");
116  m_d->trackLightModel->ref();
117  updateTrackLightModel(false);
118  connect(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel,SIGNAL(toggled(bool)),this,SLOT(updateTrackLightModel(bool)));
119 
121  connect(m_d->editwindow_ui.checkBox_trackTubes,SIGNAL(toggled(bool)),this,SLOT(updateTrackTubeRadius()));
122  connect(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM,SIGNAL(valueChanged(double)),this,SLOT(updateTrackTubeRadius()));
123 
124  connect(m_d->editwindow_ui.checkBox_hideactualpaths,SIGNAL(toggled(bool)),this,SLOT(updateHideActualTrackPath(bool)));
125 
126  // Cuts
127  connect(m_d->editwindow_ui.checkBox_defaultCuts,SIGNAL(toggled(bool)),this,SLOT(possibleChange_useDefaultCuts()));
128  m_d->last_useDefaultCuts=m_d->editwindow_ui.checkBox_defaultCuts->isChecked();
129  messageVerbose("editwindow_ui.checkBox_defaultCuts->isChecked() L " + str(m_d->editwindow_ui.checkBox_defaultCuts->isChecked()));
130 
131 
132  // -> cutAllowedP/Pt
133  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
134  connect(m_d->editwindow_ui.checkBox_cut_maxpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
135  connect(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
136  connect(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev,SIGNAL(valueChanged(double)),this,SLOT(possibleChange_cutAllowedPt()));
137  connect(m_d->editwindow_ui.checkBox_cut_minpt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutAllowedPt()));
138  //connect(m_d->editwindow_ui.comboBox_momtype,SIGNAL(valueChanged(bool)),this,SLOT(possibleChange_cutAllowedPt()));
139  connect(m_d->editwindow_ui.comboBox_momtype,SIGNAL(currentIndexChanged(int)),this,SLOT(possibleChange_cutAllowedPt()));
140 
141 
142  // -> cutAllowedEta
143  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedEtaChanged(const VP1Interval&)),this,SLOT(possibleChange_cutAllowedEta()));
144 
145  // -> cutAllowedPhi
146  connect(m_d->editwindow_ui.etaPhiCutWidget,SIGNAL(allowedPhiChanged(const QList<VP1Interval>&)),this,SLOT(possibleChange_cutAllowedPhi()));
147 
148  // -> cutRequiredNHits();
149  connect(m_d->editwindow_ui.checkBox_cut_nhits_pixel,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
150  connect(m_d->editwindow_ui.checkBox_cut_nhits_sct,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
151  connect(m_d->editwindow_ui.checkBox_cut_nhits_trt,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
152  connect(m_d->editwindow_ui.checkBox_cut_nhits_muon,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
153  connect(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredNHits()));
154  connect(m_d->editwindow_ui.spinBox_cut_nhits_pixel,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
155  connect(m_d->editwindow_ui.spinBox_cut_nhits_sct,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
156  connect(m_d->editwindow_ui.spinBox_cut_nhits_trt,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
157  connect(m_d->editwindow_ui.spinBox_cut_nhits_muon,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
158  connect(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon,SIGNAL(valueChanged(int)),this,SLOT(possibleChange_cutRequiredNHits()));
159 
160  // Required detector element
161  connect(m_d->editwindow_ui.checkBox_requireDetectorElement,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutRequiredDetectorElement()));
162  connect(m_d->editwindow_ui.lineEdit_detectorElementId,SIGNAL(textChanged(QString)),this,SLOT(possibleChange_cutRequiredDetectorElement()));
163 
164  // -> cutTruthFromIROnly
165  connect(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutTruthFromIROnly()));
166 
167  // -> cutExcludeBarcodeZero
168  connect(m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutExcludeBarcodeZero()));
169 
170  // -> cutTruthExcludeNeutrals
171  connect(m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutTruthExcludeNeutrals()));
172 
173  // -> cutOnlyVertexAssocTracks
174  connect(m_d->editwindow_ui.checkBox_vertexAssociated,SIGNAL(toggled(bool)),this,SLOT(possibleChange_cutOnlyVertexAssocTracks()));
175 
176  connect(this,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
177  connect(m_d->editwindow_ui.pushButton_close,SIGNAL(clicked()),this,SLOT(showEditMaterialDialog()));
178  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SLOT(updateButton()));
179  connect(m_d->matButton,SIGNAL(lastAppliedChanged()),this,SIGNAL(lastAppliedChanged()));
180  setAcceptDrops(true);
181 
182  QTimer::singleShot(0, this, SLOT(updateButton()));
183 
184 }

◆ ~TrackCollectionSettingsButton()

TrackCollectionSettingsButton::~TrackCollectionSettingsButton ( )
virtual

Definition at line 191 of file TrackCollectionSettingsButton.cxx.

192 {
193  delete m_d->editwindow;
194  m_d->trackDrawStyle->unref();
195  m_d->trackLightModel->unref();
196  delete m_d;
197 }

Member Function Documentation

◆ copyValuesFromMaterial()

void TrackCollectionSettingsButton::copyValuesFromMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 233 of file TrackCollectionSettingsButton.cxx.

234 {
235  if (!m_d->matButton) m_d->initEditWindow();
237 }

◆ cutAllowedEta()

VP1Interval TrackCollectionSettingsButton::cutAllowedEta ( ) const

Definition at line 523 of file TrackCollectionSettingsButton.cxx.

524 {
525  return m_d->editwindow_ui.etaPhiCutWidget->allowedEta();
526 }

◆ cutAllowedEtaChanged

void TrackCollectionSettingsButton::cutAllowedEtaChanged ( const VP1Interval )
signal

◆ cutAllowedPhi()

QList< VP1Interval > TrackCollectionSettingsButton::cutAllowedPhi ( ) const

Definition at line 529 of file TrackCollectionSettingsButton.cxx.

530 {
531  return m_d->editwindow_ui.etaPhiCutWidget->allowedPhi();
532 }

◆ cutAllowedPhiChanged

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

◆ cutAllowedPt()

VP1Interval TrackCollectionSettingsButton::cutAllowedPt ( ) const

Definition at line 489 of file TrackCollectionSettingsButton.cxx.

490 {
491  if (!m_d->editwindow_ui.checkBox_cut_minpt)
492  return {};
493 
494  // will set range to negative if we have momcut=P
495  // if minCut unset then min=-inf
496  // if minCut set, and Pt selected, then min=-minCut
497  // if minCut set, and P selected, then min=-maxCut
498  // etc
499  bool isPCut = m_d->editwindow_ui.comboBox_momtype->currentText()=="P";
500 
501  const double minFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev->value()*CLHEP::GeV;
502  const double maxFromInterface=m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev->value()*CLHEP::GeV;
503 
504  double min=0.0,max=0.0;
505  if (!isPCut) {
506  //Pt cut
507  min = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? minFromInterface : -std::numeric_limits<double>::infinity());
508  max = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? maxFromInterface : std::numeric_limits<double>::infinity());
509  } else {
510  min = (m_d->editwindow_ui.checkBox_cut_maxpt->isChecked() ? -maxFromInterface : -std::numeric_limits<double>::infinity());
511  max = (m_d->editwindow_ui.checkBox_cut_minpt->isChecked() ? -minFromInterface : std::numeric_limits<double>::infinity());
512  }
513 
514  //message("cutAllowedPt: min,max="+QString::number(min)+","+QString::number(max));
515 
516  if (max<min)
517  return {};
518 
519  return VP1Interval( min, max );//fixme: closed interval??
520 }

◆ cutAllowedPtChanged

void TrackCollectionSettingsButton::cutAllowedPtChanged ( const VP1Interval )
signal

◆ cutExcludeBarcodeZero()

bool TrackCollectionSettingsButton::cutExcludeBarcodeZero ( ) const

Definition at line 560 of file TrackCollectionSettingsButton.cxx.

561 {
562  return m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0->isChecked();
563 }

◆ cutExcludeBarcodeZeroChanged

void TrackCollectionSettingsButton::cutExcludeBarcodeZeroChanged ( bool  )
signal

◆ cutOnlyVertexAssocTracks()

bool TrackCollectionSettingsButton::cutOnlyVertexAssocTracks ( ) const

Return true if this collection should only should tracks associated to a vertex.

Definition at line 313 of file TrackCollectionSettingsButton.cxx.

314 {
315  return m_d->editwindow_ui.checkBox_vertexAssociated->isChecked();
316 }

◆ cutOnlyVertexAssocTracksChanged

void TrackCollectionSettingsButton::cutOnlyVertexAssocTracksChanged ( bool  )
signal

◆ cutRequiredDetectorElement()

QString TrackCollectionSettingsButton::cutRequiredDetectorElement ( ) const

Definition at line 549 of file TrackCollectionSettingsButton.cxx.

549  {
550  return m_d->editwindow_ui.checkBox_requireDetectorElement->isChecked() ? m_d->editwindow_ui.lineEdit_detectorElementId->text(): QString();
551 }

◆ cutRequiredDetectorElementChanged

void TrackCollectionSettingsButton::cutRequiredDetectorElementChanged ( const QString &  )
signal

◆ cutRequiredNHits()

QList< unsigned > TrackCollectionSettingsButton::cutRequiredNHits ( ) const

Definition at line 535 of file TrackCollectionSettingsButton.cxx.

536 {
537  unsigned npixel = m_d->editwindow_ui.checkBox_cut_nhits_pixel->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_pixel->value() : 0;
538  unsigned nsct = m_d->editwindow_ui.checkBox_cut_nhits_sct->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_sct->value() : 0;
539  unsigned ntrt = m_d->editwindow_ui.checkBox_cut_nhits_trt->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_trt->value() : 0;
540  unsigned nmuon = m_d->editwindow_ui.checkBox_cut_nhits_muon->isChecked() ? m_d->editwindow_ui.spinBox_cut_nhits_muon->value() : 0;
541  unsigned nprecmuon = m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon->isChecked() ? m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon->value() : 0;
542  QList<unsigned> l;
543  if (!npixel&&!nsct&&!ntrt&&!nmuon&&!nprecmuon)
544  return l;
545  l << npixel << nsct << ntrt << nmuon << nprecmuon;
546  return l;
547 }

◆ cutRequiredNHitsChanged

void TrackCollectionSettingsButton::cutRequiredNHitsChanged ( const QList< unsigned > &  )
signal

◆ cutTruthExcludeNeutrals()

bool TrackCollectionSettingsButton::cutTruthExcludeNeutrals ( ) const

Definition at line 566 of file TrackCollectionSettingsButton.cxx.

567 {
568  return m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals->isChecked();
569 }

◆ cutTruthExcludeNeutralsChanged

void TrackCollectionSettingsButton::cutTruthExcludeNeutralsChanged ( bool  )
signal

◆ cutTruthFromIROnly()

bool TrackCollectionSettingsButton::cutTruthFromIROnly ( ) const

Definition at line 554 of file TrackCollectionSettingsButton.cxx.

555 {
556  return m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR->isChecked();
557 }

◆ cutTruthFromIROnlyChanged

void TrackCollectionSettingsButton::cutTruthFromIROnlyChanged ( bool  )
signal

◆ dragEnterEvent()

void TrackCollectionSettingsButton::dragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 327 of file TrackCollectionSettingsButton.cxx.

328 {
329  if (event->source()!=this && event->mimeData()->hasFormat("vp1/material"))
330  event->acceptProposedAction();
331 }

◆ dropEvent()

void TrackCollectionSettingsButton::dropEvent ( QDropEvent *  event)
protected

Definition at line 386 of file TrackCollectionSettingsButton.cxx.

387 {
388  QByteArray data = event->mimeData()->data("vp1/material");
389  event->acceptProposedAction();
391 }

◆ helperClassName()

const QString& VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51 { return m_helpername; }

◆ hideActualTrackPath()

bool TrackCollectionSettingsButton::hideActualTrackPath ( ) const

Definition at line 302 of file TrackCollectionSettingsButton.cxx.

303 {
304  return m_d->editwindow_ui.checkBox_hideactualpaths->isChecked();
305 }

◆ hideActualTrackPathChanged

void TrackCollectionSettingsButton::hideActualTrackPathChanged ( bool  )
signal

◆ lastAppliedBrightness()

double TrackCollectionSettingsButton::lastAppliedBrightness ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 248 of file TrackCollectionSettingsButton.cxx.

249 {
250  if (!m_d->matButton) m_d->initEditWindow();
252 }

◆ lastAppliedChanged

void TrackCollectionSettingsButton::lastAppliedChanged ( )
signal

◆ lastAppliedShininess()

double TrackCollectionSettingsButton::lastAppliedShininess ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 243 of file TrackCollectionSettingsButton.cxx.

244 {
245  if (!m_d->matButton) m_d->initEditWindow();
247 }

◆ lastAppliedTransparency()

double TrackCollectionSettingsButton::lastAppliedTransparency ( ) const
virtual

Implements VP1MaterialButtonBase.

Definition at line 238 of file TrackCollectionSettingsButton.cxx.

239 {
240  if (!m_d->matButton) m_d->initEditWindow();
242 }

◆ message() [1/3]

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

Definition at line 49 of file VP1HelperClassBase.cxx.

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

◆ message() [2/3]

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

Definition at line 131 of file VP1HelperClassBase.cxx.

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

◆ message() [3/3]

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

Definition at line 91 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [1/3]

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

Definition at line 65 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [2/3]

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

Definition at line 147 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [3/3]

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

Definition at line 103 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [1/3]

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

Definition at line 78 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [2/3]

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

Definition at line 165 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [3/3]

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

Definition at line 117 of file VP1HelperClassBase.cxx.

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

◆ mouseMoveEvent()

void TrackCollectionSettingsButton::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 334 of file TrackCollectionSettingsButton.cxx.

335 {
336  if (!(event->buttons() & Qt::LeftButton))
337  return;
338  if ((event->pos() - m_d->dragStartPosition).manhattanLength()
339  < QApplication::startDragDistance())
340  return;
341 
342  QDrag *drag = new QDrag(this);
343  QMimeData *mimeData = new QMimeData;
344 
346  // For dragging state onto other material buttons: //
348 
349  QByteArray byteArray = saveState();
350 
351  // buffer.close();
352  mimeData->setData("vp1/material", byteArray);
353 
354  // ////////////////////////////////////////////////////////
355  // // For dragging c++ code for defining this material //
356  // // into e.g. an editor: //
357  // ////////////////////////////////////////////////////////
358  //
359  // QString s = "SoMaterial * mat = new SoMaterial;\n";
360  // QString str_ambient = m_d->toSbColTxt(m_d->lastapplied_ambient);
361  // if (str_ambient!="SbColor(0.2,0.2,0.2)")
362  // s += "mat->ambientColor.setValue("+str_ambient+");\n";
363  // QString str_diffuse = m_d->toSbColTxt(m_d->lastapplied_diffuse);
364  // if (str_diffuse!="SbColor(0.8,0.8,0.8)")
365  // s += "mat->diffuseColor.setValue("+str_diffuse+");\n";
366  // QString str_specular = m_d->toSbColTxt(m_d->lastapplied_specular);
367  // if (str_specular!="SbColor(0,0,0)")
368  // s += "mat->specularColor.setValue("+str_specular+");\n";
369  // QString str_emissive = m_d->toSbColTxt(m_d->lastapplied_emissive);
370  // if (str_emissive!="SbColor(0,0,0)")
371  // s += "mat->emissiveColor.setValue("+str_emissive+");\n";
372  // QString str_shininess = m_d->printFloat(m_d->lastapplied_shininess/100.0);
373  // if (str_shininess!="0.2")
374  // s += "mat->shininess.setValue("+str_shininess+");\n";
375  // QString str_transparency = m_d->printFloat(m_d->lastapplied_transparency/100.0);
376  // if (str_transparency!="0")
377  // s += "mat->transparency.setValue("+str_transparency+");\n";
378  // mimeData->setText(s);
379 
380  //Execute drag:
381  drag->setMimeData(mimeData);//drag assumes ownership of mimeData
382  drag->exec(Qt::CopyAction | Qt::MoveAction);
383 }

◆ mousePressEvent()

void TrackCollectionSettingsButton::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 319 of file TrackCollectionSettingsButton.cxx.

320 {
321  if (event->button() == Qt::LeftButton)
322  m_d->dragStartPosition = event->pos();
323  QPushButton::mousePressEvent(event);
324 }

◆ possibleChange_cutAllowedEta

void TrackCollectionSettingsButton::possibleChange_cutAllowedEta ( )
privateslot

Definition at line 593 of file TrackCollectionSettingsButton.cxx.

594 {
595  if (m_d->last_cutAllowedEta==cutAllowedEta()) return;
596  messageVerbose("cutAllowedEta() changed");
599 }

◆ possibleChange_cutAllowedPhi

void TrackCollectionSettingsButton::possibleChange_cutAllowedPhi ( )
privateslot

Definition at line 601 of file TrackCollectionSettingsButton.cxx.

602 {
603  if (m_d->last_cutAllowedPhi==cutAllowedPhi()) return;
604  messageVerbose("cutAllowedPhi() changed");
607 }

◆ possibleChange_cutAllowedPt

void TrackCollectionSettingsButton::possibleChange_cutAllowedPt ( )
privateslot

Definition at line 583 of file TrackCollectionSettingsButton.cxx.

584 {
585  messageVerbose("possibleChange_cutAllowedPt() ");
586 
587  if (m_d->last_cutAllowedPt==cutAllowedPt()) return;
588  messageVerbose("cutAllowedPt() changed");
591 }

◆ possibleChange_cutExcludeBarcodeZero

void TrackCollectionSettingsButton::possibleChange_cutExcludeBarcodeZero ( )
privateslot

Definition at line 635 of file TrackCollectionSettingsButton.cxx.

636 {
638  messageVerbose("cutExcludeBarcodeZero() changed");
641 }

◆ possibleChange_cutOnlyVertexAssocTracks

void TrackCollectionSettingsButton::possibleChange_cutOnlyVertexAssocTracks ( )
privateslot

◆ possibleChange_cutRequiredDetectorElement

void TrackCollectionSettingsButton::possibleChange_cutRequiredDetectorElement ( )
privateslot

Definition at line 618 of file TrackCollectionSettingsButton.cxx.

619 {
620  messageVerbose("TrackCollectionSettingsButton::possibleChange_cutRequiredDetectorElement");
622  messageVerbose("cutRequiredDetectorElement() changed");
625 }

◆ possibleChange_cutRequiredNHits

void TrackCollectionSettingsButton::possibleChange_cutRequiredNHits ( )
privateslot

Definition at line 609 of file TrackCollectionSettingsButton.cxx.

610 {
611  messageVerbose("TrackCollectionSettingsButton::possibleChange_cutRequiredNHits");
613  messageVerbose("cutRequiredNHits() changed");
616 }

◆ possibleChange_cutTruthExcludeNeutrals

void TrackCollectionSettingsButton::possibleChange_cutTruthExcludeNeutrals ( )
privateslot

Definition at line 644 of file TrackCollectionSettingsButton.cxx.

◆ possibleChange_cutTruthFromIROnly

void TrackCollectionSettingsButton::possibleChange_cutTruthFromIROnly ( )
privateslot

Definition at line 627 of file TrackCollectionSettingsButton.cxx.

628 {
630  messageVerbose("cutTruthFromIROnly() changed");
633 }

◆ possibleChange_useDefaultCuts

void TrackCollectionSettingsButton::possibleChange_useDefaultCuts ( )
privateslot

Definition at line 575 of file TrackCollectionSettingsButton.cxx.

576 {
577  if (m_d->last_useDefaultCuts==useDefaultCuts()) return;
578  messageVerbose("useDefaultCuts() changed");
581 }

◆ restoreFromState()

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

Implements VP1MaterialButtonBase.

Definition at line 440 of file TrackCollectionSettingsButton.cxx.

440  {
441 
442  VP1Deserialise state(ba,systemBase());
443 
444  if (state.version()<0||state.version()>2) {
445  message("Version of 'TrackCollectionSettingsButton' settings file not recognized: "+QString::number(state.version())+" [current: "+QString::number(m_d->serialization_version)+"]. Ignoring...");
446  return;//Ignore silently
447  }
448  state.restore(m_d->matButton);
449  state.restore(m_d->editwindow_ui.horizontalSlider_trackWidth);
450  state.restore(m_d->editwindow_ui.checkBox_trackTubes);
451  state.restore(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM);
452  state.restore(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
453  state.restore(m_d->editwindow_ui.checkBox_hideactualpaths);
454  state.restore(m_d->editwindow_ui.checkBox_defaultCuts);
455 
456  state.restore(m_d->editwindow_ui.checkBox_cut_minpt);
457  state.restore(m_d->editwindow_ui.checkBox_cut_maxpt);
458  state.restore(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev);
459  state.restore(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev);
460  state.restore(m_d->editwindow_ui.checkBox_cut_minpt);
461  state.restore(m_d->editwindow_ui.comboBox_momtype);
462  state.restore(m_d->editwindow_ui.etaPhiCutWidget);
463  state.restore(m_d->editwindow_ui.etaPhiCutWidget);
464  state.restore(m_d->editwindow_ui.checkBox_cut_nhits_pixel);
465  state.restore(m_d->editwindow_ui.checkBox_cut_nhits_sct);
466  state.restore(m_d->editwindow_ui.checkBox_cut_nhits_trt);
467  state.restore(m_d->editwindow_ui.checkBox_cut_nhits_muon);
468  state.restore(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon);
469  state.restore(m_d->editwindow_ui.spinBox_cut_nhits_pixel);
470  state.restore(m_d->editwindow_ui.spinBox_cut_nhits_sct);
471  state.restore(m_d->editwindow_ui.spinBox_cut_nhits_trt);
472  state.restore(m_d->editwindow_ui.spinBox_cut_nhits_muon);
473  state.restore(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon);
474  state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR);
475  state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0);
476  state.restore(m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals);
477  state.restore(m_d->editwindow_ui.checkBox_vertexAssociated);
478 
479  state.widgetHandled(this);
480  state.warnUnrestored(this);
481 
483  updateTrackLightModel(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
484  updateButton();
485  //FIXME - anything else need updating?
486 }

◆ saveState()

QByteArray TrackCollectionSettingsButton::saveState ( ) const
virtual

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

Implements VP1MaterialButtonBase.

Definition at line 394 of file TrackCollectionSettingsButton.cxx.

394  {
395  // messageVerbose("getState");
396  // if (m_d->editwindow_ui.checkBox_tracksUseBaseLightModel->isChecked()) messageVerbose("checked!");
397 
398  // start serializing data with the current version number,
399  // which is declared in the contructor
401 
402  serialise.save(m_d->matButton);
403  // serialise.disableUnsavedChecks();
404  serialise.save(m_d->editwindow_ui.horizontalSlider_trackWidth);
405  serialise.save(m_d->editwindow_ui.checkBox_trackTubes);
406  serialise.save(m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM);
407  serialise.save(m_d->editwindow_ui.checkBox_tracksUseBaseLightModel);
408  serialise.save(m_d->editwindow_ui.checkBox_hideactualpaths);
409  serialise.save(m_d->editwindow_ui.checkBox_defaultCuts);
410  serialise.save(m_d->editwindow_ui.checkBox_defaultCuts);
411 
412  serialise.save(m_d->editwindow_ui.checkBox_cut_minpt);
413  serialise.save(m_d->editwindow_ui.checkBox_cut_maxpt);
414  serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_minpt_gev);
415  serialise.save(m_d->editwindow_ui.doubleSpinBox_cut_maxpt_gev);
416  serialise.save(m_d->editwindow_ui.checkBox_cut_minpt);
417  serialise.save(m_d->editwindow_ui.comboBox_momtype);
418  serialise.save(m_d->editwindow_ui.etaPhiCutWidget);
419  serialise.save(m_d->editwindow_ui.etaPhiCutWidget);
420  serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_pixel);
421  serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_sct);
422  serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_trt);
423  serialise.save(m_d->editwindow_ui.checkBox_cut_nhits_muon);
424  serialise.save(m_d->editwindow_ui.checkBox_cut_nprecisionhits_muon);
425  serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_pixel);
426  serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_sct);
427  serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_trt);
428  serialise.save(m_d->editwindow_ui.spinBox_cut_nhits_muon);
429  serialise.save(m_d->editwindow_ui.spinBox_cut_nprecisionhits_muon);
430  serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_creationvertexinIR);
431  serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_excludebarcode0);
432  serialise.save(m_d->editwindow_ui.checkBox_cut_truthtracks_excludeneutrals);
433  serialise.save(m_d->editwindow_ui.checkBox_vertexAssociated);
434 
435  serialise.widgetHandled(this);
436  serialise.warnUnsaved(this);
437  return serialise.result();
438 }

◆ setDimension()

void TrackCollectionSettingsButton::setDimension ( int  dim)

Definition at line 207 of file TrackCollectionSettingsButton.cxx.

208 {
209  if (m_d->dim == dim)
210  return;
211  m_d->dim = dim;
212  updateButton();
213 }

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

59 { m_helpername = n; }

◆ setMaterial()

bool TrackCollectionSettingsButton::setMaterial ( SoMaterial *  mat)
virtual

Implements VP1MaterialButtonBase.

Definition at line 226 of file TrackCollectionSettingsButton.cxx.

227 {
228  if (!m_d->matButton) m_d->initEditWindow();
230  return true;
231 }

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

◆ setText

void TrackCollectionSettingsButton::setText ( const QString &  t)
slot

Definition at line 84 of file TrackCollectionSettingsButton.cxx.

85 {
86  if (m_d->editwindow)
87  m_d->editwindow->setWindowTitle(t);
88  setToolTip(t);
89 }

◆ showEditMaterialDialog

void TrackCollectionSettingsButton::showEditMaterialDialog ( )
slot

Definition at line 215 of file TrackCollectionSettingsButton.cxx.

216 {
217  if (!m_d->editwindow)
218  m_d->initEditWindow();
219 
220  if (m_d->editwindow->isHidden())
221  m_d->editwindow->show();
222  else
223  m_d->editwindow->hide();
224 }

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

◆ trackDrawStyle()

SoDrawStyle * TrackCollectionSettingsButton::trackDrawStyle ( ) const

Definition at line 292 of file TrackCollectionSettingsButton.cxx.

293 {
294  return m_d->trackDrawStyle;
295 }

◆ trackLightModel()

SoLightModel * TrackCollectionSettingsButton::trackLightModel ( ) const

Definition at line 297 of file TrackCollectionSettingsButton.cxx.

298 {
299  return m_d->trackLightModel;
300 }

◆ trackTubeRadius()

double TrackCollectionSettingsButton::trackTubeRadius ( ) const

Definition at line 254 of file TrackCollectionSettingsButton.cxx.

255 {
256  return m_d->editwindow_ui.checkBox_trackTubes->isChecked() ?
257  m_d->editwindow_ui.doubleSpinBox_trackTubesRadiusMM->value()*CLHEP::mm : 0.0;
258 }

◆ trackTubeRadiusChanged

void TrackCollectionSettingsButton::trackTubeRadiusChanged ( const double &  )
signal

◆ updateButton

void TrackCollectionSettingsButton::updateButton ( )
protectedslot

Definition at line 199 of file TrackCollectionSettingsButton.cxx.

200 {
201  if (objectName().isEmpty())
202  setObjectName("TrackCollectionSettingsButton");
203  messageVerbose("setColButtonProperties: color=" + str(m_d->matButton->lastAppliedDiffuseColour()));
205 }

◆ updateHideActualTrackPath

void TrackCollectionSettingsButton::updateHideActualTrackPath ( bool  hide)
privateslot

Definition at line 286 of file TrackCollectionSettingsButton.cxx.

287 {
288  emit hideActualTrackPathChanged(hide);
289 }

◆ updateTrackDrawStyle

void TrackCollectionSettingsButton::updateTrackDrawStyle ( )
privateslot

Definition at line 268 of file TrackCollectionSettingsButton.cxx.

269 {
270  double val = VP1QtInventorUtils::getValueLineWidthSlider(m_d->editwindow_ui.horizontalSlider_trackWidth);
271  if (m_d->trackDrawStyle->lineWidth.getValue()!=val)
272  m_d->trackDrawStyle->lineWidth = val;
273 }

◆ updateTrackLightModel

void TrackCollectionSettingsButton::updateTrackLightModel ( bool  base)
privateslot

Definition at line 275 of file TrackCollectionSettingsButton.cxx.

276 {
277  if (m_d->trackLightModel->model.getValue()!=(base?SoLightModel::BASE_COLOR:SoLightModel::PHONG)) {
278  messageVerbose("TrackLightModel changed (base = "+str(base));
279  if (base)
280  m_d->trackLightModel->model.setValue(SoLightModel::BASE_COLOR);
281  else
282  m_d->trackLightModel->model.setValue(SoLightModel::PHONG);
283  }
284 }

◆ updateTrackTubeRadius

void TrackCollectionSettingsButton::updateTrackTubeRadius ( )
privateslot

Definition at line 260 of file TrackCollectionSettingsButton.cxx.

261 {
262  if (m_d->last_trackTubeRadius==trackTubeRadius()) return;
264  messageVerbose("TrackTubeRadius changed to "+str(m_d->last_trackTubeRadius));
266 }

◆ useDefaultCuts()

bool TrackCollectionSettingsButton::useDefaultCuts ( ) const

Definition at line 308 of file TrackCollectionSettingsButton.cxx.

309 {
310  return m_d->editwindow_ui.checkBox_defaultCuts->isChecked();
311 }

◆ useDefaultCutsChanged

void TrackCollectionSettingsButton::useDefaultCutsChanged ( bool  )
signal

◆ verbose()

static bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

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

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

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

Member Data Documentation

◆ m_d

Imp* TrackCollectionSettingsButton::m_d
private

Definition at line 89 of file TrackCollectionSettingsButton.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
TrackCollectionSettingsButton::updateTrackDrawStyle
void updateTrackDrawStyle()
Definition: TrackCollectionSettingsButton.cxx:268
base
std::string base
Definition: hcg.cxx:78
TrackCollectionSettingsButton::Imp::last_cutAllowedPt
VP1Interval last_cutAllowedPt
Definition: TrackCollectionSettingsButton.cxx:52
TrackCollectionSettingsButton::cutAllowedPt
VP1Interval cutAllowedPt() const
Definition: TrackCollectionSettingsButton.cxx:489
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TrackCollectionSettingsButton::useDefaultCutsChanged
void useDefaultCutsChanged(bool)
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
VP1QtInventorUtils::getValueLineWidthSlider
static double getValueLineWidthSlider(const QSlider *)
Definition: VP1QtInventorUtils.cxx:1619
TrackCollectionSettingsButton::restoreFromState
void restoreFromState(const QByteArray &)
Definition: TrackCollectionSettingsButton.cxx:440
TrackCollectionSettingsButton::possibleChange_cutTruthFromIROnly
void possibleChange_cutTruthFromIROnly()
Definition: TrackCollectionSettingsButton.cxx:627
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
VP1Serialise
Definition: VP1Serialise.h:45
RoiUtil::serialise
void serialise(const std::vector< const IRoiDescriptor * > &rois, roiserial_type &s)
serialise an entire vector of IRoiDescriptors
Definition: RoiSerialise.cxx:45
TrackCollectionSettingsButton::possibleChange_cutRequiredDetectorElement
void possibleChange_cutRequiredDetectorElement()
Definition: TrackCollectionSettingsButton.cxx:618
TrackCollectionSettingsButton::updateTrackTubeRadius
void updateTrackTubeRadius()
Definition: TrackCollectionSettingsButton.cxx:260
TrackCollectionSettingsButton::Imp::last_cutExcludeBarcodeZero
bool last_cutExcludeBarcodeZero
Definition: TrackCollectionSettingsButton.cxx:59
TrackCollectionSettingsButton::showEditMaterialDialog
void showEditMaterialDialog()
Definition: TrackCollectionSettingsButton.cxx:215
TrackCollectionSettingsButton::Imp::matButton
VP1MaterialButton * matButton
Definition: TrackCollectionSettingsButton.cxx:45
TrackCollectionSettingsButton::cutOnlyVertexAssocTracksChanged
void cutOnlyVertexAssocTracksChanged(bool)
hist_file_dump.d
d
Definition: hist_file_dump.py:137
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
TrackCollectionSettingsButton::possibleChange_cutAllowedEta
void possibleChange_cutAllowedEta()
Definition: TrackCollectionSettingsButton.cxx:593
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
TrackCollectionSettingsButton::cutTruthExcludeNeutrals
bool cutTruthExcludeNeutrals() const
Definition: TrackCollectionSettingsButton.cxx:566
VP1HelperClassBase::m_helpername
QString m_helpername
Definition: VP1HelperClassBase.h:67
TrackCollectionSettingsButton::Imp::editwindow
QWidget * editwindow
Definition: TrackCollectionSettingsButton.cxx:42
VP1HelperClassBase::messageVerbose
void messageVerbose(const QString &) const
Definition: VP1HelperClassBase.cxx:78
TrackCollectionSettingsButton::possibleChange_useDefaultCuts
void possibleChange_useDefaultCuts()
Definition: TrackCollectionSettingsButton.cxx:575
VP1HelperClassBase::s_vp1verbose
static const bool s_vp1verbose
Definition: VP1HelperClassBase.h:69
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
TrackCollectionSettingsButton::updateHideActualTrackPath
void updateHideActualTrackPath(bool)
Definition: TrackCollectionSettingsButton.cxx:286
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TrackCollectionSettingsButton::m_d
Imp * m_d
Definition: TrackCollectionSettingsButton.h:88
TrackCollectionSettingsButton::useDefaultCuts
bool useDefaultCuts() const
Definition: TrackCollectionSettingsButton.cxx:308
VP1Msg::debug
static bool debug()
Definition: VP1Msg.h:32
TrackCollectionSettingsButton::cutTruthFromIROnly
bool cutTruthFromIROnly() const
Definition: TrackCollectionSettingsButton.cxx:554
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TrackCollectionSettingsButton::trackTubeRadius
double trackTubeRadius() const
Definition: TrackCollectionSettingsButton.cxx:254
TrackCollectionSettingsButton::possibleChange_cutAllowedPt
void possibleChange_cutAllowedPt()
Definition: TrackCollectionSettingsButton.cxx:583
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
TrackCollectionSettingsButton::Imp::last_cutTruthFromIROnly
bool last_cutTruthFromIROnly
Definition: TrackCollectionSettingsButton.cxx:58
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
TrackCollectionSettingsButton::updateButton
void updateButton()
Definition: TrackCollectionSettingsButton.cxx:199
VP1ColorSelectButton::setColButtonProperties
static void setColButtonProperties(QPushButton *, const QColor &col, int dim)
Definition: VP1ColorSelectButton.cxx:49
TrackCollectionSettingsButton::Imp::trackDrawStyle
SoDrawStyle * trackDrawStyle
Definition: TrackCollectionSettingsButton.cxx:47
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
TrackCollectionSettingsButton::possibleChange_cutAllowedPhi
void possibleChange_cutAllowedPhi()
Definition: TrackCollectionSettingsButton.cxx:601
TrackCollectionSettingsButton::Imp::last_cutTruthExcludeNeutrals
bool last_cutTruthExcludeNeutrals
Definition: TrackCollectionSettingsButton.cxx:60
TrackCollectionSettingsButton::cutRequiredNHits
QList< unsigned > cutRequiredNHits() const
Definition: TrackCollectionSettingsButton.cxx:535
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
TrackCollectionSettingsButton::trackTubeRadiusChanged
void trackTubeRadiusChanged(const double &)
TrackCollectionSettingsButton::Imp::last_cutRequiredDetectorElement
QString last_cutRequiredDetectorElement
Definition: TrackCollectionSettingsButton.cxx:57
VP1Msg::prefix_msg
static const char * prefix_msg()
Definition: VP1Msg.h:56
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
VP1MaterialButton::lastAppliedBrightness
double lastAppliedBrightness() const
Definition: VP1MaterialButton.cxx:173
TrackCollectionSettingsButton::cutRequiredDetectorElement
QString cutRequiredDetectorElement() const
Definition: TrackCollectionSettingsButton.cxx:549
TrackCollectionSettingsButton::updateTrackLightModel
void updateTrackLightModel(bool)
Definition: TrackCollectionSettingsButton.cxx:275
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
hist_file_dump.f
f
Definition: hist_file_dump.py:135
TrackCollectionSettingsButton::cutRequiredNHitsChanged
void cutRequiredNHitsChanged(const QList< unsigned > &)
TrackCollectionSettingsButton::cutAllowedEtaChanged
void cutAllowedEtaChanged(const VP1Interval &)
TrackCollectionSettingsButton::Imp::dim
int dim
Definition: TrackCollectionSettingsButton.cxx:64
TrackCollectionSettingsButton::cutRequiredDetectorElementChanged
void cutRequiredDetectorElementChanged(const QString &)
TrackCollectionSettingsButton::cutAllowedPhiChanged
void cutAllowedPhiChanged(const QList< VP1Interval > &)
VP1Deserialise
Definition: VP1Deserialise.h:44
TrackCollectionSettingsButton::possibleChange_cutRequiredNHits
void possibleChange_cutRequiredNHits()
Definition: TrackCollectionSettingsButton.cxx:609
VP1QtInventorUtils::setValueLineWidthSlider
static void setValueLineWidthSlider(QSlider *, const double &value)
Definition: VP1QtInventorUtils.cxx:1593
TrackCollectionSettingsButton::Imp::initEditWindow
void initEditWindow()
Definition: TrackCollectionSettingsButton.cxx:73
VP1QtInventorUtils::sbcol2qcol
static QColor sbcol2qcol(const SbColor &)
Definition: VP1QtInventorUtils.cxx:1142
VP1MaterialButton::setMaterial
bool setMaterial(SoMaterial *)
Definition: VP1MaterialButton.cxx:447
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
python.selection.number
number
Definition: selection.py:20
TrackCollectionSettingsButton::Imp::last_useDefaultCuts
bool last_useDefaultCuts
Definition: TrackCollectionSettingsButton.cxx:62
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
TrackCollectionSettingsButton::hideActualTrackPathChanged
void hideActualTrackPathChanged(bool)
TrackCollectionSettingsButton::possibleChange_cutExcludeBarcodeZero
void possibleChange_cutExcludeBarcodeZero()
Definition: TrackCollectionSettingsButton.cxx:635
TrackCollectionSettingsButton::possibleChange_cutTruthExcludeNeutrals
void possibleChange_cutTruthExcludeNeutrals()
Definition: TrackCollectionSettingsButton.cxx:644
TrackCollectionSettingsButton::Imp::last_cutRequiredNHits
QList< unsigned > last_cutRequiredNHits
Definition: TrackCollectionSettingsButton.cxx:56
VP1Msg::prefix_debug
static const char * prefix_debug()
Definition: VP1Msg.h:57
TrackCollectionSettingsButton::Imp::last_cutAllowedEta
VP1Interval last_cutAllowedEta
Definition: TrackCollectionSettingsButton.cxx:54
TrackCollectionSettingsButton::lastAppliedChanged
void lastAppliedChanged()
TrackCollectionSettingsButton::saveState
QByteArray saveState() const
fill out with the state of the object (used for drag and drop etc)
Definition: TrackCollectionSettingsButton.cxx:394
VP1MaterialButton::lastAppliedShininess
double lastAppliedShininess() const
Definition: VP1MaterialButton.cxx:172
TrackCollectionSettingsButton::cutOnlyVertexAssocTracks
bool cutOnlyVertexAssocTracks() const
Return true if this collection should only should tracks associated to a vertex.
Definition: TrackCollectionSettingsButton.cxx:313
TrackCollectionSettingsButton::cutTruthFromIROnlyChanged
void cutTruthFromIROnlyChanged(bool)
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
python.PyAthena.v
v
Definition: PyAthena.py:154
TrackCollectionSettingsButton::cutTruthExcludeNeutralsChanged
void cutTruthExcludeNeutralsChanged(bool)
TrackCollectionSettingsButton::Imp::serialization_version
int serialization_version
Definition: TrackCollectionSettingsButton.cxx:69
VP1Msg::prefix_verbose
static const char * prefix_verbose()
Definition: VP1Msg.h:59
TrackCollectionSettingsButton::Imp::dragStartPosition
QPoint dragStartPosition
Definition: TrackCollectionSettingsButton.cxx:65
VP1Interval
Definition: VP1Interval.h:23
y
#define y
TrackCollectionSettingsButton::Imp::theclass
TrackCollectionSettingsButton * theclass
Definition: TrackCollectionSettingsButton.cxx:41
VP1QtInventorUtils::setLimitsLineWidthSlider
static void setLimitsLineWidthSlider(QSlider *)
Definition: VP1QtInventorUtils.cxx:1563
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
TrackCollectionSettingsButton::cutAllowedEta
VP1Interval cutAllowedEta() const
Definition: TrackCollectionSettingsButton.cxx:523
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
str
Definition: BTagTrackIpAccessor.cxx:11
VP1Msg::verbose
static bool verbose()
Definition: VP1Msg.h:31
TrackCollectionSettingsButton::cutExcludeBarcodeZero
bool cutExcludeBarcodeZero() const
Definition: TrackCollectionSettingsButton.cxx:560
TrackCollectionSettingsButton::Imp::trackLightModel
SoLightModel * trackLightModel
Definition: TrackCollectionSettingsButton.cxx:48
TrackCollectionSettingsButton::Imp::last_cutOnlyVertexAssocTracks
bool last_cutOnlyVertexAssocTracks
Definition: TrackCollectionSettingsButton.cxx:61
TrackCollectionSettingsButton::possibleChange_cutOnlyVertexAssocTracks
void possibleChange_cutOnlyVertexAssocTracks()
Definition: TrackCollectionSettingsButton.cxx:653
VP1MaterialButton::lastAppliedTransparency
double lastAppliedTransparency() const
Definition: VP1MaterialButton.cxx:171
VP1MaterialButtonBase::VP1MaterialButtonBase
VP1MaterialButtonBase(QWidget *parent, IVP1System *sys=0, const QString &helpername="")
Definition: VP1MaterialButton.h:28
TrackCollectionSettingsButton::Imp::last_cutAllowedPhi
QList< VP1Interval > last_cutAllowedPhi
Definition: TrackCollectionSettingsButton.cxx:55
python.compressB64.c
def c
Definition: compressB64.py:93
TrackCollectionSettingsButton::cutAllowedPhi
QList< VP1Interval > cutAllowedPhi() const
Definition: TrackCollectionSettingsButton.cxx:529
IVP1System::message
void message(const QString &) const
Definition: IVP1System.cxx:336
TrackCollectionSettingsButton::cutExcludeBarcodeZeroChanged
void cutExcludeBarcodeZeroChanged(bool)
TrackCollectionSettingsButton::Imp::last_trackTubeRadius
double last_trackTubeRadius
Definition: TrackCollectionSettingsButton.cxx:51
TrackCollectionSettingsButton::cutAllowedPtChanged
void cutAllowedPtChanged(const VP1Interval &)
TrackCollectionSettingsButton::Imp::editwindow_ui
Ui::TrackCollectionSettingsForm editwindow_ui
Definition: TrackCollectionSettingsButton.cxx:43