Commit 5e81640e authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #14124. OverwriteSpectraMap -> RewriteSpectraMap.

No reason to change the name of the property. Would be far more convient for existing clients if the name of this property remained the same.
parent 32864183
......@@ -358,7 +358,7 @@ void CreateGroupingWorkspace::exec() {
MatrixWorkspace_sptr tempWS(new Workspace2D());
childAlg->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
childAlg->setPropertyValue("Filename", InstrumentFilename);
childAlg->setProperty("OverwriteSpectraMap",
childAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
childAlg->setPropertyValue("InstrumentName", InstrumentName);
childAlg->executeAsChildAlg();
......
......@@ -78,7 +78,7 @@ public:
loaderIDF2.setPropertyValue(
"Filename", "IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2.xml");
loaderIDF2.setPropertyValue("Workspace", wsName);
loaderIDF2.setProperty("OverwriteSpectraMap",
loaderIDF2.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
TS_ASSERT_THROWS_NOTHING(loaderIDF2.execute());
TS_ASSERT(loaderIDF2.isExecuted());
......
......@@ -62,7 +62,7 @@ public:
"HET_Definition.xml";
loader.setPropertyValue("Filename", inputFile);
loader.setPropertyValue("Workspace", this->inputSpace);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loader.execute();
}
......
......@@ -178,7 +178,7 @@ private:
if (!instrument.empty()) {
DataHandling::LoadInstrument load;
load.initialize();
load.setProperty("OverwriteSpectraMap",
load.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
load.setProperty("Workspace", ws);
load.setProperty("InstrumentName", instrument);
......
......@@ -162,7 +162,7 @@ public:
std::string inputFile = "INES_Definition.xml";
loader.setPropertyValue("Filename", inputFile);
loader.setPropertyValue("Workspace", m_WB1Name);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loader.execute();
// both workspaces should use the same instrument information
......
......@@ -194,7 +194,7 @@ private:
loader.setPropertyValue("Filename",
"IDFs_for_UNIT_TESTING/DUM_Definition.xml");
loader.setPropertyValue("Workspace", inputWS);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loader.execute();
}
......@@ -210,7 +210,7 @@ private:
loader.setPropertyValue("Filename",
"IDFs_for_UNIT_TESTING/DUM_Definition.xml");
loader.setPropertyValue("Workspace", inputEvWS);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loader.execute();
}
......
......@@ -227,7 +227,7 @@ public:
std::string inputFile = "INES_Definition.xml";
loader.setPropertyValue("Filename", inputFile);
loader.setPropertyValue("Workspace", m_IWSName);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loader.execute();
......
......@@ -58,7 +58,7 @@ public:
std::string inputFile = "INES_Definition.xml";
loader.setPropertyValue("Filename", inputFile);
loader.setPropertyValue("Workspace", inputSpace);
loader.setProperty("OverwriteSpectraMap",
loader.setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loader.execute();
......
......@@ -296,7 +296,7 @@ std::string LoadIsawPeaks::readHeader(PeaksWorkspace_sptr outWS,
IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument");
loadInst->setPropertyValue("InstrumentName", C_Instrument);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
loadInst->executeAsChildAlg();
......
......@@ -298,7 +298,7 @@ LoadIsawSpectrum::getInstrument3Ways(Algorithm *alg) {
childAlg->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
childAlg->setPropertyValue("Filename", InstrumentFilename);
childAlg->setPropertyValue("InstrumentName", InstrumentName);
childAlg->setProperty("OverwriteSpectraMap",
childAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
childAlg->executeAsChildAlg();
inst = tempWS->getInstrument();
......
......@@ -72,7 +72,7 @@ public:
loadInst->setPropertyValue(
"Filename", "IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml");
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", retVal);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
delete loadInst;
......
......@@ -89,7 +89,7 @@ MaskPeaksWorkspace("TOPAZ_3007", "peaks")
FrameworkManager::Instance().exec(
"LoadInstrument", 6, "Workspace", "TOPAZ_3007", "Filename",
"IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml", "OverwriteSpectraMap",
"IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml", "RewriteSpectraMap",
"True");
// Match the goniometer angles
......
......@@ -75,7 +75,7 @@ public:
loadInst->setPropertyValue(
"Filename", "IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml");
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", retVal);
loadInst->setProperty("OverwriteSpectraMap", Mantid::Kernel::OptionalBool(true));
loadInst->setProperty("RewriteSpectraMap", Mantid::Kernel::OptionalBool(true));
loadInst->execute();
delete loadInst;
// Populate the instrument parameters in this workspace - this works around
......
......@@ -72,7 +72,7 @@ public:
loadInst->setPropertyValue(
"Filename", "IDFs_for_UNIT_TESTING/MINITOPAZ_Definition.xml");
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", retVal);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
delete loadInst;
......
......@@ -378,7 +378,7 @@ bool LoadEventNexus::runLoadInstrument(const std::string &nexusfilename,
loadInst->setPropertyValue("InstrumentName", instrument);
loadInst->setProperty<Mantid::API::MatrixWorkspace_sptr>("Workspace",
localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->execute();
......
......@@ -360,7 +360,7 @@ bool AppendGeometryToSNSNexus::runLoadInstrument(
try {
loadInst->setPropertyValue("Filename", idf_filename);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap", OptionalBool(false));
loadInst->setProperty("RewriteSpectraMap", OptionalBool(false));
loadInst->execute();
} catch (std::invalid_argument &e) {
alg->getLogger().information(
......
......@@ -376,7 +376,7 @@ Instrument_const_sptr CreateChunkingFromInstrument::getInstrument() {
childAlg->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
childAlg->setPropertyValue("Filename", instFilename);
childAlg->setPropertyValue("InstrumentName", instName);
childAlg->setProperty("OverwriteSpectraMap",
childAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
childAlg->executeAsChildAlg();
return tempWS->getInstrument();
......
......@@ -104,7 +104,7 @@ void CreateSimulationWorkspace::createInstrument() {
} else {
loadInstrument->setPropertyValue("InstrumentName", instrProp);
}
loadInstrument->setProperty("OverwriteSpectraMap",
loadInstrument->setProperty("RewriteSpectraMap",
Kernel::OptionalBool(true));
loadInstrument->executeAsChildAlg();
tempWS = loadInstrument->getProperty("Workspace");
......
......@@ -803,7 +803,7 @@ void FilterEventsByLogValuePreNexus::runLoadInstrument(
// Now execute the Child Algorithm. Catch and log any error, but don't stop.
loadInst->setPropertyValue("InstrumentName", instrument);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->executeAsChildAlg();
......
......@@ -404,7 +404,7 @@ void LoadBBY::exec() {
createChildAlgorithm("LoadInstrument");
loadInstrumentAlg->setProperty("Workspace", eventWS);
loadInstrumentAlg->setPropertyValue("InstrumentName", "BILBY");
loadInstrumentAlg->setProperty("OverwriteSpectraMap",
loadInstrumentAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInstrumentAlg->executeAsChildAlg();
......
Markdown is supported
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