Skip to content

Commit

Permalink
Added title & comment read/write capabilities for MDHistoWorkspace
Browse files Browse the repository at this point in the history
Refs #11386
  • Loading branch information
tgrbrooks committed Sep 14, 2015
1 parent 7959991 commit 74818b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/Framework/MDAlgorithms/src/SaveMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ void SaveMD::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) {
// Save the algorithm history under "process"
ws->getHistory().saveNexus(file);

file->putAttr("title", ws->getTitle());
file->putAttr("comment", ws->getComment());

// Save all the ExperimentInfos
for (uint16_t i = 0; i < ws->getNumExperimentInfo(); i++) {
ExperimentInfo_sptr ei = ws->getExperimentInfo(i);
Expand All @@ -273,6 +270,9 @@ void SaveMD::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) {
// Write out the affine matrices
MDBoxFlatTree::saveAffineTransformMatricies(
file, boost::dynamic_pointer_cast<const IMDWorkspace>(ws));

file->putAttr("title", ws->getTitle());
file->putAttr("comment", ws->getComment());

// Check that the typedef has not been changed. The NeXus types would need
// changing if it does!
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/Framework/MDAlgorithms/src/SaveMD2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ void SaveMD2::doSaveHisto(Mantid::DataObjects::MDHistoWorkspace_sptr ws) {
MDBoxFlatTree::saveAffineTransformMatricies(
file, boost::dynamic_pointer_cast<const IMDWorkspace>(ws));

file->putAttr("title", ws->getTitle());
file->putAttr("comment", ws->getComment());

// Check that the typedef has not been changed. The NeXus types would need
// changing if it does!
assert(sizeof(signal_t) == sizeof(double));
Expand Down

0 comments on commit 74818b5

Please sign in to comment.