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
......@@ -115,7 +115,7 @@ LoadCalFile::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();
......
......@@ -301,7 +301,7 @@ void LoadCanSAS1D::runLoadInstrument(const std::string &inst_name,
loadInst->setPropertyValue("InstrumentName", inst_name);
loadInst->setProperty<API::MatrixWorkspace_sptr>("Workspace",
localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
} catch (std::invalid_argument &) {
......
......@@ -98,7 +98,7 @@ void LoadDetectorsGroupingFile::exec() {
MatrixWorkspace_sptr tempWS(new DataObjects::Workspace2D());
childAlg->setProperty<MatrixWorkspace_sptr>("Workspace", tempWS);
childAlg->setPropertyValue("Filename", instrumentFilename);
childAlg->setProperty("OverwriteSpectraMap",
childAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
childAlg->executeAsChildAlg();
m_instrument = tempWS->getInstrument();
......
......@@ -252,7 +252,7 @@ void LoadDiffCal::getInstrument(H5File &file) {
} else {
childAlg->setPropertyValue("Filename", idf);
}
childAlg->setProperty("OverwriteSpectraMap",
childAlg->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
childAlg->executeAsChildAlg();
......
......@@ -173,7 +173,7 @@ API::MatrixWorkspace_sptr LoadEmptyInstrument::runLoadInstrument() {
IAlgorithm_sptr loadInst = createChildAlgorithm("LoadInstrument", 0, 1);
loadInst->setPropertyValue("Filename", fullPathIDF);
loadInst->setProperty("OverwriteSpectraMap", OptionalBool(true));
loadInst->setProperty("RewriteSpectraMap", OptionalBool(true));
MatrixWorkspace_sptr ws =
WorkspaceFactory::Instance().create("Workspace2D", 1, 2, 1);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", ws);
......
......@@ -383,7 +383,7 @@ void LoadEventPreNexus::runLoadInstrument(const std::string &eventfilename,
// 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();
......
......@@ -631,7 +631,7 @@ void LoadEventPreNexus2::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();
......
......@@ -604,7 +604,7 @@ void LoadILL::runLoadInstrument() {
try {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
} catch (...) {
......
......@@ -340,7 +340,7 @@ void LoadILLIndirect::runLoadInstrument() {
try {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
......
......@@ -102,7 +102,7 @@ void LoadILLReflectometry::runLoadInstrument() {
try {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->execute();
......
......@@ -408,7 +408,7 @@ void LoadILLSANS::runLoadInstrument() {
try {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
} catch (...) {
......
......@@ -886,7 +886,7 @@ void LoadISISNexus2::runLoadInstrument(
try {
loadInst->setPropertyValue("InstrumentName", m_instrument_name);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->execute();
} catch (std::invalid_argument &) {
......
......@@ -70,7 +70,7 @@ void LoadInstrument::init() {
declareProperty("InstrumentXML", "",
"The full XML instrument definition as a string.");
declareProperty(new PropertyWithValue<OptionalBool>(
"OverwriteSpectraMap", OptionalBool::Unset, boost::make_shared<MandatoryValidator<OptionalBool>>()),
"RewriteSpectraMap", OptionalBool::Unset, boost::make_shared<MandatoryValidator<OptionalBool>>()),
"If true then a 1:1 map between the spectrum numbers and "
"detector/monitor IDs is set up as follows: the detector/monitor IDs in "
"the IDF are ordered from smallest to largest number and then assigned "
......@@ -197,8 +197,8 @@ void LoadInstrument::exec() {
// Rebuild the spectra map for this workspace so that it matches the
// instrument
// if required
const OptionalBool OverwriteSpectraMap = getProperty("OverwriteSpectraMap");
if (OverwriteSpectraMap == OptionalBool::True)
const OptionalBool RewriteSpectraMap = getProperty("RewriteSpectraMap");
if (RewriteSpectraMap == OptionalBool::True)
m_workspace->rebuildSpectraMapping();
}
......
......@@ -344,7 +344,7 @@ void LoadLLB::runLoadInstrument() {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
} catch (...) {
......
......@@ -444,7 +444,7 @@ void LoadMLZ::runLoadInstrument() {
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
g_log.debug() << "InstrumentName" << m_instrumentName << std::endl;
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(true));
loadInst->execute();
} catch (...) {
......
......@@ -853,7 +853,7 @@ void LoadMask::intializeMaskWorkspace() {
else
loadInst->setPropertyValue("Filename", m_instrumentPropValue);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->executeAsChildAlg();
......
......@@ -145,7 +145,7 @@ void LoadMuonNexus::runLoadInstrument(
try {
loadInst->setPropertyValue("InstrumentName", m_instrument_name);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->execute();
} catch (std::invalid_argument &) {
......
......@@ -233,7 +233,7 @@ void LoadPreNexusMonitors::runLoadInstrument(
try {
loadInst->setPropertyValue("InstrumentName", instrument);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
false); // We have a custom mapping
loadInst->execute();
......
......@@ -544,10 +544,10 @@ void LoadRawHelper::runLoadInstrument(
try {
loadInst->setPropertyValue("InstrumentName", instrumentID);
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", localWorkspace);
loadInst->setProperty("OverwriteSpectraMap",
loadInst->setProperty("RewriteSpectraMap",
Mantid::Kernel::OptionalBool(false));
loadInst->setProperty(
"OverwriteSpectraMap",
"RewriteSpectraMap",
false); // No point as we will load the one from the file
loadInst->execute();
} catch (std::invalid_argument &) {
......
......@@ -243,7 +243,7 @@ void LoadSINQFocus::runLoadInstrument() {
// different IDF
loadInst->setPropertyValue("InstrumentName", m_instrumentName);
loadInst->setProperty("OverwriteSpectraMap", Mantid::Kernel::OptionalBool(true));
loadInst->setProperty("RewriteSpectraMap", Mantid::Kernel::OptionalBool(true));
loadInst->setProperty<MatrixWorkspace_sptr>("Workspace", m_localWorkspace);
loadInst->execute();
} catch (...) {
......
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