Skip to content

Commit

Permalink
Add generateHistogram() to IEventWorkspace.h
Browse files Browse the repository at this point in the history
refs #5285
  • Loading branch information
DennisMikkelson committed May 10, 2012
1 parent 53a879a commit 213d412
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/IEventWorkspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ namespace API
virtual double getTofMax() const = 0;
virtual EventType getEventType() const = 0;
virtual IEventList * getEventListPtr(const std::size_t workspace_index) = 0;
virtual void generateHistogram(const std::size_t index,
const MantidVec& X, MantidVec& Y, MantidVec& E,
bool skipError = false) const = 0;

virtual void clearMRU() const = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class DLLExport EventWorkspace : public API::IEventWorkspace
// Get a pointer to the x data at the given workspace index
Kernel::cow_ptr<MantidVec> refX(const std::size_t) const;

/// Generate a new histogram from specified event list at the given index.
void generateHistogram(const std::size_t index, const MantidVec& X, MantidVec& Y, MantidVec& E, bool skipError = false) const;

//------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class DLLExport Workspace2D : public API::MatrixWorkspace
/// Return the underlying ISpectrum ptr (const version) at the given workspace index.
virtual const Mantid::API::ISpectrum * getSpectrum(const size_t index) const;

/// Generate a new histogram by rebinning the existing histogram.
void generateHistogram(const std::size_t index, const MantidVec& X, MantidVec& Y, MantidVec& E, bool skipError = false) const;

/** sets the monitorWorkspace indexlist
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/DataObjects/src/Workspace2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace Mantid


//---------------------------------------------------------------------------
/** Rebin a particulare spectrum to a new histogram bin boundaries.
/** Rebin a particular spectrum to a new histogram bin boundaries.
*
* @param index :: workspace index to generate
* @param X :: input X vector of the bin boundaries.
Expand Down

0 comments on commit 213d412

Please sign in to comment.