Skip to content

Commit

Permalink
Re #5864. More usage of workspace name instead of pointer eliminated.
Browse files Browse the repository at this point in the history
  • Loading branch information
RussellTaylor committed Oct 17, 2012
1 parent 07e36b7 commit 3b20a45
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ namespace Mantid
std::string m_inputFilename;
/// Pointer to the local workspace
API::MatrixWorkspace_const_sptr inputWorkspace;
// Input workspace name.
std::string m_inputWorkspaceName;

// Map from detector ID to WS index
detid2index_map * map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace DataHandling
double start_progress, double end_progress)
{
IAlgorithm_sptr alg = createSubAlgorithm("MoveInstrumentComponent", start_progress, end_progress);
alg->setPropertyValue("Workspace", getPropertyValue("InputWorkspace"));
alg->setProperty<MatrixWorkspace_sptr>("Workspace", getProperty("InputWorkspace"));
alg->setPropertyValue("ComponentName", comp_name);
alg->setProperty("Z", zshift);
alg->setPropertyValue("RelativePosition", "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ void LoadSampleDetailsFromRaw::init()
void LoadSampleDetailsFromRaw::exec()
{
MatrixWorkspace_sptr data_ws = getProperty("InputWorkspace");
if( !data_ws.get() )
{
g_log.error() << "Cannot retrieve InputWorkspace " << getPropertyValue("InputWorkspace");
throw Exception::NotFoundError("Cannot retrieve InputWorkspace", getPropertyValue("InputWorkspace"));
}

std::string filename = getPropertyValue("Filename");
FILE* file = fopen(filename.c_str(), "rb");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,6 @@ namespace DataHandling

// Retrieve the filename from the properties
m_inputFilename = getPropertyValue("InputFileName");
m_inputWorkspaceName = getPropertyValue("InputWorkspace");
m_outputFilename = getPropertyValue("OutputFileName");
m_compress = getProperty("Compress");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,9 @@ void SANSSensitivityCorrection::exec()
progress.report(3, "Loaded flood field");

// Check whether we need to apply the correction to a workspace
const std::string inputWSName = getPropertyValue("InputWorkspace");
if (inputWSName.size()>0)
MatrixWorkspace_sptr inputWS = getProperty("InputWorkspace");
if ( inputWS )
{
MatrixWorkspace_sptr inputWS = getProperty("InputWorkspace");
// Divide sample data by detector efficiency
IAlgorithm_sptr divideAlg = createSubAlgorithm("Divide", 0.6, 0.7);
divideAlg->setProperty("LHSWorkspace", inputWS);
Expand Down

0 comments on commit 3b20a45

Please sign in to comment.