Skip to content

Commit

Permalink
Refs #5400. Read nexus notes field into file_notes of run object.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Nov 27, 2012
1 parent 059c4c6 commit 18109e4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Code/Mantid/Framework/DataHandling/src/LoadEventNexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,19 @@ void LoadEventNexus::loadEntryMetadata(const std::string &nexusfilename, Mantid:
}
file.closeData();

// get the notes
try {
file.openData("notes");
if (file.getInfo().type == ::NeXus::CHAR) {
string notes = file.getStrData();
if (!notes.empty())
WS->mutableRun().addProperty("file_notes", notes);
}
file.closeData();
} catch (::NeXus::Exception &e) {
// let it drop on floor
}

// Get the run number
file.openData("run_number");
string run("");
Expand Down

0 comments on commit 18109e4

Please sign in to comment.