Skip to content

Commit

Permalink
Change defaule value for SNAP. Refs #6096.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Jan 15, 2013
1 parent 3d3518b commit 2303147
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Code/Mantid/Framework/DataHandling/src/SaveMask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace DataHandling
"MaskingWorkspace to output to XML file (SpecialWorkspace2D)");
declareProperty(new FileProperty("OutputFile", "", FileProperty::Save, ".xml"),
"File to save the detectors mask in XML format");
declareProperty("GroupedDetectors", false,
declareProperty("GroupedDetectors", true,
"True if there can be more than one detector contained in any spectrum. ");

}
Expand Down Expand Up @@ -96,8 +96,11 @@ namespace DataHandling
const std::set<detid_t> detids = spec->getDetectorIDs();
if (!groupeddetectors && detids.size() != 1)
{
g_log.error() << "Impossible Situation! Workspace " << i << " corresponds to #(Det) = " << detids.size() << std::endl;
throw std::invalid_argument("Impossible number of detectors");
std::stringstream errmsg;
errmsg << "Workspace " << i << " has " << detids.size() << " detectors. "
<< "User does not specify the detectors are grouped. ";
g_log.error(errmsg.str());
throw std::invalid_argument(errmsg.str());
}

// b) get detector id & Store
Expand Down Expand Up @@ -147,7 +150,8 @@ namespace DataHandling
idx0sts.push_back(i0st);
idx0eds.push_back(i0ed);

for (size_t i = 0; i < idx0sts.size(); i++){
for (size_t i = 0; i < idx0sts.size(); i++)
{
g_log.information() << "Section " << i << " : " << idx0sts[i] << " , " << idx0eds[i] << " to be masked and recorded."<< std::endl;
}
} // Only work for detid > 0
Expand Down

0 comments on commit 2303147

Please sign in to comment.