@@ -96,9 +96,9 @@ class IntegratePeakTimeSlicesTest : public CxxTest::TestSuite {
9696 std::shared_ptr<const Geometry::RectangularDetector> bankR =
9797 std::dynamic_pointer_cast<const Geometry::RectangularDetector>(bankC);
9898
99- std::shared_ptr<Geometry::Detector> pixelp = bankR->getAtXY (PeakCol, PeakRow);
99+ detid_t pixelID = bankR->getDetectorIDAtXY (PeakCol, PeakRow);
100100 const auto &detectorInfo = wsPtr->detectorInfo ();
101- const auto detInfoIndex = detectorInfo.indexOf (pixelp-> getID () );
101+ const auto detInfoIndex = detectorInfo.indexOf (pixelID );
102102
103103 // Now get Peak.
104104 double PeakTime = 18000 + (PeakChan + .5 ) * 100 ;
@@ -113,7 +113,7 @@ class IntegratePeakTimeSlicesTest : public CxxTest::TestSuite {
113113 wl.fromTOF (x, x, L1, 0 , {{Kernel::UnitParams::l2, L2}, {Kernel::UnitParams::twoTheta, ScatAng}});
114114 double wavelength = x[0 ];
115115
116- Peak peak (instP, pixelp-> getID () , wavelength);
116+ Peak peak (instP, pixelID , wavelength);
117117
118118 // Now set up data in workspace2D
119119 double dQ = 0 ;
@@ -122,10 +122,7 @@ class IntegratePeakTimeSlicesTest : public CxxTest::TestSuite {
122122
123123 for (int row = 0 ; row < NRC; row++)
124124 for (int col = 0 ; col < NRC; col++) {
125-
126- std::shared_ptr<Detector> detP = bankR->getAtXY (col, row);
127-
128- detid2index_map::const_iterator it = map.find (detP->getID ());
125+ detid2index_map::const_iterator it = map.find (bankR->getDetectorIDAtXY (col, row));
129126 size_t wsIndex = (*it).second ;
130127
131128 double MaxR = max<double >(0.0 , MaxPeakIntensity * (1 - abs (row - PeakRow) / MaxPeakRCSpan));
@@ -220,8 +217,7 @@ class IntegratePeakTimeSlicesTest : public CxxTest::TestSuite {
220217 */
221218 double calcQ (const RectangularDetector_const_sptr &bankP, const DetectorInfo &detectorInfo, int row, int col,
222219 double time) {
223- std::shared_ptr<Detector> detP = bankP->getAtXY (col, row);
224- const auto detInfoIndex = detectorInfo.indexOf (detP->getID ());
220+ const auto detInfoIndex = detectorInfo.indexOf (bankP->getDetectorIDAtXY (col, row));
225221 const auto L1 = detectorInfo.l1 ();
226222 const auto L2 = detectorInfo.l2 (detInfoIndex);
227223
0 commit comments