Skip to content
Snippets Groups Projects
Commit a4eb4792 authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Get detector name from parameter file Re #3370

parent 7b2579dd
No related branches found
No related tags found
No related merge requests found
...@@ -342,10 +342,9 @@ namespace Mantid ...@@ -342,10 +342,9 @@ namespace Mantid
API::IAlgorithm_sptr mover = createSubAlgorithm("MoveInstrumentComponent"); API::IAlgorithm_sptr mover = createSubAlgorithm("MoveInstrumentComponent");
// Finding the name of the detector object. // Finding the name of the detector object.
// The detector bank is the parent of the first non-monitor detector. std::string detID = ws->getInstrument()->getStringParameter("detector-name")[0];
Geometry::IDetector_const_sptr det_pixel = ws->getDetector(LoadSpice2D::nMonitors);
boost::shared_ptr<const Mantid::Geometry::IComponent> detector_bank = det_pixel->getParent(); g_log.information("Moving "+detID);
std::string detID = detector_bank->getName();
try try
{ {
mover->setProperty<API::MatrixWorkspace_sptr> ("Workspace", ws); mover->setProperty<API::MatrixWorkspace_sptr> ("Workspace", ws);
......
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