25 throw std::invalid_argument(
"EventWorkspaceHelpers::convertEventTo2D(): "
26 "Input workspace is not an EventWorkspace.");
28 size_t numBins = inputW->blocksize();
36 for (
size_t i = 0; i < inputW->getNumberHistograms(); i++) {
37 outputW->getSpectrum(i).copyInfoFrom(inputW->getSpectrum(i));
38 outputW->setX(i, inputW->refX(i));
42 for (
size_t j = 0; j < numBins; j++)
47 for (
size_t j = 0; j < numBins; j++)
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< MatrixWorkspace > MatrixWorkspace_sptr
shared pointer to the matrix workspace base class
std::shared_ptr< EventWorkspace > EventWorkspace_sptr
shared pointer to the EventWorkspace class
std::vector< double > MantidVec
typedef for the data storage used in Mantid matrix workspaces
static API::MatrixWorkspace_sptr convertEventTo2D(const API::MatrixWorkspace_sptr &inputMatrixW)
Converts an EventWorkspace to an equivalent Workspace2D.