ATLAS Offline Software
Loading...
Searching...
No Matches
GeoSysController Class Reference

#include <GeoSysController.h>

Inheritance diagram for GeoSysController:
Collaboration diagram for GeoSysController:

Classes

class  Imp

Public Slots

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

Signals

void transparencyChanged (float)
void muonChamberAdaptionStyleChanged (VP1GeoFlags::MuonChamberAdaptionStyleFlags)
void showVolumeOutLinesChanged (bool)
void labelsChanged (int)
void labelPosOffsetChanged (QList< int >)
void adaptMuonChambersToEventData ()
void autoAdaptPixelsOrSCT (bool, bool, bool, bool, bool, bool)
void autoAdaptMuonNSW (bool, bool, bool, bool, bool, bool)
void autoAdaptHGTD (bool, bool, bool, bool, bool, bool, bool)
void autoAdaptITk (bool, bool, bool, bool, bool, bool, bool, bool)
void resetSubSystems (VP1GeoFlags::SubSystemFlags)
void autoExpandByVolumeOrMaterialName (bool, QString)
void autoIconifyByVolumeOrMaterialName (bool, QString)
void actionOnAllNonStandardVolumes (bool)
void volumeStateChangeRequested (VolumeHandle *, VP1GeoFlags::VOLSTATE)
void volumeResetRequested (VolumeHandle *)
void saveMaterialsToFile (QString, bool)
void loadMaterialsFromFile (QString)
void dummyUpdateTrigger ()

Public Member Functions

 GeoSysController (IVP1System *sys)
virtual ~GeoSysController ()
void setGeometrySelectable (bool)
void setZoomToVolumeOnClick (bool)
void setOrientViewToMuonChambersOnClick (bool)
void setAutoAdaptMuonChambersToEventData (bool)
void setComplexity (double)
void setLabelsEnabled (bool t0s, bool hits)
 controls whether the checkboxes are enabled or not.
void actualRestoreSettings (VP1Deserialise &)
int currentSettingsVersion () const
void actualSaveSettings (VP1Serialise &) const
void setLastSelectedVolume (VolumeHandle *)
VolumeHandle * lastSelectedVolume () const
QCheckBox * subSystemCheckBox (VP1GeoFlags::SubSystemFlag) const
SoGroup * drawOptions () const
SoPickStyle * pickStyle () const
VP1GeoTreeView * volumeTreeBrowser () const
PhiSectionWidget * phiSectionWidget () const
ZappedVolumeListModel * zappedVolumeListModel () const
bool printInfoOnClick_Shape () const
bool printInfoOnClick_Material () const
bool printInfoOnClick_CopyNumber () const
bool printInfoOnClick_Transform () const
bool printInfoOnClick_Tree () const
bool printInfoOnClick_Mass () const
bool printInfoOnClick_MuonStationInfo () const
bool orientViewToMuonChambersOnClick () const
bool zoomToVolumeOnClick () const
bool autoAdaptMuonChambersToEventData () const
float transparency () const
VP1GeoFlags::MuonChamberAdaptionStyleFlags muonChamberAdaptionStyle () const
bool showVolumeOutLines () const
int labels () const
QList< int > labelPosOffset ()
 Offset in x,y,z.
void initLastVars ()
QByteArray saveSettings () const
void restoreSettings (const QByteArray &)
void setSystemBasePointer (IVP1System *sys)
void message (const QString &) const
void message (const QStringList &, const QString &addtoend="") const
void message (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &) const
void messageDebug (const QStringList &, const QString &addtoend="") const
void messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &) const
void messageVerbose (const QStringList &, const QString &addtoend="") const
void messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const
IVP1System * systemBase () const
const QString & helperClassName () const

Static Public Member Functions

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

Protected Slots

void testForChanges ()

Protected Member Functions

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

Static Protected Member Functions

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

Private Slots

void possibleChange_transparency ()
void possibleChange_muonChamberAdaptionStyle ()
void possibleChange_showVolumeOutLines ()
void updatePickStyle ()
void saveMaterialsRequested ()
void loadMaterialsRequested ()
void emit_adaptMuonChambersToEventData ()
void emit_autoAdaptPixelsOrSCT ()
void emit_autoAdaptMuonNSW ()
void emit_autoAdaptHGTD ()
void emit_autoAdaptITk ()
void emit_autoExpandByVolumeOrMaterialName ()
void emit_autoIconifyByVolumeOrMaterialName ()
void emit_actionOnAllNonStandardVolumes ()
void emit_resetSubSystems ()
 Reset to the sub-system top volume.
void possibleChange_labels ()
void possibleChange_labelPosOffset ()

Private Attributes

Imp * m_d
bool m_initVarsMode
QString m_helpername
IVP1System * m_system

Static Private Attributes

static VP1CustomTourEditor * m_customTourEditor =0
static const bool s_vp1verbose = VP1QtUtils::environmentVariableIsOn("VP1_VERBOSE_OUTPUT")

Detailed Description

Definition at line 29 of file GeoSysController.h.

Constructor & Destructor Documentation

◆ GeoSysController()

GeoSysController::GeoSysController ( IVP1System * sys)

Definition at line 71 of file GeoSysController.cxx.

72 : VP1Controller(sys,"GeoSysController"), m_d(new Imp)
73{
74 m_d->theclass = this;
75 m_d->ui.setupUi(this);
76
77 initDialog(m_d->ui_disp, m_d->ui.pushButton_settings_display);
78 initDialog(m_d->ui_iconisedvols, m_d->ui.pushButton_settings_iconisedvols);
79 initDialog(m_d->ui_int, m_d->ui.pushButton_settings_interactions);
80 initDialog(m_d->ui_misc, m_d->ui.pushButton_settings_misc);
81 initDialog(m_d->ui_muon, m_d->ui.pushButton_settings_muonchambers);
82 initDialog(m_d->ui_treebrowser, m_d->ui.pushButton_settings_treebrowser);
83
84 // m_d->ui_disp.widget_drawOptions->setLineWidthsDisabled();
85 m_d->ui_disp.widget_drawOptions->setPointSizesDisabled();
86// m_d->ui_disp.widget_drawOptions->setBaseLightingDisabled();
87 m_d->ui_disp.widget_drawOptions->setComplexity(0.6);
88
89 m_d->pickStyle = new SoPickStyle;
90 m_d->pickStyle->ref();
91
92 #ifndef BUILDVP1LIGHT
93 //Possibly hide parts of gui, depending on job configuration:
95 m_d->ui.groupBox_innerdetector->setVisible(false);
96 m_d->ui.groupBox_calorimeters->setVisible(false);
97 m_d->ui.groupBox_muonsystems->setVisible(false);
98 m_d->ui.pushButton_settings_muonchambers->setEnabled(false);
99 m_d->ui_misc.groupBox_pixelactivemodules->setVisible(false);
100 m_d->ui_misc.groupBox_sctactivemodules->setVisible(false);
101 m_d->ui_misc.groupBox_show_ITk_components->setVisible(false);
102 m_d->ui.groupBox_misc->setVisible(false);
103 m_d->ui_muon.groupBox_muonchamberconfig->setVisible(false);
104 m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(false);
105 m_d->ui_misc.groupBox_show_HGTD->setVisible(false);
106 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(false);
107 message("GeoModel not properly initialised.");
108 } else {
109 m_d->ui.groupBox_innerdetector->setVisible(VP1JobConfigInfo::hasPixelGeometry()
115 m_d->ui_misc.groupBox_pixelactivemodules->setVisible(VP1JobConfigInfo::hasPixelGeometry() || VP1JobConfigInfo::hasITkGeometry() );
116 m_d->ui_misc.groupBox_sctactivemodules->setVisible(VP1JobConfigInfo::hasSCTGeometry() || VP1JobConfigInfo::hasITkGeometry() );
117 m_d->ui_misc.groupBox_show_ITk_components->setVisible(VP1JobConfigInfo::hasITkGeometry());
118 m_d->ui.groupBox_calorimeters->setVisible(VP1JobConfigInfo::hasLArGeometry()
120 m_d->ui.groupBox_muonsystems->setVisible(VP1JobConfigInfo::hasMuonGeometry());
121 m_d->ui.pushButton_settings_muonchambers->setEnabled(VP1JobConfigInfo::hasMuonGeometry());
122 m_d->ui_int.checkBox_print_muonstationinfo->setVisible(VP1JobConfigInfo::hasMuonGeometry());
123 m_d->ui_muon.groupBox_muonchamberconfig->setVisible(VP1JobConfigInfo::hasMuonGeometry());
124 m_d->ui_misc.groupBox_show_NSW_chambers->setVisible(VP1JobConfigInfo::hasMuonNSWGeometry());
125 m_d->ui_misc.groupBox_show_HGTD->setVisible(VP1JobConfigInfo::hasHGTDGeometry());
126 m_d->ui_misc.checkBox_HGTD_Glue->setVisible(false);
127 m_d->ui_misc.checkBox_HGTD_Sensors->setVisible(false);
128 m_d->ui_misc.checkBox_HGTD_Inactive->setVisible(false);
129 m_d->ui_misc.checkBox_HGTD_ASIC->setVisible(false);
130 m_d->ui_misc.checkBox_HGTD_BackCover->setVisible(false);
131 m_d->ui_misc.checkBox_HGTD_ModeratorOut->setVisible(false);
132 m_d->ui_misc.checkBox_HGTD_OuterRCover->setVisible(false);
133 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setVisible(VP1JobConfigInfo::hasMuonGeometry());
134 }
135 #endif
136
137
138 m_d->zappedVolumeListModel = new ZappedVolumeListModel(m_d->ui_iconisedvols.listView_iconisedvolumes);
139 m_d->ui_iconisedvols.listView_iconisedvolumes->setUniformItemSizes(true);
140 m_d->ui_iconisedvols.listView_iconisedvolumes->setSelectionMode(QAbstractItemView::ExtendedSelection);
141 m_d->ui_iconisedvols.listView_iconisedvolumes->setModel(m_d->zappedVolumeListModel);
142
143 connect(m_d->ui_iconisedvols.listView_iconisedvolumes,SIGNAL(activated(const QModelIndex&)),
144 m_d->zappedVolumeListModel,SLOT(activated(const QModelIndex&)));
145
147 // Setup connections which monitor changes in the controller so that we may emit signals as appropriate: //
149
151 connectToLastUpdateSlot(m_d->ui_int.checkBox_geomselectable);
152
154 connectToLastUpdateSlot(m_d->ui_disp.checkBox_showVolumeOutLines);
155
157 connectToLastUpdateSlot(m_d->ui_disp.spinBox_transp);
158
160 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
161 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hidetubes);
162 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
163 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
164 connectToLastUpdateSlot(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
165
166 initLastVars();
167
168 //Connections for state-less signals:
169
170 connect(m_d->ui_disp.pushButton_saveChangedMaterials,SIGNAL(clicked()),this,SLOT(saveMaterialsRequested()));
171 connect(m_d->ui_disp.pushButton_loadMaterials,SIGNAL(clicked()),this,SLOT(loadMaterialsRequested()));
172
173 connect(m_d->ui_misc.pushButton_nonStandardShapes_Iconify,SIGNAL(clicked()),
175 connect(m_d->ui_misc.pushButton_nonStandardShapes_Expand,SIGNAL(clicked()),
177
178 // Expand volumes based on Material
179 connect(m_d->ui_misc.lineEdit_expand_vols_matname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
180 connect(m_d->ui_misc.pushButton_expand_vols_matname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
181
182 // Expand volumes based on Name
183 connect(m_d->ui_misc.lineEdit_expand_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
184 connect(m_d->ui_misc.pushButton_expand_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoExpandByVolumeOrMaterialName()));
185
186 // Iconify/Zap volumes based on Name
187 connect(m_d->ui_misc.lineEdit_iconify_vols_volname,SIGNAL(returnPressed()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
188 connect(m_d->ui_misc.pushButton_iconify_vols_volname,SIGNAL(clicked()),this,SLOT(emit_autoIconifyByVolumeOrMaterialName()));
189
190 connect(m_d->ui_muon.pushButton_muonadapt_adapttoevtdata,SIGNAL(clicked()),this,SLOT(emit_adaptMuonChambersToEventData()));
191
192 connect(m_d->ui_misc.toolButton_pixelmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
193 connect(m_d->ui_misc.toolButton_sctmod_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptPixelsOrSCT()));
194
195 connect(m_d->ui_misc.toolButton_nswchambers_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
196 connect(m_d->ui_misc.toolButton_nswchambers_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptMuonNSW()));
197
198 connect(m_d->ui_misc.toolButton_hgtd_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptHGTD()));
199 connect(m_d->ui_misc.toolButton_hgtd_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptHGTD()));
200 connect(m_d->ui_misc.toolButton_itkcomponents_adapt,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptITk()));
201 connect(m_d->ui_misc.toolButton_itkcomponents_reset,SIGNAL(clicked(bool)),this,SLOT(emit_autoAdaptITk()));
202
203 connect(m_d->ui_misc.toolButton_pixelmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
204 connect(m_d->ui_misc.toolButton_sctmod_reset,SIGNAL(clicked(bool)),this,SLOT(emit_resetSubSystems()));
205 connect(m_d->ui_muon.pushButton_muonadapt_resetToAllChambers,SIGNAL(clicked()),this,SLOT(emit_resetSubSystems()));
206
208
209 // INNER DETECTOR
210 m_d->subSysCheckBoxMap[VP1GeoFlags::Pixel] = m_d->ui.checkBox_Pixel;
211 m_d->subSysCheckBoxMap[VP1GeoFlags::SCT] = m_d->ui.checkBox_SCT;
212 m_d->subSysCheckBoxMap[VP1GeoFlags::TRT] = m_d->ui.checkBox_TRT;
213 m_d->subSysCheckBoxMap[VP1GeoFlags::InDetServMat] = m_d->ui.checkBox_InDetServMat;
214 // Phase-II
215 m_d->subSysCheckBoxMap[VP1GeoFlags::ITkPixel] = m_d->ui.checkBox_ITkPixel;
216 m_d->subSysCheckBoxMap[VP1GeoFlags::ITkStrip] = m_d->ui.checkBox_ITkStrip;
217 m_d->subSysCheckBoxMap[VP1GeoFlags::HGTD] = m_d->ui.checkBox_HGTD;
218
219 // CALO
220 m_d->subSysCheckBoxMap[VP1GeoFlags::LAr] = m_d->ui.checkBox_LAr;
221 m_d->subSysCheckBoxMap[VP1GeoFlags::Tile] = m_d->ui.checkBox_Tile;
222
223 // MUON TOROID
224 m_d->subSysCheckBoxMap[VP1GeoFlags::BarrelToroid] = m_d->ui.checkBox_MuonBarrelToroid;
225 m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECA] = m_d->ui.checkBox_MuonECAToroid;
226 // m_d->subSysCheckBoxMap[VP1GeoFlags::ToroidECC] = m_d->ui.checkBox_MuonECCToroid;
227 // MUON MISC
228 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonFeet] = m_d->ui.checkBox_MuonFeet;
229 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonShielding] = m_d->ui.checkBox_MuonShielding;
230 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonToroidsEtc] = m_d->ui.checkBox_MuonEtc; // this is the "Services" checkbox in the GUI
231 // MUON CHAMBERS
232 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationCSC] = m_d->ui.checkBox_MuonEndcapStationCSC;
233 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationTGC] = m_d->ui.checkBox_MuonEndcapStationTGC;
234 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationMDT] = m_d->ui.checkBox_MuonEndcapStationMDT;
235 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonEndcapStationNSW] = m_d->ui.checkBox_NSW;
236 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationInner] = m_d->ui.checkBox_MuonBarrelStationInner;
237 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationMiddle] = m_d->ui.checkBox_MuonBarrelStationMiddle;
238 m_d->subSysCheckBoxMap[VP1GeoFlags::MuonBarrelStationOuter] = m_d->ui.checkBox_MuonBarrelStationOuter;
239
240 // MISCELLANEOUS
241 m_d->subSysCheckBoxMap[VP1GeoFlags::CavernInfra] = m_d->ui.checkBox_CavernInfra;
242 m_d->subSysCheckBoxMap[VP1GeoFlags::BeamPipe] = m_d->ui.checkBox_BeamPipe;
243 m_d->subSysCheckBoxMap[VP1GeoFlags::LUCID] = m_d->ui.checkBox_LUCID;
244 m_d->subSysCheckBoxMap[VP1GeoFlags::ZDC] = m_d->ui.checkBox_ZDC;
245 m_d->subSysCheckBoxMap[VP1GeoFlags::ALFA] = m_d->ui.checkBox_ALFA;
246 m_d->subSysCheckBoxMap[VP1GeoFlags::AFP] = m_d->ui.checkBox_AFP;
247 m_d->subSysCheckBoxMap[VP1GeoFlags::ForwardRegion] = m_d->ui.checkBox_ForwardRegion;
248 // OTHER
249 m_d->subSysCheckBoxMap[VP1GeoFlags::AllUnrecognisedVolumes] = m_d->ui.checkBox_other;
250
251 // -> labels
253 connectToLastUpdateSlot(m_d->ui_disp.groupBox_labels);
254 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_names);
255 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mooret0s);
256 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_mboyt0s);
257 connectToLastUpdateSlot(m_d->ui_disp.checkBox_labels_hits);
258
260 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_xOffset);
261 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_yOffset);
262 connectToLastUpdateSlot(m_d->ui_disp.horizontalSlider_labels_zOffset);
263
264 m_d->last_labels=0;
265}
void possibleChange_labels()
void possibleChange_muonChamberAdaptionStyle()
void emit_resetSubSystems()
Reset to the sub-system top volume.
void emit_autoIconifyByVolumeOrMaterialName()
void emit_actionOnAllNonStandardVolumes()
void possibleChange_transparency()
void possibleChange_showVolumeOutLines()
void possibleChange_labelPosOffset()
void setLastSelectedVolume(VolumeHandle *)
void emit_adaptMuonChambersToEventData()
void emit_autoExpandByVolumeOrMaterialName()
void initDialog(T &theUI, QPushButton *launchbutton, QAbstractButton *enabledButton=0)
void connectToLastUpdateSlot(QObject *sender, const char *signal)
const char * addUpdateSlot(const char *slot)
VP1Controller(IVP1System *sys, const QString &classname)
@ MuonEndcapStationTGC
Definition VP1GeoFlags.h:47
@ AllUnrecognisedVolumes
Definition VP1GeoFlags.h:73
@ MuonEndcapStationNSW
Definition VP1GeoFlags.h:65
@ MuonBarrelStationInner
Definition VP1GeoFlags.h:42
@ MuonBarrelStationMiddle
Definition VP1GeoFlags.h:44
@ MuonBarrelStationOuter
Definition VP1GeoFlags.h:45
@ MuonEndcapStationCSC
Definition VP1GeoFlags.h:46
@ MuonEndcapStationMDT
Definition VP1GeoFlags.h:49
void message(const QString &) const
static bool hasTileGeometry()
static bool hasTRTGeometry()
static bool hasInDetServiceMaterialGeometry()
static bool hasMuonNSWGeometry()
static bool hasLArGeometry()
static bool hasGeoModelExperiment()
static bool hasPixelGeometry()
static bool hasSCTGeometry()
static bool hasHGTDGeometry()
static bool hasITkGeometry()
static bool hasMuonGeometry()

◆ ~GeoSysController()

GeoSysController::~GeoSysController ( )
virtual

Definition at line 268 of file GeoSysController.cxx.

269{
270 m_d->pickStyle->unref();
271 delete m_d;
272}

Member Function Documentation

◆ actionOnAllNonStandardVolumes

void GeoSysController::actionOnAllNonStandardVolumes ( bool )
signal

◆ actualRestoreSettings()

void GeoSysController::actualRestoreSettings ( VP1Deserialise & s)
virtual

Implements VP1Controller.

Definition at line 796 of file GeoSysController.cxx.

797{
798 if (s.version()<0||s.version()>currentSettingsVersion()) {
799 message("Warning: State data in .vp1 file has unsupported version ("+str(s.version())+")");
800 return;
801 }
802
803 if (s.version()<=1) {
804 s.ignoreObsoletePhiSectionWidgetState();
805 s.ignoreWidget(m_d->ui_disp.phisectionwidget);
806 } else {
807 s.restore(m_d->ui_disp.phisectionwidget);
808 }
809 s.restore(m_d->ui_disp.spinBox_transp);
810 s.restore(m_d->ui_muon.checkBox_muonadapt_autoadapt);
811 s.restore(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
812 s.restore(m_d->ui_muon.checkBox_muonadapt_hidetubes);
813 s.restore(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
814 s.restore(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
815 s.restore(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
816 s.restore(m_d->ui_misc.checkBox_pixelmod_barrel);
817 s.restore(m_d->ui_misc.checkBox_pixelmod_endcapA);
818 s.restore(m_d->ui_misc.checkBox_pixelmod_endcapC);
819 s.restore(m_d->ui_misc.checkBox_sctmod_barrel);
820 s.restore(m_d->ui_misc.checkBox_sctmod_endcapA);
821 s.restore(m_d->ui_misc.checkBox_sctmod_endcapC);
822 s.restore(m_d->ui_disp.widget_drawOptions);
823 s.restore(m_d->ui_misc.lineEdit_expand_vols_matname);
824 s.restore(m_d->ui_misc.lineEdit_expand_vols_volname);
825 s.restore(m_d->ui_int.checkBox_geomselectable);
826 s.restore(m_d->ui_int.checkBox_print_shape);
827 s.restore(m_d->ui_int.checkBox_print_material);
828 s.restore(m_d->ui_int.checkBox_print_transform);
829 s.restore(m_d->ui_int.checkBox_print_mass);
830 s.restore(m_d->ui_int.checkBox_print_copyno);
831 s.restore(m_d->ui_int.checkBox_print_tree);
832 s.restore(m_d->ui_int.checkBox_print_muonstationinfo);
833 s.restore(m_d->ui_int.checkBox_zoomToVolumes);
834 s.restore(m_d->ui_int.checkBox_AutomaticMuonChamberEndViews);
835 if (s.version()>=1)
836 s.restore(m_d->ui_disp.checkBox_showVolumeOutLines);
837
838 if (s.version()>=3) {
839 s.restore(m_d->ui_misc.checkBox_bcmMod_Aside);
840 s.restore(m_d->ui_misc.checkBox_bcmMod_Cside);
841 }
842
843 // labels
844 if (s.version()>=4){
845 s.restore(m_d->ui_disp.groupBox_labels);
846 s.restore(m_d->ui_disp.horizontalSlider_labels_xOffset);
847 s.restore(m_d->ui_disp.horizontalSlider_labels_yOffset);
848 s.restore(m_d->ui_disp.horizontalSlider_labels_zOffset);
849 s.restore(m_d->ui_disp.checkBox_labels_names);
850 }
851 if (s.version()>=5){
852 s.restore(m_d->ui_disp.checkBox_labels_mboyt0s);
853 s.restore(m_d->ui_disp.checkBox_labels_mooret0s);
854 s.restore(m_d->ui_disp.checkBox_labels_hits);
855 }
856 if (s.version()>=6){
857 s.restore(m_d->ui_misc.checkBox_NSW_MM);
858 s.restore(m_d->ui_misc.checkBox_NSW_sTGC);
859 s.restore(m_d->ui_misc.checkBox_NSW_Passive_Spacer);
860 s.restore(m_d->ui_misc.checkBox_NSW_Passive_Structure);
861 s.restore(m_d->ui_misc.checkBox_NSW_Passive_APlate);
862 }
863 if (s.version()>=7){
864 s.restore(m_d->ui_misc.checkBox_HGTD_Flex);
865 s.restore(m_d->ui_misc.checkBox_HGTD_Hybrid);
866 s.restore(m_d->ui_misc.checkBox_HGTD_Glue);
867 s.restore(m_d->ui_misc.checkBox_HGTD_Sensors);
868 s.restore(m_d->ui_misc.checkBox_HGTD_Inactive);
869 s.restore(m_d->ui_misc.checkBox_HGTD_ASIC);
870 }
871 if (s.version()>=9){
872 s.restore(m_d->ui_misc.checkBox_HGTD_SupportPlate);
873 s.restore(m_d->ui_misc.checkBox_HGTD_FrontCover);
874 s.restore(m_d->ui_misc.checkBox_HGTD_BackCover);
875 s.restore(m_d->ui_misc.checkBox_HGTD_ModeratorIn);
876 s.restore(m_d->ui_misc.checkBox_HGTD_ModeratorOut);
877 s.restore(m_d->ui_misc.checkBox_HGTD_OuterRCover);
878 s.restore(m_d->ui_misc.checkBox_HGTD_CoolingLines);
879 }
880 if (s.version()>=10){
881 s.restore(m_d->ui_misc.checkBox_ITk_Pixel_Modules);
882 s.restore(m_d->ui_misc.checkBox_ITk_Pixel_Services);
883 s.restore(m_d->ui_misc.checkBox_ITk_Pixel_Supports);
884 s.restore(m_d->ui_misc.checkBox_ITk_Strip_Sensors);
885 s.restore(m_d->ui_misc.checkBox_ITk_Strip_Electronics);
886 s.restore(m_d->ui_misc.checkBox_ITk_Strip_Services);
887 s.restore(m_d->ui_misc.checkBox_ITk_Strip_Supports);
888 }
889
890 s.ignoreWidget(m_d->ui_disp.matButton_lastSel);
891 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end());
892 for (it=m_d->subSysCheckBoxMap.begin();it!=itE;++it)
893 s.ignoreWidget(it->second);
894
895 m_d->ui_int.groupBox_printOnSelection->setEnabled(m_d->ui_int.checkBox_geomselectable->isChecked());
896 m_d->ui_int.groupBox_automaticViewReorientations->setEnabled(m_d->ui_int.checkBox_geomselectable->isChecked());
897
898}
int currentSettingsVersion() const
static QString str(const QString &s)
Definition VP1String.h:49

◆ actualSaveSettings()

void GeoSysController::actualSaveSettings ( VP1Serialise & s) const
virtual

Implements VP1Controller.

Definition at line 715 of file GeoSysController.cxx.

716{
717 s.save(m_d->ui_disp.phisectionwidget);//version <=1 saved in old format
718 s.save(m_d->ui_disp.spinBox_transp);
719 s.save(m_d->ui_muon.checkBox_muonadapt_autoadapt);
720 s.save(m_d->ui_muon.checkBox_muonadapt_openmdtchambers);
721 s.save(m_d->ui_muon.checkBox_muonadapt_hidetubes);
722 s.save(m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes);
723 s.save(m_d->ui_muon.checkBox_muonadapt_opencscchambers);
724 s.save(m_d->ui_muon.checkBox_muonadapt_opentgcchambers);
725 s.save(m_d->ui_misc.checkBox_pixelmod_barrel);
726 s.save(m_d->ui_misc.checkBox_pixelmod_endcapA);
727 s.save(m_d->ui_misc.checkBox_pixelmod_endcapC);
728 s.save(m_d->ui_misc.checkBox_sctmod_barrel);
729 s.save(m_d->ui_misc.checkBox_sctmod_endcapA);
730 s.save(m_d->ui_misc.checkBox_sctmod_endcapC);
731 s.save(m_d->ui_disp.widget_drawOptions);
732 s.save(m_d->ui_misc.lineEdit_expand_vols_matname);
733 s.save(m_d->ui_misc.lineEdit_expand_vols_volname);
734 s.save(m_d->ui_int.checkBox_geomselectable);
735 s.save(m_d->ui_int.checkBox_print_shape);
736 s.save(m_d->ui_int.checkBox_print_material);
737 s.save(m_d->ui_int.checkBox_print_transform);
738 s.save(m_d->ui_int.checkBox_print_mass);
739 s.save(m_d->ui_int.checkBox_print_copyno);
740 s.save(m_d->ui_int.checkBox_print_tree);
741 s.save(m_d->ui_int.checkBox_print_muonstationinfo);
742 s.save(m_d->ui_int.checkBox_zoomToVolumes);
743 s.save(m_d->ui_int.checkBox_AutomaticMuonChamberEndViews);
744 s.save(m_d->ui_disp.checkBox_showVolumeOutLines);//version 1+
745 s.save(m_d->ui_misc.checkBox_bcmMod_Aside);//version 3+
746 s.save(m_d->ui_misc.checkBox_bcmMod_Cside);//version 3+
747
748 // labels - version 4+
749 s.save(m_d->ui_disp.groupBox_labels);
750 s.save(m_d->ui_disp.horizontalSlider_labels_xOffset);
751 s.save(m_d->ui_disp.horizontalSlider_labels_yOffset);
752 s.save(m_d->ui_disp.horizontalSlider_labels_zOffset);
753 s.save(m_d->ui_disp.checkBox_labels_names);
754 //version 5+
755 s.save(m_d->ui_disp.checkBox_labels_mboyt0s);
756 s.save(m_d->ui_disp.checkBox_labels_mooret0s);
757 s.save(m_d->ui_disp.checkBox_labels_hits);
758 // version >=6
759 s.save(m_d->ui_misc.checkBox_NSW_MM);
760 s.save(m_d->ui_misc.checkBox_NSW_sTGC);
761 s.save(m_d->ui_misc.checkBox_NSW_Passive_Spacer);
762 s.save(m_d->ui_misc.checkBox_NSW_Passive_Structure);
763 s.save(m_d->ui_misc.checkBox_NSW_Passive_APlate);
764 // version >=7
765 s.save(m_d->ui_misc.checkBox_HGTD_Flex);
766 s.save(m_d->ui_misc.checkBox_HGTD_Hybrid);
767 s.save(m_d->ui_misc.checkBox_HGTD_Glue);
768 s.save(m_d->ui_misc.checkBox_HGTD_Sensors);
769 s.save(m_d->ui_misc.checkBox_HGTD_Inactive);
770 s.save(m_d->ui_misc.checkBox_HGTD_ASIC);
771 // version >=9
772 s.save(m_d->ui_misc.checkBox_HGTD_SupportPlate);
773 s.save(m_d->ui_misc.checkBox_HGTD_FrontCover);
774 s.save(m_d->ui_misc.checkBox_HGTD_BackCover);
775 s.save(m_d->ui_misc.checkBox_HGTD_ModeratorIn);
776 s.save(m_d->ui_misc.checkBox_HGTD_ModeratorOut);
777 s.save(m_d->ui_misc.checkBox_HGTD_OuterRCover);
778 s.save(m_d->ui_misc.checkBox_HGTD_CoolingLines);
779 // version >=10
780 s.save(m_d->ui_misc.checkBox_ITk_Pixel_Modules);
781 s.save(m_d->ui_misc.checkBox_ITk_Pixel_Services);
782 s.save(m_d->ui_misc.checkBox_ITk_Pixel_Supports);
783 s.save(m_d->ui_misc.checkBox_ITk_Strip_Sensors);
784 s.save(m_d->ui_misc.checkBox_ITk_Strip_Electronics);
785 s.save(m_d->ui_misc.checkBox_ITk_Strip_Services);
786 s.save(m_d->ui_misc.checkBox_ITk_Strip_Supports);
787
788
789 s.ignoreWidget(m_d->ui_disp.matButton_lastSel);
790 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it,itE(m_d->subSysCheckBoxMap.end());
791 for (it=m_d->subSysCheckBoxMap.begin();it!=itE;++it)
792 s.ignoreWidget(it->second);
793}

◆ adaptMuonChambersToEventData

void GeoSysController::adaptMuonChambersToEventData ( )
signal

◆ addUpdateSlot()

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

Definition at line 320 of file VP1Controller.cxx.

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

◆ autoAdaptHGTD

void GeoSysController::autoAdaptHGTD ( bool ,
bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoAdaptITk

void GeoSysController::autoAdaptITk ( bool ,
bool ,
bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoAdaptMuonChambersToEventData()

bool GeoSysController::autoAdaptMuonChambersToEventData ( ) const

Definition at line 464 of file GeoSysController.cxx.

465{
466 return m_d->ui_muon.checkBox_muonadapt_autoadapt->isChecked();
467}

◆ autoAdaptMuonNSW

void GeoSysController::autoAdaptMuonNSW ( bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoAdaptPixelsOrSCT

void GeoSysController::autoAdaptPixelsOrSCT ( bool ,
bool ,
bool ,
bool ,
bool ,
bool  )
signal

◆ autoExpandByVolumeOrMaterialName

void GeoSysController::autoExpandByVolumeOrMaterialName ( bool ,
QString  )
signal

◆ autoIconifyByVolumeOrMaterialName

void GeoSysController::autoIconifyByVolumeOrMaterialName ( bool ,
QString  )
signal

◆ changed()

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

Definition at line 152 of file VP1Controller.h.

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

◆ collWidgetContentChanged

void VP1Controller::collWidgetContentChanged ( )
slotinherited

Definition at line 234 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [1/10]

void VP1Controller::connectToLastUpdateSlot ( QButtonGroup * bg)
protectedinherited

Definition at line 371 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [2/10]

void VP1Controller::connectToLastUpdateSlot ( QCheckBox * cb)
protectedinherited

Definition at line 335 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [3/10]

void VP1Controller::connectToLastUpdateSlot ( QComboBox * cb)
protectedinherited

Definition at line 341 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [4/10]

void VP1Controller::connectToLastUpdateSlot ( QDoubleSpinBox * dsb)
protectedinherited

Definition at line 359 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [5/10]

void VP1Controller::connectToLastUpdateSlot ( QGroupBox * gb)
protectedinherited

Definition at line 347 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [6/10]

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

Definition at line 329 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [7/10]

void VP1Controller::connectToLastUpdateSlot ( QRadioButton * rb)
protectedinherited

Definition at line 365 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [8/10]

void VP1Controller::connectToLastUpdateSlot ( QSlider * s)
protectedinherited

Definition at line 377 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [9/10]

void VP1Controller::connectToLastUpdateSlot ( QSpinBox * sb)
protectedinherited

Definition at line 353 of file VP1Controller.cxx.

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

◆ connectToLastUpdateSlot() [10/10]

void VP1Controller::connectToLastUpdateSlot ( VP1ColorSelectButton * csb)
protectedinherited

Definition at line 383 of file VP1Controller.cxx.

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

◆ currentSettingsVersion()

int GeoSysController::currentSettingsVersion ( ) const
virtual

Implements VP1Controller.

Definition at line 709 of file GeoSysController.cxx.

710{
711 return 10;
712}

◆ customTourEditor()

VP1CustomTourEditor * VP1Controller::customTourEditor ( )
inlinestaticinherited

Definition at line 62 of file VP1Controller.h.

62{return m_customTourEditor;}
static VP1CustomTourEditor * m_customTourEditor

◆ defineRadioButtonGroup() [1/2]

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

Definition at line 302 of file VP1Controller.cxx.

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

◆ defineRadioButtonGroup() [2/2]

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

Definition at line 290 of file VP1Controller.cxx.

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

◆ drawOptions()

SoGroup * GeoSysController::drawOptions ( ) const

Definition at line 380 of file GeoSysController.cxx.

381{
382 return m_d->ui_disp.widget_drawOptions->drawOptionsGroup();
383}

◆ dummyUpdateTrigger

void VP1Controller::dummyUpdateTrigger ( )
signalinherited

◆ emit_actionOnAllNonStandardVolumes

void GeoSysController::emit_actionOnAllNonStandardVolumes ( )
privateslot

Definition at line 672 of file GeoSysController.cxx.

672 {
673 bool zap(sender()==m_d->ui_misc.pushButton_nonStandardShapes_Iconify);
674 messageVerbose("emitting actionOnAllNonStandardVolumes("+str(zap)+")");
676}
void actionOnAllNonStandardVolumes(bool)

◆ emit_adaptMuonChambersToEventData

void GeoSysController::emit_adaptMuonChambersToEventData ( )
privateslot

Definition at line 563 of file GeoSysController.cxx.

564{
565 messageVerbose("Emitting adaptMuonChambersToEventData()");
567}
void adaptMuonChambersToEventData()

◆ emit_autoAdaptHGTD

void GeoSysController::emit_autoAdaptHGTD ( )
privateslot

Definition at line 606 of file GeoSysController.cxx.

607{
608 bool reset = false;
609 if (sender()==m_d->ui_misc.toolButton_hgtd_reset) {
610 reset = true;
611 }
612 bool modules = m_d->ui_misc.checkBox_HGTD_Flex->isChecked();
613 bool supportStructure = m_d->ui_misc.checkBox_HGTD_SupportPlate->isChecked();
614 bool coolingLines = m_d->ui_misc.checkBox_HGTD_CoolingLines->isChecked();
615 bool covers = m_d->ui_misc.checkBox_HGTD_FrontCover->isChecked();
616 bool moderator = m_d->ui_misc.checkBox_HGTD_ModeratorIn->isChecked();
617 bool servicesElectronics = m_d->ui_misc.checkBox_HGTD_Hybrid->isChecked();
618
619 messageVerbose ("Emitting autoAdaptHGTD("+str(reset)+","+str(modules)+","+str(supportStructure)+","+str(coolingLines)+","+str(covers)+","+str(moderator)+","+str(servicesElectronics)+")");
620 emit autoAdaptHGTD(reset, modules, supportStructure, coolingLines, covers, moderator, servicesElectronics);
621}
void autoAdaptHGTD(bool, bool, bool, bool, bool, bool, bool)
const std::string reset

◆ emit_autoAdaptITk

void GeoSysController::emit_autoAdaptITk ( )
privateslot

Definition at line 623 of file GeoSysController.cxx.

624{
625 bool reset = false;
626 if (sender()==m_d->ui_misc.toolButton_itkcomponents_reset) {
627 reset = true;
628 }
629 bool pixelModules = m_d->ui_misc.checkBox_ITk_Pixel_Modules->isChecked();
630 bool pixelServices = m_d->ui_misc.checkBox_ITk_Pixel_Services->isChecked();
631 bool pixelSupports = m_d->ui_misc.checkBox_ITk_Pixel_Supports->isChecked();
632 bool stripSensors = m_d->ui_misc.checkBox_ITk_Strip_Sensors->isChecked();
633 bool stripElectronics = m_d->ui_misc.checkBox_ITk_Strip_Electronics->isChecked();
634 bool stripServices = m_d->ui_misc.checkBox_ITk_Strip_Services->isChecked();
635 bool stripSupports = m_d->ui_misc.checkBox_ITk_Strip_Supports->isChecked();
636
637 messageVerbose ("Emitting autoAdaptITk("+str(reset)+","+str(pixelModules)+","+str(pixelServices)+","+str(pixelSupports)+","+str(stripSensors)+","+str(stripElectronics)+","+str(stripServices)+","+str(stripSupports)+")");
638 emit autoAdaptITk(reset, pixelModules, pixelServices, pixelSupports, stripSensors, stripElectronics, stripServices, stripSupports);
639}
void autoAdaptITk(bool, bool, bool, bool, bool, bool, bool, bool)

◆ emit_autoAdaptMuonNSW

void GeoSysController::emit_autoAdaptMuonNSW ( )
privateslot

Definition at line 588 of file GeoSysController.cxx.

589{
590 bool reset = false;
591 if (sender()==m_d->ui_misc.toolButton_nswchambers_reset) {
592 reset = true;
593 }
594 bool stgc = m_d->ui_misc.checkBox_NSW_sTGC->isChecked();
595 bool mm = m_d->ui_misc.checkBox_NSW_MM->isChecked();
596 bool pSp = m_d->ui_misc.checkBox_NSW_Passive_Spacer->isChecked();
597 bool pSt = m_d->ui_misc.checkBox_NSW_Passive_Structure->isChecked();
598 bool pAP = m_d->ui_misc.checkBox_NSW_Passive_APlate->isChecked();
599
600 messageVerbose ("Emitting autoAdaptMuonNSW("+str(reset)+","+str(stgc)+","+str(mm)+")");
601 emit autoAdaptMuonNSW(reset, stgc, mm, pSp, pSt, pAP);
602}
void autoAdaptMuonNSW(bool, bool, bool, bool, bool, bool)

◆ emit_autoAdaptPixelsOrSCT

void GeoSysController::emit_autoAdaptPixelsOrSCT ( )
privateslot

Definition at line 570 of file GeoSysController.cxx.

571{
572 bool pixel(sender()==m_d->ui_misc.toolButton_pixelmod_adapt);
573 bool brl = pixel ? m_d->ui_misc.checkBox_pixelmod_barrel->isChecked()
574 : m_d->ui_misc.checkBox_sctmod_barrel->isChecked();
575 bool ecA = pixel ? m_d->ui_misc.checkBox_pixelmod_endcapA->isChecked()
576 : m_d->ui_misc.checkBox_sctmod_endcapA->isChecked();
577 bool ecC = pixel ? m_d->ui_misc.checkBox_pixelmod_endcapC->isChecked()
578 : m_d->ui_misc.checkBox_sctmod_endcapC->isChecked();
579 bool bcmA = pixel ? m_d->ui_misc.checkBox_bcmMod_Aside->isChecked() : false;
580 bool bcmC = pixel ? m_d->ui_misc.checkBox_bcmMod_Cside->isChecked() : false;
581
582 messageVerbose ("Emitting autoAdaptPixelsOrSCT("+str(pixel)+", "+str(brl)+","+str(ecA)+","+str(ecC)+","+str(bcmA)+","+str(bcmC)+")");
583 emit autoAdaptPixelsOrSCT(pixel,brl,ecA,ecC,bcmA,bcmC);
584}
void autoAdaptPixelsOrSCT(bool, bool, bool, bool, bool, bool)

◆ emit_autoExpandByVolumeOrMaterialName

void GeoSysController::emit_autoExpandByVolumeOrMaterialName ( )
privateslot

Definition at line 659 of file GeoSysController.cxx.

660{
661 bool volname(sender()==m_d->ui_misc.pushButton_expand_vols_volname
662 ||sender()==m_d->ui_misc.lineEdit_expand_vols_volname);
663 QString name(volname?m_d->ui_misc.lineEdit_expand_vols_volname->text()
664 :m_d->ui_misc.lineEdit_expand_vols_matname->text());
665 if (name.isEmpty())
666 return;
667 messageVerbose("emitting autoExpandByVolumeOrMaterialName("+str(!volname)+", "+name+")");
668 emit autoExpandByVolumeOrMaterialName(!volname,name);
669}
void autoExpandByVolumeOrMaterialName(bool, QString)

◆ emit_autoIconifyByVolumeOrMaterialName

void GeoSysController::emit_autoIconifyByVolumeOrMaterialName ( )
privateslot

Definition at line 644 of file GeoSysController.cxx.

645{
646 bool volname(sender()==m_d->ui_misc.pushButton_iconify_vols_volname
647 ||sender()==m_d->ui_misc.lineEdit_iconify_vols_volname);
648
649 QString name(volname ? m_d->ui_misc.lineEdit_iconify_vols_volname->text()
650 : "" );
651
652 if (name.isEmpty())
653 return;
654 messageVerbose("emitting autoIconifyByVolumeOrMaterialName("+str(!volname)+", "+name+")");
655 emit autoIconifyByVolumeOrMaterialName(!volname,name);
656}
void autoIconifyByVolumeOrMaterialName(bool, QString)

◆ emit_resetSubSystems

void GeoSysController::emit_resetSubSystems ( )
privateslot

Reset to the sub-system top volume.

The method reset the view to the whole sub-system by contracting all children to the mother volume. It does work properly only if the top sub-system volume has a concrete shape. If, instead, it is a mere container, then this method does not work because it will hide the children of the top container volume. In that case, you should implement a custom method.

Note: for an example of a custom solution, please refer to the 'VP1GeometrySystem::autoAdaptMuonNSW()' method, triggered by the emission of the 'autoAdaptMuonNSW()' signal in the 'emit_autoAdaptMuonNSW()' of this class.

Definition at line 695 of file GeoSysController.cxx.

696{
697 VP1GeoFlags::SubSystemFlags f;
698 if (sender()==m_d->ui_misc.toolButton_pixelmod_reset)
700 else if (sender()==m_d->ui_misc.toolButton_sctmod_reset)
702 else if (sender()==m_d->ui_muon.pushButton_muonadapt_resetToAllChambers)
704 messageVerbose(" Emitting resetSubSystems("+str(f)+")");
705 emit resetSubSystems(f);
706}
void resetSubSystems(VP1GeoFlags::SubSystemFlags)

◆ enabledButtonStateChanged

void VP1Controller::enabledButtonStateChanged ( )
slotinherited

Definition at line 169 of file VP1Controller.cxx.

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

◆ fallBackMaterial()

SoMaterial * VP1Controller::fallBackMaterial ( ) const
protectedinherited

Definition at line 429 of file VP1Controller.cxx.

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

◆ getMaterial()

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

Definition at line 439 of file VP1Controller.cxx.

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

◆ helperClassName()

const QString & VP1HelperClassBase::helperClassName ( ) const
inlineinherited

Definition at line 51 of file VP1HelperClassBase.h.

51{ return m_helpername; }

◆ initDialog() [1/2]

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

Definition at line 123 of file VP1Controller.cxx.

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

◆ initDialog() [2/2]

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

Definition at line 145 of file VP1Controller.h.

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

◆ initLastVars()

void VP1Controller::initLastVars ( )
inherited

Definition at line 68 of file VP1Controller.cxx.

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

◆ initVarsMode()

bool VP1Controller::initVarsMode ( ) const
inlineprotectedinherited

Definition at line 98 of file VP1Controller.h.

98{ return m_initVarsMode; }

◆ labelPosOffset()

QList< int > GeoSysController::labelPosOffset ( )

Offset in x,y,z.

Definition at line 553 of file GeoSysController.cxx.

554{
555 QList<int> values;
556 values << m_d->ui_disp.horizontalSlider_labels_xOffset->value();
557 values << m_d->ui_disp.horizontalSlider_labels_yOffset->value();
558 values << m_d->ui_disp.horizontalSlider_labels_zOffset->value();
559 return values;
560}

◆ labelPosOffsetChanged

void GeoSysController::labelPosOffsetChanged ( QList< int > )
signal

◆ labels()

int GeoSysController::labels ( ) const

Definition at line 542 of file GeoSysController.cxx.

542 {
543 if (!m_d->ui_disp.groupBox_labels->isChecked()) return 0;
544 int labels=0;
545 if (m_d->ui_disp.checkBox_labels_names->isChecked()) labels|=0x1;
546 if (m_d->ui_disp.checkBox_labels_mooret0s->isChecked()) labels|=0x2;
547 if (m_d->ui_disp.checkBox_labels_mboyt0s->isChecked()) labels|=0x4;
548 // leaving space for another t0 type, if necessary
549 if (m_d->ui_disp.checkBox_labels_hits->isChecked()) labels|=0x10;
550 return labels;
551}

◆ labelsChanged

void GeoSysController::labelsChanged ( int )
signal

◆ lastSelectedVolume()

VolumeHandle * GeoSysController::lastSelectedVolume ( ) const

Definition at line 322 of file GeoSysController.cxx.

323{
324 return m_d->lastSelectedVolHandle;
325}

◆ loadMaterialsFromFile

void GeoSysController::loadMaterialsFromFile ( QString )
signal

◆ loadMaterialsRequested

void GeoSysController::loadMaterialsRequested ( )
privateslot

Definition at line 355 of file GeoSysController.cxx.

356{
357 QString filename = QFileDialog::getOpenFileName(this, "Select geometry material file to load",
358 (m_d->lastLoadMaterialsFile.isEmpty()?
360 :m_d->lastLoadMaterialsFile),
361 "VP1 geometry material files (*.vp1geomat)",
362 0,QFileDialog::DontResolveSymlinks);
363 if(filename.isEmpty())
364 return;
365
366 m_d->lastLoadMaterialsFile = filename;
367
368 messageVerbose("Emitting loadMaterialsFromFile(\""+filename+"\")");
369 emit loadMaterialsFromFile(filename);
370}
void loadMaterialsFromFile(QString)
static QString defaultFileSelectDirectory()

◆ message() [1/3]

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

Definition at line 49 of file VP1HelperClassBase.cxx.

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

◆ message() [2/3]

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

Definition at line 131 of file VP1HelperClassBase.cxx.

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

◆ message() [3/3]

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

Definition at line 91 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [1/3]

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

Definition at line 65 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [2/3]

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

Definition at line 147 of file VP1HelperClassBase.cxx.

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

◆ messageDebug() [3/3]

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

Definition at line 103 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [1/3]

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

Definition at line 78 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [2/3]

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

Definition at line 165 of file VP1HelperClassBase.cxx.

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

◆ messageVerbose() [3/3]

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

Definition at line 117 of file VP1HelperClassBase.cxx.

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

◆ muonChamberAdaptionStyle()

VP1GeoFlags::MuonChamberAdaptionStyleFlags GeoSysController::muonChamberAdaptionStyle ( ) const

Definition at line 490 of file GeoSysController.cxx.

491{
492 VP1GeoFlags::MuonChamberAdaptionStyleFlags f;
493 if (m_d->ui_muon.checkBox_muonadapt_openmdtchambers->isChecked())
495 if (m_d->ui_muon.checkBox_muonadapt_hidetubes->isChecked())
497 if (m_d->ui_muon.checkBox_muonadapt_hiderpcvolumes->isChecked())
499 if (m_d->ui_muon.checkBox_muonadapt_opencscchambers->isChecked())
501 if (m_d->ui_muon.checkBox_muonadapt_opentgcchambers->isChecked())
503 return f;
504}

◆ muonChamberAdaptionStyleChanged

void GeoSysController::muonChamberAdaptionStyleChanged ( VP1GeoFlags::MuonChamberAdaptionStyleFlags )
signal

◆ orientViewToMuonChambersOnClick()

bool GeoSysController::orientViewToMuonChambersOnClick ( ) const

Definition at line 416 of file GeoSysController.cxx.

417{
418 return m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->isChecked();
419}

◆ phiSectionWidget()

PhiSectionWidget * GeoSysController::phiSectionWidget ( ) const

Definition at line 398 of file GeoSysController.cxx.

399{
400 return m_d->ui_disp.phisectionwidget;
401}

◆ pickStyle()

SoPickStyle * GeoSysController::pickStyle ( ) const

Definition at line 386 of file GeoSysController.cxx.

387{
388 return m_d->pickStyle;
389}

◆ possibleChange_labelPosOffset

void GeoSysController::possibleChange_labelPosOffset ( )
privateslot

◆ possibleChange_labels

void GeoSysController::possibleChange_labels ( )
privateslot

◆ possibleChange_muonChamberAdaptionStyle

void GeoSysController::possibleChange_muonChamberAdaptionStyle ( )
privateslot

◆ possibleChange_showVolumeOutLines

void GeoSysController::possibleChange_showVolumeOutLines ( )
privateslot

◆ possibleChange_transparency

void GeoSysController::possibleChange_transparency ( )
privateslot

◆ printInfoOnClick_CopyNumber()

bool GeoSysController::printInfoOnClick_CopyNumber ( ) const

Definition at line 434 of file GeoSysController.cxx.

435{
436 return m_d->ui_int.checkBox_print_copyno->isChecked();
437}

◆ printInfoOnClick_Mass()

bool GeoSysController::printInfoOnClick_Mass ( ) const

Definition at line 452 of file GeoSysController.cxx.

453{
454 return m_d->ui_int.checkBox_print_mass->isChecked();
455}

◆ printInfoOnClick_Material()

bool GeoSysController::printInfoOnClick_Material ( ) const

Definition at line 428 of file GeoSysController.cxx.

429{
430 return m_d->ui_int.checkBox_print_material->isChecked();
431}

◆ printInfoOnClick_MuonStationInfo()

bool GeoSysController::printInfoOnClick_MuonStationInfo ( ) const

Definition at line 458 of file GeoSysController.cxx.

459{
460 return m_d->ui_int.checkBox_print_muonstationinfo->isChecked();
461}

◆ printInfoOnClick_Shape()

bool GeoSysController::printInfoOnClick_Shape ( ) const

Definition at line 422 of file GeoSysController.cxx.

423{
424 return m_d->ui_int.checkBox_print_shape->isChecked();
425}

◆ printInfoOnClick_Transform()

bool GeoSysController::printInfoOnClick_Transform ( ) const

Definition at line 440 of file GeoSysController.cxx.

441{
442 return m_d->ui_int.checkBox_print_transform->isChecked();
443}

◆ printInfoOnClick_Tree()

bool GeoSysController::printInfoOnClick_Tree ( ) const

Definition at line 446 of file GeoSysController.cxx.

447{
448 return m_d->ui_int.checkBox_print_tree->isChecked();
449}

◆ resetSubSystems

void GeoSysController::resetSubSystems ( VP1GeoFlags::SubSystemFlags )
signal

◆ restoreSettings()

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

Definition at line 389 of file VP1Controller.cxx.

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

◆ saveMaterialsRequested

void GeoSysController::saveMaterialsRequested ( )
privateslot

Definition at line 328 of file GeoSysController.cxx.

329{
330 const bool ctrl_isdown = (Qt::ControlModifier & QApplication::keyboardModifiers());
331 const bool onlyChangedMaterials = !ctrl_isdown;
332
333 QString filename
334 = QFileDialog::getSaveFileName(this, "Select geometry material file to save",
335 (m_d->lastSaveMaterialsFile.isEmpty()?
337 :m_d->lastSaveMaterialsFile),
338 "VP1 geometry material files (*.vp1geomat)",
339 0,QFileDialog::DontResolveSymlinks);
340
341 if(filename.isEmpty())
342 return;
343
344 if (!filename.endsWith(".vp1geomat"))
345 filename += ".vp1geomat";
346
347 m_d->lastSaveMaterialsFile = filename;
348
349 messageVerbose("Emitting saveMaterialsToFile(\""+filename+"\","+str(onlyChangedMaterials)+")");
350 emit saveMaterialsToFile(filename,onlyChangedMaterials);
351
352}
void saveMaterialsToFile(QString, bool)

◆ saveMaterialsToFile

void GeoSysController::saveMaterialsToFile ( QString ,
bool  )
signal

◆ saveSettings()

QByteArray VP1Controller::saveSettings ( ) const
inherited

Definition at line 407 of file VP1Controller.cxx.

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

◆ setAutoAdaptMuonChambersToEventData()

void GeoSysController::setAutoAdaptMuonChambersToEventData ( bool b)

Definition at line 300 of file GeoSysController.cxx.

301{
302 m_d->ui_muon.checkBox_muonadapt_autoadapt->setChecked(b);
303}

◆ setComplexity()

void GeoSysController::setComplexity ( double c)

Definition at line 282 of file GeoSysController.cxx.

283{
284 m_d->ui_disp.widget_drawOptions->setComplexity(c);
285}

◆ setCustomTourEditor()

void VP1Controller::setCustomTourEditor ( VP1CustomTourEditor * editor)
inlinestaticinherited

Definition at line 61 of file VP1Controller.h.

61{ m_customTourEditor=editor;}

◆ setGeometrySelectable()

void GeoSysController::setGeometrySelectable ( bool b)

Definition at line 275 of file GeoSysController.cxx.

276{
277 m_d->ui_int.checkBox_geomselectable->setChecked(b);
279}

◆ setHelperClassName()

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

Definition at line 59 of file VP1HelperClassBase.h.

◆ setLabelsEnabled()

void GeoSysController::setLabelsEnabled ( bool t0s,
bool hits )

controls whether the checkboxes are enabled or not.

Set in e.g. VP1SysConf.cxx, via VP1GeometrySystem

Definition at line 520 of file GeoSysController.cxx.

520 {
521 // make sure that when labels are enabled, only the systems which we have are enabled too
522 if (t0s) {
523 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
524 m_d->ui_disp.checkBox_labels_mooret0s,SLOT(setEnabled(bool)));
525 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
526 m_d->ui_disp.checkBox_labels_mboyt0s,SLOT(setEnabled(bool)));
527 } else {
528 m_d->ui_disp.checkBox_labels_mooret0s->setEnabled(false);
529 m_d->ui_disp.checkBox_labels_mboyt0s->setEnabled(false);
530 }
531 if (hits) {
532 connect(m_d->ui_disp.groupBox_labels,SIGNAL(toggled(bool)),
533 m_d->ui_disp.checkBox_labels_hits,SLOT(setEnabled(bool)));
534 } else {
535 m_d->ui_disp.checkBox_labels_hits->setEnabled(false);
536 }
537
538 messageVerbose("setLabelsEnabled() t0s="+str(t0s)+", hits="+str(hits));
539}

◆ setLastSelectedVolume()

void GeoSysController::setLastSelectedVolume ( VolumeHandle * vh)

Definition at line 306 of file GeoSysController.cxx.

307{
308 m_d->lastSelectedVolHandle = vh;
309 m_d->ui_disp.matButton_lastSel->setEnabled(vh!=0);
310 if (vh) {
311 QList<SoMaterial*> mats = m_d->ui_disp.matButton_lastSel->handledMaterials();
312 if (mats.isEmpty()||mats.at(0)!=vh->material()) {
313 m_d->ui_disp.matButton_lastSel->clearHandledMaterials();
314 m_d->ui_disp.matButton_lastSel->setMaterial(vh->material());
315 }
316 } else {
317 m_d->ui_disp.matButton_lastSel->clearHandledMaterials();
318 }
319}
SoMaterial * material()

◆ setOrientViewToMuonChambersOnClick()

void GeoSysController::setOrientViewToMuonChambersOnClick ( bool b)

Definition at line 294 of file GeoSysController.cxx.

295{
296 m_d->ui_int.checkBox_AutomaticMuonChamberEndViews->setChecked(b);
297}

◆ setSystemBasePointer()

void VP1HelperClassBase::setSystemBasePointer ( IVP1System * sys)
inherited

Definition at line 197 of file VP1HelperClassBase.cxx.

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

◆ setupCollWidgetInScrollArea()

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

Definition at line 257 of file VP1Controller.cxx.

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

◆ setZoomToVolumeOnClick()

void GeoSysController::setZoomToVolumeOnClick ( bool b)

Definition at line 288 of file GeoSysController.cxx.

289{
290 m_d->ui_int.checkBox_zoomToVolumes->setChecked(b);
291}

◆ showVolumeOutLines()

bool GeoSysController::showVolumeOutLines ( ) const

Definition at line 484 of file GeoSysController.cxx.

485{
486 return m_d->ui_disp.checkBox_showVolumeOutLines->isChecked();
487}

◆ showVolumeOutLinesChanged

void GeoSysController::showVolumeOutLinesChanged ( bool )
signal

◆ str() [1/30]

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

Definition at line 98 of file VP1String.h.

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

◆ str() [2/30]

QString VP1String::str ( const bool b)
inlinestaticinherited

Definition at line 53 of file VP1String.h.

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

◆ str() [3/30]

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

Definition at line 50 of file VP1String.h.

50{ return c; }

◆ str() [4/30]

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

Definition at line 81 of file VP1String.h.

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

◆ str() [5/30]

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

Definition at line 82 of file VP1String.h.

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

◆ str() [6/30]

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

Definition at line 95 of file VP1String.h.

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

◆ str() [7/30]

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

Definition at line 30 of file VP1String.cxx.

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

◆ str() [8/30]

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

Definition at line 91 of file VP1String.h.

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

◆ str() [9/30]

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

Definition at line 102 of file VP1String.h.

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

◆ str() [10/30]

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

Definition at line 49 of file VP1String.h.

49{ return s; }

◆ str() [11/30]

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

Definition at line 36 of file VP1String.cxx.

37{
39}
static QColor sbcol2qcol(const SbColor &)

◆ str() [12/30]

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

Definition at line 61 of file VP1String.cxx.

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

◆ str() [13/30]

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

Definition at line 62 of file VP1String.cxx.

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

◆ str() [14/30]

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

Definition at line 63 of file VP1String.cxx.

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

◆ str() [15/30]

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

Definition at line 64 of file VP1String.cxx.

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

◆ str() [16/30]

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

Definition at line 65 of file VP1String.cxx.

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

◆ str() [17/30]

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

Definition at line 66 of file VP1String.cxx.

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

◆ str() [18/30]

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

Definition at line 67 of file VP1String.cxx.

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

◆ str() [19/30]

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

Definition at line 68 of file VP1String.cxx.

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

◆ str() [20/30]

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

Definition at line 87 of file VP1String.h.

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

◆ str() [21/30]

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

Definition at line 48 of file VP1String.cxx.

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

◆ str() [22/30]

QString VP1String::str ( const VP1Interval & i)
staticinherited

Definition at line 42 of file VP1String.cxx.

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

◆ str() [23/30]

QString VP1String::str ( int n)
inlinestaticinherited

Definition at line 77 of file VP1String.h.

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

◆ str() [24/30]

QString VP1String::str ( long n)
inlinestaticinherited

Definition at line 75 of file VP1String.h.

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

◆ str() [25/30]

QString VP1String::str ( qlonglong n)
inlinestaticinherited

Definition at line 79 of file VP1String.h.

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

◆ str() [26/30]

QString VP1String::str ( qulonglong n)
inlinestaticinherited

Definition at line 80 of file VP1String.h.

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

◆ str() [27/30]

QString VP1String::str ( short int n)
inlinestaticinherited

Definition at line 73 of file VP1String.h.

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

◆ str() [28/30]

QString VP1String::str ( uint n)
inlinestaticinherited

Definition at line 78 of file VP1String.h.

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

◆ str() [29/30]

QString VP1String::str ( ulong n)
inlinestaticinherited

Definition at line 76 of file VP1String.h.

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

◆ str() [30/30]

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

Definition at line 74 of file VP1String.h.

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

◆ subSystemCheckBox()

QCheckBox * GeoSysController::subSystemCheckBox ( VP1GeoFlags::SubSystemFlag f) const

Definition at line 373 of file GeoSysController.cxx.

374{
375 std::map<VP1GeoFlags::SubSystemFlag,QCheckBox*>::const_iterator it = m_d->subSysCheckBoxMap.find(f);
376 return it==m_d->subSysCheckBoxMap.end() ? 0 : it->second;
377}

◆ systemBase()

IVP1System * VP1HelperClassBase::systemBase ( ) const
inlineinherited

Definition at line 50 of file VP1HelperClassBase.h.

50{ return m_system; }

◆ testForChanges

void VP1Controller::testForChanges ( )
inlineprotectedslotinherited

Definition at line 113 of file VP1Controller.h.

◆ toggleDialogState

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

Definition at line 196 of file VP1Controller.cxx.

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

◆ toString() [1/4]

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

Definition at line 100 of file VP1Controller.cxx.

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

◆ toString() [2/4]

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

Definition at line 106 of file VP1Controller.cxx.

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

◆ toString() [3/4]

template<class T>
QString VP1Controller::toString ( const T & par)
staticprotectedinherited

Definition at line 139 of file VP1Controller.h.

140{
141 return VP1String::str(par);
142}

◆ toString() [4/4]

QString VP1Controller::toString ( SbColor4f p)
staticprotectedinherited

Definition at line 115 of file VP1Controller.cxx.

116{
117 float r, g, b, a;
118 p.getValue(r, g, b, a);
119 return "("+str(r)+", "+str(g)+", "+str(b)+", "+str(1-a)+")";
120}
static Double_t a
int r
Definition globals.cxx:22

◆ transparency()

float GeoSysController::transparency ( ) const

Definition at line 477 of file GeoSysController.cxx.

478{
479 int v(m_d->ui_disp.spinBox_transp->value());
480 return (v>=100?1.0:(v<=0?0.0:v/100.0));
481}

◆ transparencyChanged

void GeoSysController::transparencyChanged ( float )
signal

◆ updatePickStyle

void GeoSysController::updatePickStyle ( )
privateslot

Definition at line 470 of file GeoSysController.cxx.

471{
472 m_d->pickStyle->style = m_d->ui_int.checkBox_geomselectable->isChecked()
473 ? SoPickStyle::SHAPE : SoPickStyle::UNPICKABLE;
474}

◆ verbose()

bool VP1HelperClassBase::verbose ( )
inlinestaticinherited

Definition at line 32 of file VP1HelperClassBase.h.

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

◆ volumeResetRequested

void GeoSysController::volumeResetRequested ( VolumeHandle * )
signal

◆ volumeStateChangeRequested

void GeoSysController::volumeStateChangeRequested ( VolumeHandle * ,
VP1GeoFlags::VOLSTATE  )
signal

◆ volumeTreeBrowser()

VP1GeoTreeView * GeoSysController::volumeTreeBrowser ( ) const

Definition at line 392 of file GeoSysController.cxx.

393{
394 return m_d->ui_treebrowser.treeView_volumebrowser;
395}

◆ warnUndeletedInstances()

void VP1HelperClassBase::warnUndeletedInstances ( )
staticinherited

Definition at line 183 of file VP1HelperClassBase.cxx.

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

◆ zappedVolumeListModel()

ZappedVolumeListModel * GeoSysController::zappedVolumeListModel ( ) const

Definition at line 404 of file GeoSysController.cxx.

405{
406 return m_d->zappedVolumeListModel;
407}

◆ zoomToVolumeOnClick()

bool GeoSysController::zoomToVolumeOnClick ( ) const

Definition at line 410 of file GeoSysController.cxx.

411{
412 return m_d->ui_int.checkBox_zoomToVolumes->isChecked();
413}

Member Data Documentation

◆ m_customTourEditor

VP1CustomTourEditor * VP1Controller::m_customTourEditor =0
staticprivateinherited

Definition at line 126 of file VP1Controller.h.

◆ m_d

Imp* GeoSysController::m_d
private

Definition at line 121 of file GeoSysController.h.

◆ m_helpername

QString VP1HelperClassBase::m_helpername
privateinherited

Definition at line 67 of file VP1HelperClassBase.h.

◆ m_initVarsMode

bool VP1Controller::m_initVarsMode
privateinherited

Definition at line 130 of file VP1Controller.h.

◆ m_system

IVP1System* VP1HelperClassBase::m_system
privateinherited

Definition at line 68 of file VP1HelperClassBase.h.

◆ s_vp1verbose

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

Definition at line 69 of file VP1HelperClassBase.h.


The documentation for this class was generated from the following files: