Commit 909cc84f authored by Anders Markvardsen's avatar Anders Markvardsen
Browse files

Store sample component not as IObjComponent but IComponent. re #9133

parent 2fdde41d
......@@ -155,7 +155,7 @@ namespace Mantid
m_horiz = refFrame->pointingHorizontal();
IObjComponent_const_sptr source = instrument->getSource();
IObjComponent_const_sptr sample = instrument->getSample();
IComponent_const_sptr sample = instrument->getSample();
IComponent_const_sptr aperture = instrument->getComponentByName("aperture", 1);
if(!aperture)
{
......
......@@ -1163,7 +1163,7 @@ namespace WorkspaceCreationHelper
Geometry::Instrument_const_sptr instrument = inputWS->getInstrument();
//
Geometry::IObjComponent_const_sptr source = instrument->getSource();
Geometry::IObjComponent_const_sptr sample = instrument->getSample();
Geometry::IComponent_const_sptr sample = instrument->getSample();
if ((!source) || (!sample))
{
......
......@@ -38,7 +38,7 @@ static double getYTubeAngle(IDetector_const_sptr det,
MatrixWorkspace_const_sptr workspace)
{
Geometry::IObjComponent_const_sptr source = workspace->getInstrument()->getSource();
Geometry::IObjComponent_const_sptr sample = workspace->getInstrument()->getSample();
Geometry::IComponent_const_sptr sample = workspace->getInstrument()->getSample();
if ( source == NULL || sample == NULL )
{
throw std::invalid_argument("Instrument not sufficiently defined: failed to get source and/or sample");
......
......@@ -336,7 +336,7 @@ void InstrumentWindow::setSurfaceType(int type)
// Surface factory
{
Mantid::Geometry::Instrument_const_sptr instr = m_instrumentActor->getInstrument();
Mantid::Geometry::IObjComponent_const_sptr sample = instr->getSample();
Mantid::Geometry::IComponent_const_sptr sample = instr->getSample();
Mantid::Kernel::V3D sample_pos = sample->getPos();
Mantid::Kernel::V3D axis;
// define the axis
......
......@@ -1088,7 +1088,7 @@ Table* MantidUI::createDetectorTable(const QString & wsName, const Mantid::API::
t->setHeaderColType();
// Cache some frequently used values
IObjComponent_const_sptr sample = ws->getInstrument()->getSample();
IComponent_const_sptr sample = ws->getInstrument()->getSample();
bool signedThetaParamRetrieved(false), showSignedTwoTheta(false); //If true, signedVersion of the two theta value should be displayed
for( int row = 0; row < nrows; ++row )
{
......
......@@ -1154,7 +1154,7 @@ void SANSRunWindow::componentLOQDistances(boost::shared_ptr<const Mantid::API::M
Mantid::Geometry::IObjComponent_const_sptr source = instr->getSource();
if( source == boost::shared_ptr<Mantid::Geometry::IObjComponent>() ) return;
Mantid::Geometry::IObjComponent_const_sptr sample = instr->getSample();
Mantid::Geometry::IComponent_const_sptr sample = instr->getSample();
if( sample == boost::shared_ptr<Mantid::Geometry::IObjComponent>() ) return;
lms = source->getPos().distance(sample->getPos()) * 1000.;
......
......@@ -299,7 +299,7 @@ void MatrixWSDataSource::GetInfoList( double x,
return;
}
IObjComponent_const_sptr sample = instrument->getSample();
IComponent_const_sptr sample = instrument->getSample();
if ( sample == 0 )
{
ErrorHandler::Error("No SAMPLE on instrument in MatrixWorkspace");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment