Skip to content

Commit

Permalink
Refs #11690 Refactor warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPiccardoSelg committed May 6, 2015
1 parent 0085812 commit f19c214
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMD0DFactory.cpp
Expand Up @@ -22,7 +22,6 @@ namespace Mantid
*/
vtkMD0DFactory::vtkMD0DFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand All @@ -37,6 +36,7 @@ namespace Mantid
*/
vtkDataSet* vtkMD0DFactory::create(ProgressAction& progressUpdating) const
{
g_log.warning() << "Factory " << this->getFactoryTypeName() << " is being used. You are viewing data with less than three dimensions in the VSI. \n";
(void) progressUpdating;
vtkNullUnstructuredGrid nullGrid;
vtkUnstructuredGrid *visualDataSet = nullGrid.createNullData();
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMDHistoLineFactory.cpp
Expand Up @@ -32,7 +32,6 @@ namespace Mantid
vtkMDHistoLineFactory::vtkMDHistoLineFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_scalarName(scalarName),
m_thresholdRange(thresholdRange)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/**
Expand Down Expand Up @@ -76,6 +75,8 @@ namespace Mantid
}
else
{
g_log.warning() << "Factory " << this->getFactoryTypeName() << " is being used. You are viewing data with less than three dimensions in the VSI. \n";

Mantid::Kernel::ReadLock lock(*m_workspace);
const int nBinsX = static_cast<int>( m_workspace->getXDimension()->getNBins() );

Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMDHistoQuadFactory.cpp
Expand Up @@ -31,7 +31,6 @@ namespace Mantid
{
vtkMDHistoQuadFactory::vtkMDHistoQuadFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_scalarName(scalarName), m_thresholdRange(thresholdRange)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/**
Expand Down Expand Up @@ -75,6 +74,8 @@ namespace Mantid
}
else
{
g_log.warning() << "Factory " << this->getFactoryTypeName() << " is being used. You are viewing data with less than three dimensions in the VSI. \n";

Mantid::Kernel::ReadLock lock(*m_workspace);
CPUTimer tim;
const int nBinsX = static_cast<int>( m_workspace->getXDimension()->getNBins() );
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMDLineFactory.cpp
Expand Up @@ -33,7 +33,6 @@ namespace Mantid
*/
vtkMDLineFactory::vtkMDLineFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand All @@ -55,6 +54,8 @@ namespace Mantid
}
else
{
g_log.warning() << "Factory " << this->getFactoryTypeName() << " is being used. You are viewing data with less than three dimensions in the VSI. \n";

IMDEventWorkspace_sptr imdws = doInitialize<IMDEventWorkspace, 1>(m_workspace);
// Acquire a scoped read-only lock to the workspace (prevent segfault from algos modifying ws)
Mantid::Kernel::ReadLock lock(*imdws);
Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Vates/VatesAPI/src/vtkMDQuadFactory.cpp
Expand Up @@ -29,7 +29,6 @@ namespace Mantid
/// Constructor
vtkMDQuadFactory::vtkMDQuadFactory(ThresholdRange_scptr thresholdRange, const std::string& scalarName) : m_thresholdRange(thresholdRange), m_scalarName(scalarName)
{
g_log.warning() << "Creating factory " << this->getFactoryTypeName() << ". You are viewing data with less than three dimensions in the VSI. \n";
}

/// Destructor
Expand All @@ -51,6 +50,8 @@ namespace Mantid
}
else
{
g_log.warning() << "Factory " << this->getFactoryTypeName() << " is being used. You are viewing data with less than three dimensions in the VSI. \n";

IMDEventWorkspace_sptr imdws = this->castAndCheck<IMDEventWorkspace, 2>(m_workspace);
// Acquire a scoped read-only lock to the workspace (prevent segfault from algos modifying ws)
Mantid::Kernel::ReadLock lock(*imdws);
Expand Down

0 comments on commit f19c214

Please sign in to comment.