Commit 37aa382e authored by Walsh, Michael's avatar Walsh, Michael
Browse files

gave WorkspaceBoundingBox its own logger

parent 6e93c13c
......@@ -11,14 +11,18 @@
namespace Mantid {
namespace Algorithms {
namespace {
// static logger
Kernel::Logger g_log("WorkspaceBoundingBox");
} // namespace
/* This is a simple class originally intended for use solely with FindCenterOfMassPosition2.cpp
*
*/
class WorkspaceBoundingBox {
public:
WorkspaceBoundingBox(API::MatrixWorkspace_sptr workspace, Kernel::Logger &g_log);
WorkspaceBoundingBox(Kernel::Logger &g_log);
WorkspaceBoundingBox(API::MatrixWorkspace_sptr workspace);
WorkspaceBoundingBox();
~WorkspaceBoundingBox();
API::MatrixWorkspace_sptr getWorkspace() { return workspace; }
......@@ -97,9 +101,6 @@ private:
double yMin = 0;
double yMax = 0;
const int m_specID = 0;
/// Logger for this helper
Kernel::Logger &g_log;
};
} // namespace Algorithms
......
......@@ -138,11 +138,11 @@ void FindCenterOfMassPosition2::findCenterOfMass(API::MatrixWorkspace_sptr input
// _centered_ on the latest center position are considered. At each
// iteration we will recompute the bounding box, and we will make
// it as large as possible. The largest box is defined in:
WorkspaceBoundingBox boundingBox(inputWS, g_log);
WorkspaceBoundingBox boundingBox(inputWS);
boundingBox.setCenter(centerX, centerY);
// Starting values for the bounding box and the center
WorkspaceBoundingBox previousBoundingBox(g_log);
WorkspaceBoundingBox previousBoundingBox;
previousBoundingBox.setBounds(0., 0., 0., 0.);
// Initialize book-keeping
......
......@@ -5,10 +5,9 @@
namespace Mantid {
namespace Algorithms {
WorkspaceBoundingBox::WorkspaceBoundingBox(API::MatrixWorkspace_sptr workspace, Kernel::Logger &g_log)
: workspace(workspace), g_log(g_log) {}
WorkspaceBoundingBox::WorkspaceBoundingBox(API::MatrixWorkspace_sptr workspace) : workspace(workspace) {}
WorkspaceBoundingBox::WorkspaceBoundingBox(Kernel::Logger &g_log) : g_log(g_log) {}
WorkspaceBoundingBox::WorkspaceBoundingBox() {}
WorkspaceBoundingBox::~WorkspaceBoundingBox() {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment