Skip to content

Commit

Permalink
Merge branch 'master' into feature/10323_vesuvio_diffraction
Browse files Browse the repository at this point in the history
Refs #10323
  • Loading branch information
DanNixon committed Oct 20, 2014
2 parents f841acf + 6e0145f commit 62a2365
Show file tree
Hide file tree
Showing 280 changed files with 22,701 additions and 10,026 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -162,4 +162,8 @@ Desktop.ini
# Mac OS X Finder
.DS_Store

# Ctags index files
.tags
.tags_sorted_by_file

Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/LibHelper.h
16 changes: 16 additions & 0 deletions Code/Mantid/Build/CMake/DarwinSetup.cmake
Expand Up @@ -81,6 +81,14 @@ endif ()
###########################################################################
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -std=c++0x" )
set ( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x" )

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register" )
set ( CMAKE_XCODE_ATTRIBUTE_OTHER_CPLUSPLUSFLAGS "-Wno-deprecated-register")
set ( CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++" )
endif()

if( ${CMAKE_C_COMPILER} MATCHES "icc.*$" )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-intel-extensions" )
Expand Down Expand Up @@ -113,8 +121,16 @@ if (OSX_VERSION VERSION_LESS 10.9)
set ( SITEPACKAGES /Library/Python/${PY_VER}/site-packages )
else()
# Assume we are using homebrew for now
# set Deployment target to 10.8
set ( CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk )
set ( CMAKE_OSX_ARCHITECTURES x86_64 )
set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.8 )
set ( PYQT4_PYTHONPATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
set ( SITEPACKAGES /usr/local/lib/python${PY_VER}/site-packages )
# use homebrew OpenSSL package
EXEC_PROGRAM( brew ARGS info openssl | grep openssl: | cut -c 17-22 OUTPUT_VARIABLE _openssl_version )
MESSAGE(STATUS "OpenSSL version: ${_openssl_version}")
set ( OPENSSL_ROOT_DIR /usr/local/Cellar/openssl/${_openssl_version}/ )
endif()

# Python packages
Expand Down
13 changes: 4 additions & 9 deletions Code/Mantid/Build/CMake/GNUSetup.cmake
Expand Up @@ -6,16 +6,12 @@
# project settings should be included in the relevant CMakeLists.txt file
# for that project.

# Get the GCC version
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS --version | cut -d \" \" -f 3 OUTPUT_VARIABLE _compiler_output)
STRING(REGEX REPLACE ".*([0-9]\\.[0-9]\\.[0-9]).*" "\\1" GCC_COMPILER_VERSION ${_compiler_output})
MESSAGE(STATUS "gcc version: ${GCC_COMPILER_VERSION}")

# Export the GCC compiler version globally
set(GCC_COMPILER_VERSION ${GCC_COMPILER_VERSION} CACHE INTERNAL "")
# Set our own compiler version flag from the cmake one and export it globally
set( GCC_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION} CACHE INTERNAL "")
message( STATUS "gcc version: ${GCC_COMPILER_VERSION}" )

# Global warning flags.
set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -fno-common" )
set( GNUFLAGS "-Wall -Wextra -Wconversion -Winit-self -Wpointer-arith -Wcast-qual -Wcast-align -fno-common" )
# Disable some warnings about deprecated headers and type conversions that
# we can't do anything about
# -Wno-deprecated: Do not warn about use of deprecated headers.
Expand All @@ -38,4 +34,3 @@ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUFLAGS}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GNUFLAGS} -Woverloaded-virtual -fno-operator-names -std=c++0x" )
# Cleanup
set ( GNUFLAGS )

12 changes: 8 additions & 4 deletions Code/Mantid/Framework/API/inc/MantidAPI/Algorithm.h
Expand Up @@ -338,6 +338,11 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
/// Pointer to the parent history object (if set)
boost::shared_ptr<AlgorithmHistory> m_parentHistory;

/// One vector of workspaces for each input workspace property
std::vector<WorkspaceVector> m_groups;
/// Size of the group(s) being processed
size_t m_groupSize;

private:
/// Private Copy constructor: NO COPY ALLOWED
Algorithm(const Algorithm&);
Expand All @@ -354,6 +359,9 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag

bool executeAsyncImpl(const Poco::Void & i);

// Report that the algorithm has completed.
void reportCompleted(const double& duration, const bool groupProcessing = false);

// --------------------- Private Members -----------------------------------
/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, Algorithm, Poco::ActiveStarter<Algorithm>> *m_executeAsync;
Expand Down Expand Up @@ -387,14 +395,10 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
/// All the WorkspaceProperties that are Output (not inOut). Set in execute()
std::vector<IWorkspaceProperty *> m_pureOutputWorkspaceProps;

/// One vector of workspaces for each input workspace property
std::vector<WorkspaceVector> m_groups;
/// Pointer to the WorkspaceGroup (if any) for each input workspace property
std::vector<boost::shared_ptr<WorkspaceGroup> > m_groupWorkspaces;
/// If only one input is a group, this is its index. -1 if they are all groups
int m_singleGroup;
/// Size of the group(s) being processed
size_t m_groupSize;
/// All the groups have similar names (group_1, group_2 etc.)
bool m_groupsHaveSimilarNames;
/// A non-recursive mutex for thread-safety
Expand Down
1 change: 1 addition & 0 deletions Code/Mantid/Framework/API/inc/MantidAPI/IMDNode.h
Expand Up @@ -71,6 +71,7 @@ class IMDNode
*@param loadFileData -- if true, the data on HDD and not yet in memory are loaded into memory before deleting fileBacked information,
if false, all on HDD contents are discarded, which can break the data integrity (used by destructor) */
virtual void clearFileBacked(bool loadFileData)=0;
virtual void reserveMemoryForLoad(uint64_t)=0;

/**Save the box at specific disk position using the class, respoinsible for the file IO. */
virtual void saveAt(API::IBoxControllerIO *const /*saver */, uint64_t /*position*/)const=0;
Expand Down
6 changes: 0 additions & 6 deletions Code/Mantid/Framework/API/inc/MantidAPI/ParamFunction.h
Expand Up @@ -10,12 +10,6 @@
#include <string>
#include <vector>

#ifndef HAS_UNORDERED_MAP_H
#include <map>
#else
#include <tr1/unordered_map>
#endif

namespace Mantid
{
namespace API
Expand Down
29 changes: 12 additions & 17 deletions Code/Mantid/Framework/API/inc/MantidAPI/Sample.h
Expand Up @@ -5,9 +5,8 @@
// Includes
//------------------------------------------------------------------------------
#include "MantidAPI/DllConfig.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/Material.h"
#include "MantidGeometry/Objects/Object.h"
#include "MantidKernel/V3D.h"
#include <vector>


Expand All @@ -28,28 +27,28 @@ namespace Mantid
//------------------------------------------------------------------------------
class SampleEnvironment;

/**
This class stores information about the sample used in particular
/**
This class stores information about the sample used in particular
run. It is a type of ObjComponent meaning it has a shape, a position
and a material.
Copyright &copy; 2007-2012 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
Expand Down Expand Up @@ -82,10 +81,8 @@ namespace Mantid

/** @name Material properties.*/
//@{
/// Return the material
/// Return the material (convenience method)
const Kernel::Material & getMaterial() const;
/// Set the type of material that this sample is composed from
void setMaterial(const Kernel::Material& material);
//@}

/** @name Access the environment information */
Expand All @@ -102,7 +99,7 @@ namespace Mantid
const Geometry::OrientedLattice & getOrientedLattice() const;
/// Get a reference to the sample's OrientedLattice
Geometry::OrientedLattice & getOrientedLattice();
/** Set the pointer to OrientedLattice defining the sample's lattice and orientation.
/** Set the pointer to OrientedLattice defining the sample's lattice and orientation.
No copying is done in the class, but the class deletes pointer on destruction so the application, providing the pointer should not do it*/
void setOrientedLattice(Geometry::OrientedLattice * latt);
bool hasOrientedLattice() const;
Expand All @@ -129,18 +126,16 @@ namespace Mantid
/// Sets the width
void setWidth(double width);
/// Returns the width
double getWidth() const;
double getWidth() const;
//@}
/// Delete the oriented lattice
void clearOrientedLattice();

private:
private:
/// The sample name
std::string m_name;
/// The sample shape object
Geometry::Object m_shape;
/// The sample composition
Kernel::Material m_material;
/// An owned pointer to the SampleEnvironment object
boost::shared_ptr<SampleEnvironment> m_environment;
/// Pointer to the OrientedLattice of the sample, NULL if not set.
Expand Down
58 changes: 30 additions & 28 deletions Code/Mantid/Framework/API/inc/MantidAPI/SampleEnvironment.h
Expand Up @@ -5,67 +5,69 @@
// Includes
//------------------------------------------------------------------------------
#include "MantidAPI/DllConfig.h"
#include "MantidGeometry/Instrument/CompAssembly.h"
#include "MantidGeometry/Objects/Object.h"
#include "MantidKernel/ClassMacros.h"

namespace Mantid
{
namespace Geometry
{
class Track;
}
namespace API
{
/**
/**
This class stores details regarding the sample environment that was used during
a specific run. It is implemented as a type of CompAssembly so that enviroment kits
consisting of objects made from different materials can be constructed easily.
@author Martyn Gigg, Tessella plc
@date 23/11/2010
a specific run. It is implemented as a collection of pairs of Object elements
Copyright &copy; 2007-2010 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>.
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class MANTID_API_DLL SampleEnvironment : public Geometry::CompAssembly
class MANTID_API_DLL SampleEnvironment
{
public:
/// Constructor defining the name of the environment
SampleEnvironment(const std::string & name);
/// Copy constructor
SampleEnvironment(const SampleEnvironment& original);
/// Clone the assembly
virtual Geometry::IComponent* clone() const;
/// Type of object
virtual std::string type() const {return "SampleEnvironment"; }

/// Override the default add member to only add components with a defined
/// shape
int add(IComponent* comp);
/// @return The name of kit
inline const std::string name() const { return m_name; }
/// @return The number of elements the environment is composed of
inline size_t nelements() const { return m_elements.size(); }
/// Return the bounding box of all of the elements
Geometry::BoundingBox boundingBox() const;

/// Add an element
void add(const Geometry::Object & element);

/// Is the point given a valid point within the environment
bool isValid(const Kernel::V3D & point) const;
/// Update the given track with intersections within the environment
void interceptSurfaces(Geometry::Track & track) const;

private:
/// Default constructor
SampleEnvironment();
/// Assignment operator
SampleEnvironment& operator=(const SampleEnvironment&);

DISABLE_DEFAULT_CONSTRUCT(SampleEnvironment)

// Name of the kit
std::string m_name;
// The elements
std::vector<Geometry::Object> m_elements;
};
}
}
Expand Down

0 comments on commit 62a2365

Please sign in to comment.