Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/9135_ISISRawAndMonitors
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Apr 7, 2014
2 parents d023298 + 1cb02da commit 8caa87a
Show file tree
Hide file tree
Showing 1,085 changed files with 32,529 additions and 12,951 deletions.
31 changes: 16 additions & 15 deletions Code/Mantid/Build/CMake/DarwinSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if ( PYTHON_VERSION_MAJOR )
message ( STATUS "Python version is " ${PY_VER} )
else ()
# Older versions of CMake don't set these variables so just assume 2.6 as before
set ( PY_VER 2.6 )
set ( PY_VER 2.7 )
endif ()

###########################################################################
Expand All @@ -45,7 +45,8 @@ endif()
###########################################################################
# Mac-specific installation setup
###########################################################################
set ( CMAKE_INSTALL_PREFIX /Applications )
set ( CMAKE_INSTALL_PREFIX "" )
set ( CPACK_PACKAGE_EXECUTABLES MantidPlot )
set ( INBUNDLE MantidPlot.app/ )
# We know exactly where this has to be on Darwin
set ( PARAVIEW_APP_DIR "/Applications/${OSX_PARAVIEW_APP}" )
Expand Down Expand Up @@ -73,6 +74,12 @@ install ( FILES /Library/Python/${PY_VER}/site-packages/PyQt4/Qt.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtXml.so
/Library/Python/${PY_VER}/site-packages/PyQt4/__init__.py
DESTINATION ${BIN_DIR}/PyQt4 )
# Newer PyQt versions have a new internal library that we need to take
if ( EXISTS /Library/Python/${PY_VER}/site-packages/PyQt4/_qt.so )
install ( FILES /Library/Python/${PY_VER}/site-packages/PyQt4/_qt.so
DESTINATION ${BIN_DIR}/PyQt4 )
endif ()

install ( DIRECTORY /Library/Python/${PY_VER}/site-packages/PyQt4/uic DESTINATION ${BIN_DIR}/PyQt4 )

# Python packages in Third_Party need copying to build directory and the final package
Expand Down Expand Up @@ -101,27 +108,21 @@ execute_process(
# Strip off any /CR or /LF
string(STRIP ${OSX_VERSION} OSX_VERSION)

if (OSX_VERSION VERSION_LESS 10.6)
message (FATAL_ERROR "The minimum supported version of Mac OS X is 10.6 (Snow Leopard).")
endif()

if (OSX_VERSION VERSION_GREATER 10.6 OR OSX_VERSION VERSION_EQUAL 10.6)
set ( OSX_CODENAME "Snow Leopard" )
endif()

if (OSX_VERSION VERSION_GREATER 10.7 OR OSX_VERSION VERSION_EQUAL 10.7)
set ( OSX_CODENAME "Lion")
if (OSX_VERSION VERSION_LESS 10.8)
message (FATAL_ERROR "The minimum supported version of Mac OS X is 10.8 (Mountain Lion).")
endif()

if (OSX_VERSION VERSION_GREATER 10.8 OR OSX_VERSION VERSION_EQUAL 10.8)
set ( OSX_CODENAME "Mountain Lion")
endif()

if (OSX_VERSION VERSION_GREATER 10.9 OR OSX_VERSION VERSION_EQUAL 10.9)
set ( OSX_CODENAME "Mavericks")
endif()

message (STATUS "Operating System: Mac OS X ${OSX_VERSION} (${OSX_CODENAME})")

string (REPLACE " " "" CPACK_SYSTEM_NAME ${OSX_CODENAME})
set ( CPACK_OSX_PACKAGE_VERSION 10.6 )
set ( CPACK_PREFLIGHT_SCRIPT ${CMAKE_SOURCE_DIR}/Installers/MacInstaller/installer_hooks/preflight )

set ( CPACK_GENERATOR PackageMaker )
set ( CPACK_GENERATOR DragNDrop )

9 changes: 2 additions & 7 deletions Code/Mantid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,8 @@ set ( ENABLE_CPACK CACHE BOOL "Switch to enable CPack package generation")
if ( ENABLE_CPACK )
include ( CPackCommon )

# Mac Packagemaker settings
if (OSX_VERSION VERSION_LESS 10.8)
set ( CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/Installers/MacInstaller/MacOSX-README.rtf )
else()
set ( CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/Installers/MacInstaller/MacOSX10-8-README.rtf )
endif ()
set ( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/Installers/WinInstaller/License.rtf )
# Mac package settings
set ( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/Installers/WinInstaller/License.txt )

IF ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
include ( CPackLinuxSetup )
Expand Down
9 changes: 7 additions & 2 deletions Code/Mantid/Framework/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ set ( SRC_FILES
src/Axis.cpp
src/BoxController.cpp
src/CatalogFactory.cpp
src/CatalogManager.cpp
src/CatalogSession.cpp
src/ChopperModel.cpp
src/Column.cpp
src/ColumnFactory.cpp
src/CompositeCatalog.cpp
src/CompositeDomainMD.cpp
src/CompositeFunction.cpp
src/ConstraintFactory.cpp
Expand Down Expand Up @@ -59,12 +62,11 @@ set ( SRC_FILES
src/ISpectrum.cpp
src/ISplittersWorkspace.cpp
src/ITableWorkspace.cpp
src/ITransformScale.cpp
src/IkedaCarpenterModerator.cpp
src/ImmutableCompositeFunction.cpp
src/ImplicitFunctionParameterParserFactory.cpp
src/ImplicitFunctionParserFactory.cpp
src/ImplictFunctionFactory.cpp
src/ImplicitFunctionFactory.cpp
src/InstrumentDataService.cpp
src/JointDomain.cpp
src/LinearScale.cpp
Expand Down Expand Up @@ -133,9 +135,12 @@ set ( INC_FILES
inc/MantidAPI/Axis.h
inc/MantidAPI/BoxController.h
inc/MantidAPI/CatalogFactory.h
inc/MantidAPI/CatalogManager.h
inc/MantidAPI/CatalogSession.h
inc/MantidAPI/ChopperModel.h
inc/MantidAPI/Column.h
inc/MantidAPI/ColumnFactory.h
inc/MantidAPI/CompositeCatalog.h
inc/MantidAPI/CompositeDomain.h
inc/MantidAPI/CompositeDomainMD.h
inc/MantidAPI/CompositeFunction.h
Expand Down
20 changes: 10 additions & 10 deletions Code/Mantid/Framework/API/inc/MantidAPI/Algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,17 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
/// Returns the cancellation state
bool getCancel() const { return m_cancel; }

/// Returns a reference to the logger.
Kernel::Logger & getLogger() const { return g_log; }
///Logging can be disabled by passing a value of false
void setLogging(const bool value){g_log.setEnabled(value);}
void setLogging(const bool value) { g_log.setEnabled(value);}
///returns the status of logging, True = enabled
bool isLogging() const {return g_log.getEnabled();}
bool isLogging() const { return g_log.getEnabled();}

///sets the logging priority offset
void setLoggingOffset(const int value) {g_log.setLevelOffset(value);}
void setLoggingOffset(const int value) { g_log.setLevelOffset(value); }
///returns the logging priority offset
int getLoggingOffset() const {return g_log.getLevelOffset();}

/// Returns a reference to the logger.
Kernel::Logger& getLogger() const { return g_log; }
int getLoggingOffset() const { return g_log.getLevelOffset(); }


/// function returns an optional message that will be displayed in the default GUI, at the top.
Expand Down Expand Up @@ -318,8 +317,6 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
bool m_cancel;
/// Set if an exception is thrown, and not caught, within a parallel region
bool m_parallelException;
/// Reference to the logger class
Kernel::Logger& g_log;

friend class WorkspaceHistory; // Allow workspace history loading to adjust g_execCount
static size_t g_execCount; ///< Counter to keep track of algorithm execution order
Expand All @@ -338,6 +335,10 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
/// All the WorkspaceProperties that are Input or InOut. Set in execute()
std::vector<IWorkspaceProperty *> m_inputWorkspaceProps;

/// Logger for this algorithm
Kernel::Logger m_log;
Kernel::Logger &g_log;

private:
/// Private Copy constructor: NO COPY ALLOWED
Algorithm(const Algorithm&);
Expand All @@ -355,7 +356,6 @@ class MANTID_API_DLL Algorithm : public IAlgorithm, public Kernel::PropertyManag
bool executeAsyncImpl(const Poco::Void & i);

// --------------------- Private Members -----------------------------------

/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, Algorithm, Poco::ActiveStarter<Algorithm>> *m_executeAsync;

Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "MantidAPI/DllConfig.h"
#include "MantidKernel/DynamicFactory.h"
#include "MantidKernel/SingletonHolder.h"
#include "MantidKernel/Logger.h"

namespace Mantid
{
Expand Down Expand Up @@ -158,8 +157,6 @@ class MANTID_API_DLL AlgorithmFactoryImpl : public Kernel::DynamicFactory<Algori
std::string createName(const std::string&, const int&)const;
/// fills a set with the hidden categories
void fillHiddenCategories(std::set<std::string> *categorySet) const;
///static reference to the logger class
Kernel::Logger& g_log;

/// A typedef for the map of algorithm versions
typedef std::map<std::string, int> VersionMap;
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <string>
#include <Poco/NotificationCenter.h>
#include "MantidAPI/DllConfig.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/SingletonHolder.h"
#include "MantidAPI/Algorithm.h"

Expand Down Expand Up @@ -91,8 +90,6 @@ class MANTID_API_DLL AlgorithmManagerImpl
/// Unimplemented assignment operator
AlgorithmManagerImpl& operator =(const AlgorithmManagerImpl&);

/// Reference to the logger class
Kernel::Logger& g_log;
/// The maximum size of the algorithm store
int m_max_no_algs;
/// The list of managed algorithms
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Framework/API/inc/MantidAPI/AlgorithmProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ namespace Mantid

/// Temporary holder of external observers wishing to subscribe
mutable std::vector<const Poco::AbstractObserver*> m_externalObservers;

/// Static refenence to the logger class
static Kernel::Logger& g_log;
};

} // namespace API
Expand Down
138 changes: 58 additions & 80 deletions Code/Mantid/Framework/API/inc/MantidAPI/CatalogFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,85 +25,63 @@

namespace Mantid
{
//----------------------------------------------------------------------
// Forward declaration
//----------------------------------------------------------------------
namespace Kernel
{
class Logger;
}
namespace API
{

//----------------------------------------------------------------------
// Forward declaration
//----------------------------------------------------------------------

class ICatalog;

/** Creates instances of concrete Catalog.
The factory is a singleton that hands out shared pointers to the base Catalog class.
It overrides the base class DynamicFactory::create method so that only a single
instance of a given Catalog is ever created, and a pointer to that same instance
is passed out each time the Catalog is requested.
@author Sofia Antony
@date 01/10/2010
Copyright &copy; 2008 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 CatalogFactoryImpl : public Kernel::DynamicFactory<ICatalog>
{
public:
/// create an instance of the catalog specified by the calssName
virtual boost::shared_ptr<ICatalog> create(const std::string& className) const;

private:
friend struct Kernel::CreateUsingNew<CatalogFactoryImpl>;

/// Private Constructor for singleton class
CatalogFactoryImpl();
/// Private copy constructor
CatalogFactoryImpl(const CatalogFactoryImpl&);
/// Private assignment operator
CatalogFactoryImpl& operator = (const CatalogFactoryImpl&);
///Private Destructor
virtual ~CatalogFactoryImpl();

/// Stores pointers to already created Catalog instances, with their name as the key
mutable std::map< std::string, boost::shared_ptr<ICatalog> > m_createdCatalogs;

/// Reference to the logger class
Kernel::Logger& m_log;
};

///Forward declaration of a specialisation of SingletonHolder for AlgorithmFactoryImpl (needed for dllexport/dllimport) .
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<CatalogFactoryImpl>;
#endif /* _WIN32 */
/// The specialisation of the SingletonHolder class that holds the CatalogFactory
typedef Mantid::Kernel::SingletonHolder<CatalogFactoryImpl> CatalogFactory;

} // namespace API
namespace API
{
//----------------------------------------------------------------------
// Forward declaration
//----------------------------------------------------------------------
class ICatalog;

/**
The factory is a singleton that hands out shared pointers to the base Catalog class.
@author Sofia Antony, ISIS Rutherford Appleton Laboratory
@date 01/10/2010
Copyright &copy; 2013 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 CatalogFactoryImpl : public Kernel::DynamicFactory<ICatalog>
{
private:
friend struct Kernel::CreateUsingNew<CatalogFactoryImpl>;
/// Private Constructor for singleton class
CatalogFactoryImpl();
/// Private copy constructor
CatalogFactoryImpl(const CatalogFactoryImpl&);
/// Private assignment operator
CatalogFactoryImpl& operator = (const CatalogFactoryImpl&);
/// Private Destructor
virtual ~CatalogFactoryImpl();
/// Stores pointers to already created Catalog instances, with their name as the key
mutable std::map< std::string, boost::shared_ptr<ICatalog> > m_createdCatalogs;
};

///Forward declaration of a specialisation of SingletonHolder for CatalogFactoryImpl (needed for dllexport/dllimport) .
#ifdef _WIN32
// this breaks new namespace declaraion rules; need to find a better fix
template class MANTID_API_DLL Mantid::Kernel::SingletonHolder<CatalogFactoryImpl>;
#endif /* _WIN32 */
/// The specialisation of the SingletonHolder class that holds the CatalogFactory
typedef MANTID_API_DLL Mantid::Kernel::SingletonHolder<CatalogFactoryImpl> CatalogFactory;

} // namespace API
} // namespace Mantid

#endif /*MANTID_API_CatalogFACTORYIMPL_H_*/
#endif /*MANTID_API_CATALOGFACTORYIMPL_H_*/

0 comments on commit 8caa87a

Please sign in to comment.