Skip to content

Commit

Permalink
Fixes for includes required in a release build.
Browse files Browse the repository at this point in the history
Refs #8784
  • Loading branch information
martyngigg committed Feb 11, 2014
1 parent 4c52b46 commit 0592602
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
16 changes: 1 addition & 15 deletions Code/Mantid/Framework/API/inc/MantidAPI/Column.h
Expand Up @@ -135,21 +135,7 @@ class MANTID_API_DLL Column
}

/// Set plot type where
/// None = 0 (means it has specifically been set to 'no plot type')
/// NotSet = -1000 (this is the default and means plot style has not been set)
/// X = 1, Y = 2, Z = 3, xErr = 4, yErr = 5, Label = 6
/// @param t plot type as defined above
void setPlotType(int t)
{
if ( t == -1000 || t == 0 || t == 1 || t == 2 || t == 3 || t == 4 ||
t == 5 || t == 6 )
m_plotType = t;
else
{
g_log.error() << "Cannot set plot of column to " << t
<< " . Ignore this attempt." << std::endl;
}
}
void setPlotType(int t);

/**
* Fills a std vector with values from the column if the types are compatible.
Expand Down
19 changes: 19 additions & 0 deletions Code/Mantid/Framework/API/src/Column.cpp
@@ -1,5 +1,6 @@
#include "MantidAPI/Column.h"
#include <algorithm>
#include <iostream>

namespace Mantid
{
Expand All @@ -15,6 +16,24 @@ bool Column::isType<bool>()const
return isBool();
}

/// Set plot type where
/// None = 0 (means it has specifically been set to 'no plot type')
/// NotSet = -1000 (this is the default and means plot style has not been set)
/// X = 1, Y = 2, Z = 3, xErr = 4, yErr = 5, Label = 6
/// @param t plot type as defined above
void Column::setPlotType(int t)
{
if ( t == -1000 || t == 0 || t == 1 || t == 2 || t == 3 || t == 4 ||
t == 5 || t == 6 )
m_plotType = t;
else
{
g_log.error() << "Cannot set plot of column to " << t
<< " . Ignore this attempt." << std::endl;
}
}


std::ostream& operator<<(std::ostream& s,const API::Boolean& b)
{
s << (b.value?"true":"false");
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/API/src/CostFunctionFactory.cpp
Expand Up @@ -2,6 +2,7 @@
#include "MantidAPI/ICostFunction.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/LibraryManager.h"
#include <iostream>

namespace Mantid
{
Expand Down
13 changes: 4 additions & 9 deletions Code/Mantid/Framework/CurveFitting/src/CostFuncLeastSquares.cpp
Expand Up @@ -11,11 +11,6 @@

#include <iomanip>

namespace
{
const bool debug = false;
}

namespace Mantid
{
namespace CurveFitting
Expand Down Expand Up @@ -281,17 +276,17 @@ void CostFuncLeastSquares::addValDerivHessian(

size_t iActiveP = 0;
double fVal = 0.0;
if (debug)
if (m_log.is(Kernel::Logger::Priority::PRIO_DEBUG))
{
std::cerr << "Jacobian:\n";
m_log.debug() << "Jacobian:\n";
for(size_t i = 0; i < ny; ++i)
{
for(size_t ip = 0; ip < np; ++ip)
{
if ( !m_function->isActive(ip) ) continue;
std::cerr << jacobian.get(i,ip) << ' ';
m_log.debug() << jacobian.get(i,ip) << ' ';
}
std::cerr << std::endl;
m_log.debug() << "\n";
}
}
double sqrtw = calSqrtW(values);
Expand Down

0 comments on commit 0592602

Please sign in to comment.