Skip to content

Commit

Permalink
Refs #4137: Start of saving peaks nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
Janik Zikovsky committed Nov 28, 2011
1 parent 47f0292 commit b336bbb
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions Code/Mantid/Framework/DataObjects/src/PeaksWorkspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,31 @@ namespace DataObjects
{
// This is not fully implemented. Currently a partial save.
int pNum = getNumberPeaks();
//std::vector<Peak>& myPeaks = getPeaks();
std::vector<Peak> my1Peaks = peaks;
// Peak myPeak = getPeak(0);
Peak my1Peak = peaks[0];
int cNum = columnCount();
int rNum = rowCount();
API::Column_const_sptr col = getColumn(0);
std::vector<std::string> cNames = columnNames;
file->makeGroup("detector", "NXdetector", 1);
// file->writeData("Column_names", columnNames ); // This is not resolved by linker
// file->writeData("column names",cNames); // This is not resolved by linker.
// file->writeData( "Column_1", col ); // This is not resolved by linker.

// //std::vector<Peak>& myPeaks = getPeaks();
// std::vector<Peak> my1Peaks = peaks;
// // Peak myPeak = getPeak(0);
// Peak my1Peak = peaks[0];
// int cNum = columnCount();
// int rNum = rowCount();
// API::Column_const_sptr col = getColumn(0);
// std::vector<std::string> cNames = columnNames;
// file->writeData("Column_names", columnNames ); // This is not resolved by linker
// file->writeData("column names",cNames); // This is not resolved by linker.
// file->writeData( "Column_1", col ); // This is not resolved by linker.

std::vector<int> detectorID;
std::vector<dpuble> H;
for (size_t i=0; i < peaks.size(); i++)
{
Peak & p = peaks[i];
detectorID.push_back( p.m_DetectorID );
H.push_back( p.m_H );
// etc.
}
file->writeData("detector_id", detectorIDs);
file->writeData("H", H);
// etc.
}
}
}
Expand Down

0 comments on commit b336bbb

Please sign in to comment.