Skip to content
Snippets Groups Projects
Commit cca2710d authored by Dave Casper's avatar Dave Casper
Browse files

Merge branch 'master-vp1-station-index' into 'master'

Fix obsolete indexing, add IFD forward compatibility

See merge request faser/calypso!102
parents 6c76e714 94ef2898
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,8 @@ public: ...@@ -25,7 +25,8 @@ public:
Upstream = 0x000001, Upstream = 0x000001,
Central = 0x000002, Central = 0x000002,
Downstream = 0x000004, Downstream = 0x000004,
All = 0x000007 Interface = 0x000008,
All = 0x00000F
}; };
Q_DECLARE_FLAGS(TrackerPartsFlags, TrackerPartsFlag) Q_DECLARE_FLAGS(TrackerPartsFlags, TrackerPartsFlag)
......
...@@ -53,9 +53,10 @@ QStringList VP1RawDataHandle_SCT_RDO::clicked(bool verbose) const ...@@ -53,9 +53,10 @@ QStringList VP1RawDataHandle_SCT_RDO::clicked(bool verbose) const
if (verbose) { if (verbose) {
if (idhelper) { if (idhelper) {
Identifier id(m_data->identify()); Identifier id(m_data->identify());
if (idhelper->station(id) == -1 ) l << " Part: Upstream Station"; if (idhelper->station(id) == 0 ) l << " Part: Interface Station";
else if (idhelper->station(id) == 0) l << " Part: Central Station"; else if (idhelper->station(id) == 1 ) l << " Part: Upstream Station";
else l << " Part: Downstream Station"; else if (idhelper->station(id) == 2 ) l << " Part: Central Station";
else l << " Part: Downstream Station";
// bool barrel(false); // bool barrel(false);
// if (idhelper->barrel_ec(id)==-2) l << " Part: End Cap C"; // if (idhelper->barrel_ec(id)==-2) l << " Part: End Cap C";
// else if (idhelper->barrel_ec(id)==2) l << " Part: End Cap A"; // else if (idhelper->barrel_ec(id)==2) l << " Part: End Cap A";
...@@ -140,9 +141,10 @@ VP1RawDataFlags::TrackerPartsFlags VP1RawDataHandle_SCT_RDO::inTrackerParts() co ...@@ -140,9 +141,10 @@ VP1RawDataFlags::TrackerPartsFlags VP1RawDataHandle_SCT_RDO::inTrackerParts() co
static const FaserSCT_ID * idhelper = VP1DetInfo::sctIDHelper(); static const FaserSCT_ID * idhelper = VP1DetInfo::sctIDHelper();
Identifier id(m_data->identify()); Identifier id(m_data->identify());
if (idhelper->station(id) == -1 ) return VP1RawDataFlags::Upstream; if (idhelper->station(id) == 0 ) return VP1RawDataFlags::Interface;
if (idhelper->station(id) == 0 ) return VP1RawDataFlags::Central; if (idhelper->station(id) == 1 ) return VP1RawDataFlags::Upstream;
if (idhelper->station(id) == 1 ) return VP1RawDataFlags::Downstream; if (idhelper->station(id) == 2 ) return VP1RawDataFlags::Central;
if (idhelper->station(id) == 3 ) return VP1RawDataFlags::Downstream;
return VP1RawDataFlags::All; return VP1RawDataFlags::All;
} }
...@@ -97,6 +97,7 @@ VP1RawDataSysController::VP1RawDataSysController(IVP1System * sys) ...@@ -97,6 +97,7 @@ VP1RawDataSysController::VP1RawDataSysController(IVP1System * sys)
// -> enabledTrackerParts // -> enabledTrackerParts
addUpdateSlot(SLOT(possibleChange_enabledTrackerParts())); addUpdateSlot(SLOT(possibleChange_enabledTrackerParts()));
connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_interface);
connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_upstream); connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_upstream);
connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_central); connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_central);
connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_downstream); connectToLastUpdateSlot(m_d->ui_cuts.checkBox_cut_tracker_downstream);
...@@ -137,6 +138,7 @@ int VP1RawDataSysController::currentSettingsVersion() const ...@@ -137,6 +138,7 @@ int VP1RawDataSysController::currentSettingsVersion() const
void VP1RawDataSysController::actualSaveSettings(VP1Serialise&s) const void VP1RawDataSysController::actualSaveSettings(VP1Serialise&s) const
{ {
s.save(m_d->ui_cuts.etaPhiCutWidget); s.save(m_d->ui_cuts.etaPhiCutWidget);
s.save(m_d->ui_cuts.checkBox_cut_tracker_interface);
s.save(m_d->ui_cuts.checkBox_cut_tracker_upstream); s.save(m_d->ui_cuts.checkBox_cut_tracker_upstream);
s.save(m_d->ui_cuts.checkBox_cut_tracker_central); s.save(m_d->ui_cuts.checkBox_cut_tracker_central);
s.save(m_d->ui_cuts.checkBox_cut_tracker_downstream); s.save(m_d->ui_cuts.checkBox_cut_tracker_downstream);
...@@ -166,6 +168,7 @@ void VP1RawDataSysController::actualRestoreSettings(VP1Deserialise& s) ...@@ -166,6 +168,7 @@ void VP1RawDataSysController::actualRestoreSettings(VP1Deserialise& s)
return; return;
} }
s.restore(m_d->ui_cuts.etaPhiCutWidget); s.restore(m_d->ui_cuts.etaPhiCutWidget);
s.restore(m_d->ui_cuts.checkBox_cut_tracker_interface);
s.restore(m_d->ui_cuts.checkBox_cut_tracker_upstream); s.restore(m_d->ui_cuts.checkBox_cut_tracker_upstream);
s.restore(m_d->ui_cuts.checkBox_cut_tracker_central); s.restore(m_d->ui_cuts.checkBox_cut_tracker_central);
s.restore(m_d->ui_cuts.checkBox_cut_tracker_downstream); s.restore(m_d->ui_cuts.checkBox_cut_tracker_downstream);
...@@ -239,6 +242,8 @@ bool VP1RawDataSysController::showVolumeOutLines() const ...@@ -239,6 +242,8 @@ bool VP1RawDataSysController::showVolumeOutLines() const
VP1RawDataFlags::TrackerPartsFlags VP1RawDataSysController::enabledTrackerParts() const VP1RawDataFlags::TrackerPartsFlags VP1RawDataSysController::enabledTrackerParts() const
{ {
VP1RawDataFlags::TrackerPartsFlags f; VP1RawDataFlags::TrackerPartsFlags f;
if (m_d->ui_cuts.checkBox_cut_tracker_interface->isChecked())
f |= VP1RawDataFlags::Interface;
if (m_d->ui_cuts.checkBox_cut_tracker_upstream->isChecked()) if (m_d->ui_cuts.checkBox_cut_tracker_upstream->isChecked())
f |= VP1RawDataFlags::Upstream; f |= VP1RawDataFlags::Upstream;
if (m_d->ui_cuts.checkBox_cut_tracker_central->isChecked()) if (m_d->ui_cuts.checkBox_cut_tracker_central->isChecked())
......
...@@ -56,9 +56,9 @@ ...@@ -56,9 +56,9 @@
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >
<widget class="QCheckBox" name="checkBox_cut_tracker_upstream" > <widget class="QCheckBox" name="checkBox_cut_tracker_interface" >
<property name="text" > <property name="text" >
<string>Barrel A</string> <string>Interface</string>
</property> </property>
<property name="checked" > <property name="checked" >
<bool>true</bool> <bool>true</bool>
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item row="1" column="1" >
<widget class="QCheckBox" name="checkBox_cut_tracker_central" > <widget class="QCheckBox" name="checkBox_cut_tracker_upstream" >
<property name="text" > <property name="text" >
<string>Barrel C</string> <string>Upstream</string>
</property> </property>
<property name="checked" > <property name="checked" >
<bool>true</bool> <bool>true</bool>
...@@ -76,9 +76,19 @@ ...@@ -76,9 +76,19 @@
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0" >
<widget class="QCheckBox" name="checkBox_cut_tracker_central" >
<property name="text" >
<string>Central</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QCheckBox" name="checkBox_cut_tracker_downstream" > <widget class="QCheckBox" name="checkBox_cut_tracker_downstream" >
<property name="text" > <property name="text" >
<string>Endcap A</string> <string>Downstream</string>
</property> </property>
<property name="checked" > <property name="checked" >
<bool>true</bool> <bool>true</bool>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment