Newer
Older
#include <iostream>
#include "MantidDataObjects/Histogram1D.h"
#include "MantidKernel/Exception.h"
#include "MantidAPI/WorkspaceFactory.h"
Janik Zikovsky
committed
/**
Russell Taylor
committed
Constructor
*/
Russell Taylor
committed
{}
Janik Zikovsky
committed
/**
Russell Taylor
committed
Copy constructor
Janik Zikovsky
committed
@param A :: Histogram to copy
Russell Taylor
committed
*/
Janik Zikovsky
committed
Histogram1D::Histogram1D(const Histogram1D& A)
: ISpectrum(A),
refY(A.refY), refE(A.refE)
Russell Taylor
committed
{}
Janik Zikovsky
committed
/**
Russell Taylor
committed
Assignment operator
Janik Zikovsky
committed
@param A :: Histogram to copy
@return *this
Russell Taylor
committed
*/
Histogram1D& Histogram1D::operator=(const Histogram1D& A)
Russell Taylor
committed
{
refX=A.refX;
refY=A.refY;
refE=A.refE;
Doucet, Mathieu
committed
refDx=A.refDx;
Russell Taylor
committed
}
Russell Taylor
committed
/// Destructor. Nothing to do since refX, refY, and refE are managed ptr
Russell Taylor
committed
Histogram1D::~Histogram1D()
Russell Taylor
committed
void Histogram1D::clearData()
{
MantidVec & yValues = this->dataY();
std::fill(yValues.begin(), yValues.end(), 0.0);
MantidVec & eValues = this->dataE();
std::fill(eValues.begin(), eValues.end(), 0.0);
}